Package com.jk.core.security
Class JKUser
java.lang.Object
com.jk.core.security.JKUser
This class represents a user in the framework.
- Version:
- 1.0
- Author:
- Dr. Jalal H. Kiswani
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic JKUser
create()
This method creates a newJKUser
.This method gets the user full name.int
getId()
This method gets the user identifier (ID).This method gets the user password.This method gets the plain password.This method gets the privileges list.int
This method gets the user status.This method gets the user name.boolean
This method checks if the user is disabled.This method sets the user password to the provided value.plainPassword
(char[] password) This method sets the user's password using a character array.void
setDisabled
(boolean disabled) This method sets the user's disabled status.void
setFullName
(String name) This method sets the full name to the provided value.void
setId
(int id) This method sets the user identifier (ID).void
setPassword
(Password password) This method sets the password to the provided value.void
setPlainPassword
(String plainPassword) This method sets the plain user password.void
setPriviliges
(List<JKPrivilige> priviliges) This method sets the privileges list to the provided one.void
setStatus
(int status) This method sets the status to the provided value.void
setUserName
(String userName) This method sets the user name to the provided value.This method creates a newJKUser
with the specified name.
-
Field Details
-
plainPassword
Represents the plain password.
-
-
Constructor Details
-
JKUser
public JKUser()This method constructs a newJKUser
. -
JKUser
public JKUser(int userRecordId) This method constructs a newJKUser
with the specified identifier (ID).- Parameters:
userRecordId
- Specifies the user identifier (ID).
-
JKUser
This method constructs a newJKUser
with the specified identifier (ID), name, and full name.- Parameters:
id
- Specifies the user identifier (ID).name
- Specifies the user name.fullName
- Specifies the suer full name.
-
-
Method Details
-
getFullName
This method gets the user full name.- Returns:
- the user full name.
-
getPassword
This method gets the user password.- Returns:
- the user password.
-
getStatus
public int getStatus()This method gets the user status.- Returns:
- the user status.
-
getUserName
This method gets the user name.- Returns:
- the user name.
-
isDisabled
public boolean isDisabled()This method checks if the user is disabled.- Returns:
- true, if the user is disabled, false otherwise.
-
setDisabled
public void setDisabled(boolean disabled) This method sets the user's disabled status.- Parameters:
disabled
- Specifies the new disabled status.
-
setFullName
This method sets the full name to the provided value.- Parameters:
name
- Specifies the new full name.
-
setPassword
This method sets the password to the provided value.- Parameters:
password
- Specifies the new password.
-
setStatus
public void setStatus(int status) This method sets the status to the provided value.- Parameters:
status
- Specifies the new status.
-
setUserName
This method sets the user name to the provided value.- Parameters:
userName
- Specifies the new user name.
-
setPriviliges
This method sets the privileges list to the provided one.- Parameters:
priviliges
- Specifies the new list of the privileges.
-
getPriviliges
This method gets the privileges list.- Returns:
- the privileges list.
-
create
This method creates a newJKUser
.- Returns:
- a new instance of a user.
-
userName
This method creates a newJKUser
with the specified name.- Parameters:
userName
- Specifies the user name.- Returns:
- a new instance of a user.
-
password
This method sets the user password to the provided value.- Parameters:
password
- Specifies the user password.- Returns:
- the updated user.
-
getPlainPassword
This method gets the plain password.- Returns:
- the plain password.
-
setPlainPassword
This method sets the plain user password.- Parameters:
plainPassword
- Specifies the new plain user password.
-
setId
public void setId(int id) This method sets the user identifier (ID).- Parameters:
id
- Specifies the new user identifier (ID).
-
getId
public int getId()This method gets the user identifier (ID).- Returns:
- the user identifier (ID).
-
plainPassword
This method sets the user's password using a character array.- Parameters:
password
- Specifies the password.- Returns:
- the updated user.
-