java.lang.Object
com.broadleafcommerce.notification.service.provider.external.domain.user.AdminUser
All Implemented Interfaces:
Serializable

public class AdminUser extends Object implements Serializable
Represents a user of the admin application.
Author:
Susana Cruz (susanaccruz)
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected boolean
     
    boolean
     
    The ids of applications this user is a member of.
    The default communication preference of the user.
    The email address of the user.
    The unique identifier for this user.
    The name of this user.
    The phone number of the user.
    The id of the tenant this user is associated with.
    The username of this user, used to log into the application.
    int
     
    boolean
    A flag indicating whether the admin user account is enabled.
    boolean
    Indicates whether this user has access at the application level or not.
    boolean
    A flag indicating whether the admin user account requires a password reset.
    boolean
    A flag indicating whether the admin user account is expired.
    boolean
    If true, this user is a global user, meaning that they can access the global applications.
    boolean
    A flag indicating whether the admin user account is locked due to too many failed login attempts.
    boolean
    Indicates whether this user has access at the tenant level or not.
    void
    setActive(boolean active)
    A flag indicating whether the admin user account is enabled.
    void
    setApplicationAccess(boolean applicationAccess)
    Indicates whether this user has access at the application level or not.
    void
    setApplicationIds(Set<String> applicationIds)
    The ids of applications this user is a member of.
    void
    setChangePasswordRequired(boolean changePasswordRequired)
    A flag indicating whether the admin user account requires a password reset.
    void
    setDefaultCommunicationPreference(String defaultCommunicationPreference)
    The default communication preference of the user.
    void
    The email address of the user.
    void
    setExpired(boolean expired)
    A flag indicating whether the admin user account is expired.
    void
    setGlobal(boolean global)
    If true, this user is a global user, meaning that they can access the global applications.
    void
    The unique identifier for this user.
    void
    setLocked(boolean locked)
    A flag indicating whether the admin user account is locked due to too many failed login attempts.
    void
    The name of this user.
    void
    The phone number of the user.
    void
    setTenantAccess(boolean tenantAccess)
    Indicates whether this user has access at the tenant level or not.
    void
    setTenantId(String tenantId)
    The id of the tenant this user is associated with.
    void
    setUsername(String username)
    The username of this user, used to log into the application.
     

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • AdminUser

      public AdminUser()
  • Method Details

    • getId

      public String getId()
      The unique identifier for this user.
    • getName

      public String getName()
      The name of this user.
    • getUsername

      public String getUsername()
      The username of this user, used to log into the application. May be the same as email, but that is not necessary.
    • getEmail

      public String getEmail()
      The email address of the user.
    • getPhone

      public String getPhone()
      The phone number of the user.
    • getDefaultCommunicationPreference

      public String getDefaultCommunicationPreference()
      The default communication preference of the user.
    • isGlobal

      public boolean isGlobal()
      If true, this user is a global user, meaning that they can access the global applications. If not, the user can only access the applications they are assigned to via applicationIds.
      Returns:
      true if the user is a global user which can access global applications, false if the user can only access applications they are assigned to
    • isActive

      public boolean isActive()
      A flag indicating whether the admin user account is enabled. If false, they will not be able to log in.

      This flag should be used if the admin user needs to be enabled/disabled for administrative reasons.

      Returns:
      true if the admin user account is enabled, false otherwise
    • isLocked

      public boolean isLocked()
      A flag indicating whether the admin user account is locked due to too many failed login attempts.
      Returns:
      true if the admin user account is locked, false otherwise
    • isExpired

      public boolean isExpired()
      A flag indicating whether the admin user account is expired. If false, they will not be able to log in.

      This flag can be used to declare an account as expired and unusable, but currently there is no logic for that. It will always be false.

      Returns:
      true if the admin user account is expired, false otherwise
    • isChangePasswordRequired

      public boolean isChangePasswordRequired()
      A flag indicating whether the admin user account requires a password reset. If true, they will not be able to log in until they reset their password.
      Returns:
      true if the admin user's password is expired and requires a reset, false otherwise
    • getApplicationIds

      public Set<String> getApplicationIds()
      The ids of applications this user is a member of.
    • getTenantId

      public String getTenantId()
      The id of the tenant this user is associated with.
    • isTenantAccess

      public boolean isTenantAccess()
      Indicates whether this user has access at the tenant level or not.
      Returns:
      Does this user have tenant level access?
    • isApplicationAccess

      public boolean isApplicationAccess()
      Indicates whether this user has access at the application level or not.
      Returns:
      Does this user have application level access?
    • setId

      public void setId(String id)
      The unique identifier for this user.
    • setName

      public void setName(String name)
      The name of this user.
    • setUsername

      public void setUsername(String username)
      The username of this user, used to log into the application. May be the same as email, but that is not necessary.
    • setEmail

      public void setEmail(String email)
      The email address of the user.
    • setPhone

      public void setPhone(String phone)
      The phone number of the user.
    • setDefaultCommunicationPreference

      public void setDefaultCommunicationPreference(String defaultCommunicationPreference)
      The default communication preference of the user.
    • setGlobal

      public void setGlobal(boolean global)
      If true, this user is a global user, meaning that they can access the global applications. If not, the user can only access the applications they are assigned to via applicationIds.
      Parameters:
      global - true if the user is a global user which can access global applications, false if the user can only access applications they are assigned to
    • setActive

      public void setActive(boolean active)
      A flag indicating whether the admin user account is enabled. If false, they will not be able to log in.

      This flag should be used if the admin user needs to be enabled/disabled for administrative reasons.

      Parameters:
      active - true if the admin user account is enabled, false otherwise
    • setLocked

      public void setLocked(boolean locked)
      A flag indicating whether the admin user account is locked due to too many failed login attempts.
      Parameters:
      locked - true if the admin user account is locked, false otherwise
    • setExpired

      public void setExpired(boolean expired)
      A flag indicating whether the admin user account is expired. If false, they will not be able to log in.

      This flag can be used to declare an account as expired and unusable, but currently there is no logic for that. It will always be false.

      Parameters:
      expired - true if the admin user account is expired, false otherwise
    • setChangePasswordRequired

      public void setChangePasswordRequired(boolean changePasswordRequired)
      A flag indicating whether the admin user account requires a password reset. If true, they will not be able to log in until they reset their password.
      Parameters:
      changePasswordRequired - true if the admin user's password is expired and requires a reset, false otherwise
    • setApplicationIds

      public void setApplicationIds(Set<String> applicationIds)
      The ids of applications this user is a member of.
    • setTenantId

      public void setTenantId(String tenantId)
      The id of the tenant this user is associated with.
    • setTenantAccess

      public void setTenantAccess(boolean tenantAccess)
      Indicates whether this user has access at the tenant level or not.
      Parameters:
      tenantAccess - Does this user have tenant level access?
    • setApplicationAccess

      public void setApplicationAccess(boolean applicationAccess)
      Indicates whether this user has access at the application level or not.
      Parameters:
      applicationAccess - Does this user have application level access?
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object