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 String
The name of the used database table for this domain object. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
Get 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.int
hashCode()
Shows if an Account is activated.Get the Registration Date of an Account, when it was created.Shows if an Account is verified.void
Reset the deactivation of an Account, by erasing the deactivation date.void
Allows to block the login of an account.void
setDefaultLocale
(String defaultLocale) Set the default localisation.void
setDefaultTimezone
(String defaultTimezone) Set the default timezone in the format: +/-02:00.void
Set the E-Mail of an Account.void
setPassword
(String password) Set the password (SHA3-512) of an Account.void
Set the Registration Date of an Account, when it get created.void
Set the Role of an Account.void
setVerificationCode
(String verificationCode) Allows the auto generated verification code (UUID) during the Account creation to change.void
Set 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
-