Class PubServerUser

java.lang.Object
com.priint.pubserver.usermanager.PubServerUser
All Implemented Interfaces:
Serializable

public class PubServerUser extends Object implements Serializable
Class representing a user of pubserver kernel, authenticated by some internal or external realm.
See Also:
  • Field Details

  • Constructor Details

    • PubServerUser

      public PubServerUser()
      Default constructor
    • PubServerUser

      public PubServerUser(String loginName)
      Constructor with login name. When login name is null then the IllegalArgumentException will be thrown
      Parameters:
      loginName - User loign name
  • Method Details

    • getIdentifier

      public String getIdentifier()
      Returns:
      User identifier
    • setIdentifier

      public void setIdentifier(String identifier)
      Set user identifier
    • getLoginName

      public String getLoginName()
      Returns:
      User login name
    • setLoginName

      public void setLoginName(String loginName)
      Set user login name
    • getFirstName

      public String getFirstName()
      Returns:
      User first name
    • setFirstName

      public void setFirstName(String firstName)
      Set user first name
    • getLastName

      public String getLastName()
      Returns:
      User last name
    • setLastName

      public void setLastName(String lastName)
      Set user last name
    • getEmail

      public String getEmail()
      Returns:
      User email
    • setEmail

      public void setEmail(String email)
      Set user email
    • getCreated

      public Date getCreated()
      Returns:
      Info when user was created in application
    • setCreated

      public void setCreated(Date created)
      Set value when user was created in application
    • getExpiryDate

      public Date getExpiryDate()
      Returns:
      User account expiry date
    • setExpiryDate

      public void setExpiryDate(Date expiryDate)
      Set expiry date to user account
    • getPasswordSalt

      public String getPasswordSalt()
      Returns:
      User passowrd salt
    • setPasswordSalt

      public void setPasswordSalt(String passwordSalt)
      Salt password parameter
    • getPasswordHash

      public String getPasswordHash()
      Returns:
      Encrypted user password
    • setPasswordHash

      public void setPasswordHash(String passwordHash)
      Set encrypte user password
    • isActive

      public boolean isActive()
      Returns:
      Information about whether the account is active
    • setActive

      public void setActive(boolean active)
      Set information about whether the account is active
    • isShouldChangePassword

      public boolean isShouldChangePassword()
      Returns:
      Information about whether the user should change password
    • setShouldChangePassword

      public void setShouldChangePassword(boolean shouldChangePassword)
      Set information about whether the user should change password
    • getClients

      public List<String> getClients()
    • setClients

      public void setClients(List<String> clients)
    • generateHashPassword

      public static final String generateHashPassword(String password, String encryptedPasswordSalt)
      Generate a hash for password string
      Parameters:
      password -
      encryptedPasswordSalt -
      Returns:
      hashed password
    • encryptSalt

      public static final String encryptSalt(String salt)
      This method return encrypted salt
      Parameters:
      salt -
      Returns:
      encrypted salt
    • decryptSalt

      public static final String decryptSalt(String encryptedSalt)
      Parameters:
      encryptedSalt -
      Returns:
      decrypted salt
    • generateNewSalt

      public static final String generateNewSalt()
      Returns:
      new randomly generated salt
    • getPluginConfigName

      public String getPluginConfigName()
      Gets the name of entity for the given login to use in plug-in configuration objects. E.g. "johndoe.xml"
      Returns:
      string containing repository path
    • getPluginConfigPath

      public String getPluginConfigPath()
      Gets the path of entity for the given login to use in plug-in configuration objects.
      Returns:
      string containing repository path
    • getPluginConfigPath

      public static String getPluginConfigPath(String loginName)
      Gets the path of entity for the given login to use in plug-in configuration objects.
      Returns:
      string containing repository path