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
FieldsModifier and TypeFieldDescriptionstatic final IntegerSort by the Id propetystatic final IntegerSort by passwordstatic final IntegerSort by the Username propertystatic final IntegerAdministrator user role for a groupstatic final IntegerCreator user role for a groupstatic final IntegerMember user role for a groupstatic final IntegerViewer 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
Constructors -
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,nullif the object was not identified locally using aStringId.static String[]getUsernames(User[] users) Get the usernames (as a String array) from an array of User objects.byte[]"UTF-8"Charsetcan be used to decode the byte[] password into a String or char[].getUuid()The User's Universal Unique IdentifierbooleanReturns true if the user's password is temporary else false; seeUserService#changeUserPassword(String, char[], boolean).booleanReturns true if the user is locked due to multiple unsuccessful login attempts else false; seeUserService.loginAttempt(String,boolean)andUserService.unlockUser(String)voidvoidsetPassword(String password) Deprecated.Since 6.0.2, usesetUserPassword(byte[])voidsetPasswordModified(Timestamp passwordModified) This field cannot be set explicitly using this setter.voidsetStringId(String id) Sets this object's local identifier.voidsetTemporaryPassword(boolean temporaryPassword) This field cannot be set explicitly using this setter; seeUserService#changeUserPassword(String, char[], boolean).voidsetUserLocked(boolean userLocked) This field cannot be set explicitly using this setter; seeUserService.loginAttempt(String,boolean)andUserService.unlockUser(String)voidsetUserPassword(byte[] password) "UTF-8"Charsetmust be used to encode a String or char[] password into a byte[].voidSets 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:
getIdentityin interfacecom.appiancorp.asl3.servicefw.connect.ASLIdentity- Specified by:
getIdentityin interfacecom.appiancorp.services.ASLIdentity- Overrides:
getIdentityin classUserBase
-
setStringId
Description copied from interface:LocalStringIdSets this object's local identifier.- Specified by:
setStringIdin interfaceLocalStringId- Parameters:
id- ID to set- See Also:
-
getStringId
Description copied from interface:LocalStringIdReturns this object's local identifier,nullif the object was not identified locally using aStringId.- Specified by:
getStringIdin 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"Charsetmust 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"Charsetcan 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()