Class User
java.lang.Object
com.appiancorp.suiteapi.personalization.UserBase
com.appiancorp.suiteapi.personalization.User
- All Implemented Interfaces:
com.appiancorp.asl3.servicefw.connect.ASLIdentity
,com.appiancorp.services.ASLIdentity
,LocalStringId
,Serializable
- Direct Known Subclasses:
UserProfile
This represents the common User object. Username needs to be unique when creating or updating.
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionstatic final Integer
Sort by the Id propetystatic final Integer
Sort by passwordstatic final Integer
Sort by the Username propertystatic final Integer
Administrator user role for a groupstatic final Integer
Creator user role for a groupstatic final Integer
Member user role for a groupstatic final Integer
Viewer user role for a groupFields inherited from class com.appiancorp.suiteapi.personalization.UserBase
SORT_BY_DISPLAYNAME, SORT_BY_EMAIL, SORT_BY_FIRSTNAME, SORT_BY_LASTNAME, SORT_BY_MIDDLENAME, SORT_BY_SOCIALSECURITYNUMBER, STATUS_ACTIVE, STATUS_DEACTIVATED
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetId()
Alias for the the User's uuid {getUuid()
Deprecated.Returns the timestamp when the user's password was modified last.Returns this object's local identifier,null
if the object was not identified locally using aString
Id.static String[]
getUsernames
(User[] users) Get the usernames (as a String array) from an array of User objects.byte[]
"UTF-8"Charset
can be used to decode the byte[] password into a String or char[].getUuid()
The User's Universal Unique Identifierboolean
Returns true if the user's password is temporary else false; seeUserService#changeUserPassword(String, char[], boolean)
.boolean
Returns true if the user is locked due to multiple unsuccessful login attempts else false; seeUserService.loginAttempt(String,boolean)
andUserService.unlockUser(String)
void
void
setPassword
(String password) Deprecated.Since 6.0.2, usesetUserPassword(byte[])
void
setPasswordModified
(Timestamp passwordModified) This field cannot be set explicitly using this setter.void
setStringId
(String id) Sets this object's local identifier.void
setTemporaryPassword
(boolean temporaryPassword) This field cannot be set explicitly using this setter; seeUserService#changeUserPassword(String, char[], boolean)
.void
setUserLocked
(boolean userLocked) This field cannot be set explicitly using this setter; seeUserService.loginAttempt(String,boolean)
andUserService.unlockUser(String)
void
setUserPassword
(byte[] password) "UTF-8"Charset
must be used to encode a String or char[] password into a byte[].void
Sets the User's uuid to the given uuid.Methods inherited from class com.appiancorp.suiteapi.personalization.UserBase
getDisplayName, getEmail, getFavorite, getFirstName, getLastName, getMiddleName, getSocialSecurityNumber, getStatus, getUsername, setDisplayName, setEmail, setFavorite, setFirstName, setLastName, setMiddleName, setSocialSecurityNumber, setStatus, setUsername
-
Field Details
-
SORT_BY_USERNAME
Sort by the Username property -
SORT_BY_ID
Sort by the Id propety -
SORT_BY_PASSWORD
Sort by password -
USER_ROLE_CREATOR
Creator user role for a group -
USER_ROLE_ADMINISTRATOR
Administrator user role for a group -
USER_ROLE_MEMBER
Member user role for a group -
USER_ROLE_VIEWER
Viewer user role for a group
-
-
Constructor Details
-
User
public User()Default constructor. -
User
Contructs a User object with the given username.- Parameters:
username
- the username
-
-
Method Details
-
getIdentity
- Specified by:
getIdentity
in interfacecom.appiancorp.asl3.servicefw.connect.ASLIdentity
- Specified by:
getIdentity
in interfacecom.appiancorp.services.ASLIdentity
- Overrides:
getIdentity
in classUserBase
-
setStringId
Description copied from interface:LocalStringId
Sets this object's local identifier.- Specified by:
setStringId
in interfaceLocalStringId
- Parameters:
id
- ID to set- See Also:
-
getStringId
Description copied from interface:LocalStringId
Returns this object's local identifier,null
if the object was not identified locally using aString
Id.- Specified by:
getStringId
in interfaceLocalStringId
- Returns:
- Object's Id
- See Also:
-
setPassword
Deprecated.Since 6.0.2, usesetUserPassword(byte[])
-
getPassword
Deprecated.Since 6.0.2, usegetUserPassword()
-
setUserPassword
public void setUserPassword(byte[] password) "UTF-8"Charset
must be used to encode a String or char[] password into a byte[]. Note: it is recommended to use char[] to store password and flush the array after the use. See this reference guide.- Parameters:
password
- password as byte array
-
getUserPassword
public byte[] getUserPassword()"UTF-8"Charset
can be used to decode the byte[] password into a String or char[]. Note: it is recommended to use char[] to store password and flush the array after the use. See this reference guide. return password as byte array -
getId
-
setId
-
getUuid
@ConvertWith(com.appiancorp.kougar.mapper.parameters.UuidParameterConverter.class) public String getUuid()The User's Universal Unique Identifier- Returns:
- User's uuid
-
setUuid
Sets the User's uuid to the given uuid.- Parameters:
uuid
- the
-
getIdentifier
@Transient @ConvertWith(com.appiancorp.kougar.mapper.parameters.UuidParameterConverter.class) public String getIdentifier()Alias for the the User's uuid {getUuid()
- Returns:
- User's uuid
-
getUsernames
Get the usernames (as a String array) from an array of User objects.- Parameters:
users
- an array of Users- Returns:
- an array of the same size as the given array, containing the usernames of the given Users; if given array is null, returns null
-
getPasswordModified
Returns the timestamp when the user's password was modified last. -
setPasswordModified
This field cannot be set explicitly using this setter. -
isTemporaryPassword
public boolean isTemporaryPassword()Returns true if the user's password is temporary else false; seeUserService#changeUserPassword(String, char[], boolean)
. -
setTemporaryPassword
public void setTemporaryPassword(boolean temporaryPassword) This field cannot be set explicitly using this setter; seeUserService#changeUserPassword(String, char[], boolean)
. -
isUserLocked
public boolean isUserLocked()Returns true if the user is locked due to multiple unsuccessful login attempts else false; seeUserService.loginAttempt(String,boolean)
andUserService.unlockUser(String)
-
setUserLocked
public void setUserLocked(boolean userLocked) This field cannot be set explicitly using this setter; seeUserService.loginAttempt(String,boolean)
andUserService.unlockUser(String)
-
getUserPassword()