Package nzilbb.labbcat.model
Class User
java.lang.Object
nzilbb.labbcat.model.User
Model of a user record, including roles.
- Author:
- Robert Fromont robert@fromont.net.nz
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetEmail()
Getter foremail
: Email address.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.getUser()
Getter foruser
: User ID.Setter foremail
: Email address.setResetPassword
(Boolean newResetPassword) Setter forresetPassword
: Whether the user must reset their password when they next log in.Setter forroles
: Roles or groups the user belongs to.Setter foruser
: User ID.javax.json.JsonObject
toJson()
Serializes the object to JSON.
-
Constructor Details
-
User
public User()Default constructor. -
User
public User(javax.json.JsonObject json) Constructor from JSON.- Parameters:
json
- A JSON representation of the object to construct.
-
-
Method Details
-
getUser
Getter foruser
: User ID.- Returns:
- User ID.
-
setUser
Setter foruser
: User ID.- Parameters:
newUser
- User ID.- Returns:
- A reference to this object, so that setters can be chained.
-
getEmail
Getter foremail
: Email address.- Returns:
- Email address.
-
setEmail
Setter foremail
: Email address.- Parameters:
newEmail
- Email address.- Returns:
- A reference to this object, so that setters can be chained.
-
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
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
Getter forroles
: Roles or groups the user belongs to.- Returns:
- Roles or groups the user belongs to.
-
setRoles
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.
-