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

@UserDataType public class User extends UserBase implements LocalStringId
This represents the common User object. Username needs to be unique when creating or updating.
See Also:
  • Field Details

    • SORT_BY_USERNAME

      public static final Integer SORT_BY_USERNAME
      Sort by the Username property
    • SORT_BY_ID

      public static final Integer SORT_BY_ID
      Sort by the Id propety
    • SORT_BY_PASSWORD

      public static final Integer SORT_BY_PASSWORD
      Sort by password
    • USER_ROLE_CREATOR

      public static final Integer USER_ROLE_CREATOR
      Creator user role for a group
    • USER_ROLE_ADMINISTRATOR

      public static final Integer USER_ROLE_ADMINISTRATOR
      Administrator user role for a group
    • USER_ROLE_MEMBER

      public static final Integer USER_ROLE_MEMBER
      Member user role for a group
    • USER_ROLE_VIEWER

      public static final Integer USER_ROLE_VIEWER
      Viewer user role for a group
  • Constructor Details

    • User

      public User()
      Default constructor.
    • User

      public User(String username)
      Contructs a User object with the given username.
      Parameters:
      username - the username
  • Method Details

    • getIdentity

      public String getIdentity()
      Specified by:
      getIdentity in interface com.appiancorp.asl3.servicefw.connect.ASLIdentity
      Specified by:
      getIdentity in interface com.appiancorp.services.ASLIdentity
      Overrides:
      getIdentity in class UserBase
    • setStringId

      public void setStringId(String id)
      Description copied from interface: LocalStringId
      Sets this object's local identifier.
      Specified by:
      setStringId in interface LocalStringId
      Parameters:
      id - ID to set
      See Also:
    • getStringId

      public String getStringId()
      Description copied from interface: LocalStringId
      Returns this object's local identifier, null if the object was not identified locally using a String Id.
      Specified by:
      getStringId in interface LocalStringId
      Returns:
      Object's Id
      See Also:
    • setPassword

      @Deprecated public void setPassword(String password)
      Deprecated.
      Since 6.0.2, use setUserPassword(byte[])
    • getPassword

      @Deprecated @Transient public String getPassword()
      Deprecated.
      Since 6.0.2, use getUserPassword()
    • 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

      public Long getId()
    • setId

      public void setId(Long id)
    • getUuid

      @ConvertWith(com.appiancorp.kougar.mapper.parameters.UuidParameterConverter.class) public String getUuid()
      The User's Universal Unique Identifier
      Returns:
      User's uuid
    • setUuid

      public void setUuid(String uuid)
      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

      public static String[] getUsernames(User[] users)
      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

      public Timestamp getPasswordModified()
      Returns the timestamp when the user's password was modified last.
    • setPasswordModified

      public void setPasswordModified(Timestamp passwordModified)
      This field cannot be set explicitly using this setter.
    • isTemporaryPassword

      public boolean isTemporaryPassword()
      Returns true if the user's password is temporary else false; see UserService#changeUserPassword(String, char[], boolean).
    • setTemporaryPassword

      public void setTemporaryPassword(boolean temporaryPassword)
      This field cannot be set explicitly using this setter; see UserService#changeUserPassword(String, char[], boolean).
    • isUserLocked

      public boolean isUserLocked()
      Returns true if the user is locked due to multiple unsuccessful login attempts else false; see UserService.loginAttempt(String,boolean) and UserService.unlockUser(String)
    • setUserLocked

      public void setUserLocked(boolean userLocked)
      This field cannot be set explicitly using this setter; see UserService.loginAttempt(String,boolean) and UserService.unlockUser(String)