Package org.conical.common.bbl.auth
Class User
java.lang.Object
org.conical.common.bbl.auth.User
Encapsulates user attributes.
- Author:
- rdoherty
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addAccessRole
(String accessRole) Adds single access role to this uservoid
addAccessRoles
(Collection<String> accessRoles) Adds multiple access roles to this user at one timeReturns set of access roles currently given to this usergetId()
getTitle()
boolean
hasAccessRole
(String accessRole) Returns true if passed role is among this user's roles, else falsevoid
setAccessRoles
(Set<String> accessRoles) void
setEmailAddress
(String emailAddress) void
setFirstName
(String firstName) void
void
setLastName
(String lastName) void
void
setUsername
(String username)
-
Constructor Details
-
User
public User()
-
-
Method Details
-
getId
-
setId
-
getUsername
-
setUsername
-
getFirstName
-
setFirstName
-
getLastName
-
setLastName
-
getTitle
-
setTitle
-
getEmailAddress
-
setEmailAddress
-
getAccessRoles
Returns set of access roles currently given to this user- Returns:
- set of roles
-
setAccessRoles
-
hasAccessRole
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
Adds single access role to this user- Parameters:
accessRole
- role to add
-
addAccessRoles
Adds multiple access roles to this user at one time- Parameters:
accessRoles
- roles to add
-