Package africa.absa.inception.security
Class User
java.lang.Object
africa.absa.inception.security.User
- All Implemented Interfaces:
Serializable
The User class holds the information for a user.
- Author:
- Marcus Portmann
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanIndicates whether some other object is "equal to" this one.Returns the date and time the user was created.getEmail()Returns the e-mail address for the user.Returns the groups the user is associated with.getId()Returns the ID for the user.Returns the international format mobile number for the user.getName()Returns the name of the user.Returns the password or password hash for the user.Returns the number of failed authentication attempts as a result of an incorrect password for the user.Returns the date and time the password for the user expires.Returns the phone number for the user.Returns the preferred name for the user.Returns the status for the user.Returns the date and time the user was last updated.Returns the ID for the user directory the user is associated with.Returns the username for the user.inthashCode()Returns a hash code value for the object.booleanHas the password for the user expired?booleanisActive()Is the user active?booleanIs the user expired?booleanisLocked()Is the user locked?protected voidonCreate()The Java Persistence callback method invoked before the entity is created in the database.protected voidonUpdate()The Java Persistence callback method invoked before the entity is updated in the database.voidSet the e-mail address for the user.voidSet the groups the user is associated with.voidSet the ID for the user.voidsetMobileNumber(String mobileNumber) Set the international format mobile number for the user.voidSet the name of the user.voidsetPassword(String password) Set the password or password hash for the user.voidsetPasswordAttempts(int passwordAttempts) Set the password attempts for the user.voidsetPasswordExpiry(LocalDateTime passwordExpiry) Set the date and time the password for the user expires.voidsetPhoneNumber(String phoneNumber) Set the phone number for the user.voidsetPreferredName(String preferredName) Set the preferred name for the user.voidsetStatus(UserStatus status) Set the status for the user.voidsetUserDirectoryId(UUID userDirectoryId) Set the ID for the user directory the user is associated with.voidsetUsername(String username) Set the username for the user.
-
Constructor Details
-
User
public User()Constructs a new User.
-
-
Method Details
-
equals
Indicates whether some other object is "equal to" this one. -
getCreated
Returns the date and time the user was created.- Returns:
- the date and time the user was created
-
getEmail
Returns the e-mail address for the user.- Returns:
- the e-mail address for the user
-
getGroups
Returns the groups the user is associated with.- Returns:
- the groups the user is associated with
-
getId
Returns the ID for the user.- Returns:
- the ID for the user
-
getMobileNumber
Returns the international format mobile number for the user.- Returns:
- the international format mobile number for the user
-
getName
Returns the name of the user.- Returns:
- the name of the user
-
getPassword
Returns the password or password hash for the user.- Returns:
- the password or password hash for the user
-
getPasswordAttempts
Returns the number of failed authentication attempts as a result of an incorrect password for the user.- Returns:
- the number of failed authentication attempts as a result of an incorrect password for the user
-
getPasswordExpiry
Returns the date and time the password for the user expires.- Returns:
- the date and time the password for the user expires
-
getPhoneNumber
Returns the phone number for the user.- Returns:
- the phone number for the user
-
getPreferredName
Returns the preferred name for the user.- Returns:
- the preferred name for the user
-
getStatus
Returns the status for the user.- Returns:
- the status for the user
-
getUpdated
Returns the date and time the user was last updated.- Returns:
- the date and time the user was last updated
-
getUserDirectoryId
Returns the ID for the user directory the user is associated with.- Returns:
- the ID for the user directory the user is associated with
-
getUsername
Returns the username for the user.- Returns:
- the username for the user
-
hasPasswordExpired
public boolean hasPasswordExpired()Has the password for the user expired?- Returns:
- true if the password for the user has expired or false otherwise
-
hashCode
public int hashCode()Returns a hash code value for the object. -
isActive
public boolean isActive()Is the user active?- Returns:
- true if the user is active or false otherwise
-
isExpired
public boolean isExpired()Is the user expired?- Returns:
- true if the user is expired or false otherwise
-
isLocked
public boolean isLocked()Is the user locked?- Returns:
- true if the user is locked or false otherwise
-
setEmail
Set the e-mail address for the user.- Parameters:
email- the e-mail address for the user
-
setGroups
Set the groups the user is associated with.- Parameters:
groups- the groups the user is associated with
-
setId
Set the ID for the user.- Parameters:
id- the ID for the user
-
setMobileNumber
Set the international format mobile number for the user.- Parameters:
mobileNumber- the international format mobile number for the user
-
setName
Set the name of the user.- Parameters:
name- the name of the user
-
setPassword
Set the password or password hash for the user.- Parameters:
password- the password or password hash for the user
-
setPasswordAttempts
public void setPasswordAttempts(int passwordAttempts) Set the password attempts for the user.- Parameters:
passwordAttempts- the password attempts for the user
-
setPasswordExpiry
Set the date and time the password for the user expires.- Parameters:
passwordExpiry- the date and time the password for the user expires
-
setPhoneNumber
Set the phone number for the user.- Parameters:
phoneNumber- the phone number for the user
-
setPreferredName
Set the preferred name for the user.- Parameters:
preferredName- the preferred name for the user
-
setStatus
Set the status for the user.- Parameters:
status- the status for the user
-
setUserDirectoryId
Set the ID for the user directory the user is associated with.- Parameters:
userDirectoryId- the ID for the user directory the user is associated with
-
setUsername
Set the username for the user.- Parameters:
username- the username for the user
-
onCreate
protected void onCreate()The Java Persistence callback method invoked before the entity is created in the database. -
onUpdate
protected void onUpdate()The Java Persistence callback method invoked before the entity is updated in the database.
-