Class JKUser

java.lang.Object
com.jk.core.security.JKUser

public class JKUser extends Object
This class represents a user in the framework.
Version:
1.0
Author:
Dr. Jalal H. Kiswani
  • Field Details

    • plainPassword

      public String plainPassword
      Represents the plain password.
  • Constructor Details

    • JKUser

      public JKUser()
      This method constructs a new JKUser.
    • JKUser

      public JKUser(int userRecordId)
      This method constructs a new JKUser with the specified identifier (ID).
      Parameters:
      userRecordId - Specifies the user identifier (ID).
    • JKUser

      public JKUser(int id, String name, String fullName)
      This method constructs a new JKUser 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

      public String getFullName()
      This method gets the user full name.
      Returns:
      the user full name.
    • getPassword

      public Password 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

      public String 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

      public void setFullName(String name)
      This method sets the full name to the provided value.
      Parameters:
      name - Specifies the new full name.
    • setPassword

      public void setPassword(Password password)
      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

      public void setUserName(String userName)
      This method sets the user name to the provided value.
      Parameters:
      userName - Specifies the new user name.
    • setPriviliges

      public void setPriviliges(List<JKPrivilige> priviliges)
      This method sets the privileges list to the provided one.
      Parameters:
      priviliges - Specifies the new list of the privileges.
    • getPriviliges

      public List<JKPrivilige> getPriviliges()
      This method gets the privileges list.
      Returns:
      the privileges list.
    • create

      public static JKUser create()
      This method creates a new JKUser.
      Returns:
      a new instance of a user.
    • userName

      public JKUser userName(String userName)
      This method creates a new JKUser with the specified name.
      Parameters:
      userName - Specifies the user name.
      Returns:
      a new instance of a user.
    • password

      public JKUser password(Password password)
      This method sets the user password to the provided value.
      Parameters:
      password - Specifies the user password.
      Returns:
      the updated user.
    • getPlainPassword

      public String getPlainPassword()
      This method gets the plain password.
      Returns:
      the plain password.
    • setPlainPassword

      public void setPlainPassword(String plainPassword)
      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

      public JKUser plainPassword(char[] password)
      This method sets the user's password using a character array.
      Parameters:
      password - Specifies the password.
      Returns:
      the updated user.