Package nzilbb.labbcat.model
Class User
- java.lang.Object
-
- nzilbb.labbcat.model.User
-
public class User extends Object
Model of a user record, including roles.- Author:
- Robert Fromont robert@fromont.net.nz
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetEmail()Getter foremail: Email address.BooleangetResetPassword()Getter forresetPassword: Whether the user must reset their password when they next log in.String[]getRoles()Getter forroles: Roles or groups the user belongs to.StringgetUser()Getter foruser: User ID.UsersetEmail(String newEmail)Setter foremail: Email address.UsersetResetPassword(Boolean newResetPassword)Setter forresetPassword: Whether the user must reset their password when they next log in.UsersetRoles(String[] newRoles)Setter forroles: Roles or groups the user belongs to.UsersetUser(String newUser)Setter foruser: User ID.javax.json.JsonObjecttoJson()Serializes the object to JSON.
-
-
-
Method Detail
-
getUser
public String getUser()
Getter foruser: User ID.- Returns:
- User ID.
-
setUser
public User setUser(String newUser)
Setter foruser: User ID.- Parameters:
newUser- User ID.- Returns:
- A reference to this object, so that setters can be chained.
-
getEmail
public String getEmail()
Getter foremail: Email address.- Returns:
- Email address.
-
setEmail
public User setEmail(String newEmail)
Setter foremail: Email address.- Parameters:
newEmail- Email address.- Returns:
- A reference to this object, so that setters can be chained.
-
getResetPassword
public Boolean getResetPassword()
Getter forresetPassword: Whether the user must reset their password when they next log in.- Returns:
- Whether the user must reset their password when they next log in.
-
setResetPassword
public User setResetPassword(Boolean newResetPassword)
Setter forresetPassword: Whether the user must reset their password when they next log in.- Parameters:
newResetPassword- Whether the user must reset their password when they next log in.- Returns:
- A reference to this object, so that setters can be chained.
-
getRoles
public String[] getRoles()
Getter forroles: Roles or groups the user belongs to.- Returns:
- Roles or groups the user belongs to.
-
setRoles
public User setRoles(String[] newRoles)
Setter forroles: Roles or groups the user belongs to.- Parameters:
newRoles- Roles or groups the user belongs to.- Returns:
- A reference to this object, so that setters can be chained.
-
toJson
public javax.json.JsonObject toJson()
Serializes the object to JSON.- Returns:
- A JSON serialization of the object.
-
-