Package org.europa.together.domain.acl
Class AccountDO
java.lang.Object
org.europa.together.domain.acl.AccountDO
- All Implemented Interfaces:
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 Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe name of the used database table for this domain object. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanGet the default localisation.Get the default timezone as String in the format: +/-02:00.getEmail()Get the E-Mail of an Account.Get the SALTED password (SHA3-512) of an Account.getRole()Get the Role of an Account.Get the verification code (UUID) for the DoublOptIn procedure.inthashCode()Shows if an Account is activated.Get the Registration Date of an Account, when it was created.Shows if an Account is verified.voidReset the deactivation of an Account, by erasing the deactivation date.voidAllows to block the login of an account.voidsetDefaultLocale(String defaultLocale) Set the default localisation.voidsetDefaultTimezone(String defaultTimezone) Set the default timezone in the format: +/-02:00.voidSet the E-Mail of an Account.voidsetPassword(String password) Set the password (SHA3-512) of an Account.voidSet the Registration Date of an Account, when it get created.voidSet the Role of an Account.voidsetVerificationCode(String verificationCode) Allows the auto generated verification code (UUID) during the Account creation to change.voidSet an Account to verified, if the verification process was success.During the creation process is set to false.toString()
-
Field Details
-
TABLE_NAME
The name of the used database table for this domain object.- See Also:
-
-
Constructor Details
-
AccountDO
public AccountDO()Default Constructor. -
AccountDO
Constructor.- Parameters:
email- as String
-
-
Method Details
-
hashCode
public int hashCode() -
equals
-
toString
-
getEmail
Get the E-Mail of an Account. Primary Key.- Returns:
- email as String
-
setEmail
Set the E-Mail of an Account. Primary Key.- Parameters:
email- as String
-
getPassword
Get the SALTED password (SHA3-512) of an Account.- Returns:
- password as String
-
setPassword
Set the password (SHA3-512) of an Account.
cryptoTools.calculateHash(
account.getVerificationCode() + accountID, HashAlgorithm.SHA3512);- Parameters:
password- as String
-
getRole
Get the Role of an Account.- Returns:
- role as Object
-
setRole
Set the Role of an Account.- Parameters:
role- as Object
-
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
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
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
Get the verification code (UUID) for the DoublOptIn procedure.- Returns:
- verificationCode as String
-
setVerificationCode
Allows the auto generated verification code (UUID) during the Account creation to change.- Parameters:
verificationCode- as String
-
getDefaultLocale
Get the default localisation.- Returns:
- locale as String
-
setDefaultLocale
Set the default localisation.- Parameters:
defaultLocale- as String
-
getDefaultTimezone
Get the default timezone as String in the format: +/-02:00.- Returns:
- timezone as String
-
setDefaultTimezone
Set the default timezone in the format: +/-02:00.- Parameters:
defaultTimezone- as String
-