Class User

java.lang.Object
org.conical.common.bbl.auth.User

public class User extends Object
Encapsulates user attributes.
Author:
rdoherty
  • Constructor Details

    • User

      public User()
  • Method Details

    • getId

      public Long getId()
    • setId

      public void setId(Long id)
    • getUsername

      public String getUsername()
    • setUsername

      public void setUsername(String username)
    • getFirstName

      public String getFirstName()
    • setFirstName

      public void setFirstName(String firstName)
    • getLastName

      public String getLastName()
    • setLastName

      public void setLastName(String lastName)
    • getTitle

      public String getTitle()
    • setTitle

      public void setTitle(String title)
    • getEmailAddress

      public String getEmailAddress()
    • setEmailAddress

      public void setEmailAddress(String emailAddress)
    • getAccessRoles

      public Set<String> getAccessRoles()
      Returns set of access roles currently given to this user
      Returns:
      set of roles
    • setAccessRoles

      public void setAccessRoles(Set<String> accessRoles)
    • hasAccessRole

      public boolean hasAccessRole(String accessRole)
      Returns true if passed role is among this user's roles, else false
      Parameters:
      accessRole - access role to test for
      Returns:
      true if user is in role, else false
    • addAccessRole

      public void addAccessRole(String accessRole)
      Adds single access role to this user
      Parameters:
      accessRole - role to add
    • addAccessRoles

      public void addAccessRoles(Collection<String> accessRoles)
      Adds multiple access roles to this user at one time
      Parameters:
      accessRoles - roles to add