Package org.apache.catalina.users
Class GenericUser<UD extends UserDatabase>
java.lang.Object
org.apache.catalina.users.AbstractUser
org.apache.catalina.users.GenericUser<UD>
- Type Parameters:
- UD- The specific type of UserDase with which this role is associated
- Direct Known Subclasses:
- MemoryUser
 Concrete implementation of User for a UserDatabase.
 
- Author:
- Craig R. McClanahan
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected final UDTheUserDatabasethat owns this user.protected final CopyOnWriteArrayList<Group>The set ofGroups that this user is a member of.protected final CopyOnWriteArrayList<Role>The set ofRoles associated with this user.Fields inherited from class org.apache.catalina.users.AbstractUserfullName, password, username
- 
Method SummaryModifier and TypeMethodDescriptionvoidAdd a newGroupto those this user belongs to.voidAdd aRoleto those assigned specifically to this user.booleangetRoles()inthashCode()booleanIs this user in the specifiedGroup?booleanIs this user specifically assigned the specifiedRole?voidremoveGroup(Group group) Remove aGroupfrom those this user belongs to.voidRemove allGroups from those this user belongs to.voidremoveRole(Role role) Remove aRolefrom those assigned to this user.voidRemove allRoles from those assigned to this user.voidsetFullName(String fullName) Set the full name of this user.voidsetPassword(String password) Set the logon password of this user, optionally prefixed with the identifier of an encoding scheme surrounded by curly braces, such as{md5}xxxxx.voidsetUsername(String username) Set the logon username of this user, which must be unique within the scope of aUserDatabase.Methods inherited from class org.apache.catalina.users.AbstractUsergetFullName, getName, getPassword, getUsername
- 
Field Details- 
databaseTheUserDatabasethat owns this user.
- 
groupsThe set ofGroups that this user is a member of.
- 
rolesThe set ofRoles associated with this user.
 
- 
- 
Method Details- 
getGroups- Returns:
- the set of Groups to which this user belongs.
 
- 
getRoles- Returns:
- the set of Roles assigned specifically to this user.
 
- 
getUserDatabase- Returns:
- the UserDatabasewithin which this User is defined.
 
- 
addGroupDescription copied from interface:UserAdd a newGroupto those this user belongs to.- Parameters:
- group- The new group
 
- 
addRoleDescription copied from interface:UserAdd aRoleto those assigned specifically to this user.- Parameters:
- role- The new role
 
- 
isInGroupDescription copied from interface:UserIs this user in the specifiedGroup?- Parameters:
- group- The group to check
- Returns:
- trueif the user is in the specified group
 
- 
isInRoleDescription copied from interface:UserIs this user specifically assigned the specifiedRole? This method does NOT check for roles inherited based onGroupmembership.- Parameters:
- role- The role to check
- Returns:
- trueif the user has the specified role
 
- 
removeGroupDescription copied from interface:UserRemove aGroupfrom those this user belongs to.- Parameters:
- group- The old group
 
- 
removeGroupspublic void removeGroups()Description copied from interface:UserRemove allGroups from those this user belongs to.
- 
removeRoleDescription copied from interface:UserRemove aRolefrom those assigned to this user.- Parameters:
- role- The old role
 
- 
removeRolespublic void removeRoles()Description copied from interface:UserRemove allRoles from those assigned to this user.
- 
setFullNameDescription copied from interface:UserSet the full name of this user.- Specified by:
- setFullNamein interface- User
- Overrides:
- setFullNamein class- AbstractUser
- Parameters:
- fullName- The new full name
 
- 
setPasswordDescription copied from interface:UserSet the logon password of this user, optionally prefixed with the identifier of an encoding scheme surrounded by curly braces, such as{md5}xxxxx.- Specified by:
- setPasswordin interface- User
- Overrides:
- setPasswordin class- AbstractUser
- Parameters:
- password- The new logon password
 
- 
setUsernameDescription copied from interface:UserSet the logon username of this user, which must be unique within the scope of aUserDatabase.- Specified by:
- setUsernamein interface- User
- Overrides:
- setUsernamein class- AbstractUser
- Parameters:
- username- The new logon username
 
- 
equals
- 
hashCodepublic int hashCode()
 
-