Class AccountDO

java.lang.Object
org.europa.together.domain.acl.AccountDO
All Implemented Interfaces:
Serializable

@Entity public class AccountDO extends Object implements Serializable
USER ACCOUNT OBJECT. A user can have only one Role. The timestamp is stored in UTC format and need transformed to the client timezone.
See Also:
  • Field Details

    • TABLE_NAME

      public static final String TABLE_NAME
      The name of the used database table for this domain object.
      See Also:
  • Constructor Details

    • AccountDO

      public AccountDO()
      Default Constructor.
    • AccountDO

      public AccountDO(String email)
      Constructor.
      Parameters:
      email - as String
  • Method Details

    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getEmail

      public String getEmail()
      Get the E-Mail of an Account. Primary Key.
      Returns:
      email as String
    • setEmail

      public void setEmail(String email)
      Set the E-Mail of an Account. Primary Key.
      Parameters:
      email - as String
    • getPassword

      public String getPassword()
      Get the SALTED password (SHA3-512) of an Account.
      Returns:
      password as String
    • setPassword

      public void setPassword(String password)
      Set the password (SHA3-512) of an Account.
      cryptoTools.calculateHash(
      account.getVerificationCode() + accountID, HashAlgorithm.SHA3512);
      Parameters:
      password - as String
    • getRole

      public RolesDO getRole()
      Get the Role of an Account.
      Returns:
      role as Object
    • setRole

      public void setRole(RolesDO role)
      Set the Role of an Account.
      Parameters:
      role - as Object
    • isRegistered

      public Date isRegistered()
      Get the Registration Date of an Account, when it was created.
      Returns:
      registrationDate as Timestamp
    • setRegistered

      public void setRegistered()
      Set the Registration Date of an Account, when it get created.
    • isVerified

      public Date isVerified()
      Shows if an Account is verified.
      Returns:
      true on success
    • setVerified

      public void setVerified()
      Set an Account to verified, if the verification process was success.During the creation process is set to false.
    • isDeactivated

      public Date isDeactivated()
      Shows if an Account is activated. Deactivated Accounts can not Login.
      Returns:
      true on success.
    • setDeactivated

      public void setDeactivated()
      Allows to block the login of an account.
    • reactivateAccount

      public void reactivateAccount()
      Reset the deactivation of an Account, by erasing the deactivation date.
    • getVerificationCode

      public String getVerificationCode()
      Get the verification code (UUID) for the DoublOptIn procedure.
      Returns:
      verificationCode as String
    • setVerificationCode

      public void setVerificationCode(String verificationCode)
      Allows the auto generated verification code (UUID) during the Account creation to change.
      Parameters:
      verificationCode - as String
    • getDefaultLocale

      public String getDefaultLocale()
      Get the default localisation.
      Returns:
      locale as String
    • setDefaultLocale

      public void setDefaultLocale(String defaultLocale)
      Set the default localisation.
      Parameters:
      defaultLocale - as String
    • getDefaultTimezone

      public String getDefaultTimezone()
      Get the default timezone as String in the format: +/-02:00.
      Returns:
      timezone as String
    • setDefaultTimezone

      public void setDefaultTimezone(String defaultTimezone)
      Set the default timezone in the format: +/-02:00.
      Parameters:
      defaultTimezone - as String