Package org.apache.catalina.users
Class MemoryUser
java.lang.Object
org.apache.catalina.users.AbstractUser
org.apache.catalina.users.MemoryUser
Deprecated.
Concrete implementation of User for the
MemoryUserDatabase implementation of UserDatabase.
- Since:
- 4.1
- Author:
- Craig R. McClanahan
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final MemoryUserDatabaseDeprecated.TheMemoryUserDatabasethat owns this user.protected final CopyOnWriteArrayList<Group>Deprecated.The set ofGroups that this user is a member of.protected final CopyOnWriteArrayList<Role>Deprecated.The set ofRoles associated with this user.Fields inherited from class org.apache.catalina.users.AbstractUser
fullName, password, username -
Method Summary
Modifier and TypeMethodDescriptionvoidDeprecated.Add a newGroupto those this user belongs to.voidDeprecated.Add a newRoleto those assigned specifically to this user.Deprecated.Return the set ofGroups to which this user belongs.getRoles()Deprecated.Return the set ofRoles assigned specifically to this user.Deprecated.Return theUserDatabasewithin which this User is defined.booleanDeprecated.Is this user in the specified group?booleanDeprecated.Is this user specifically assigned the specifiedRole?voidremoveGroup(Group group) Deprecated.Remove aGroupfrom those this user belongs to.voidDeprecated.Remove allGroups from those this user belongs to.voidremoveRole(Role role) Deprecated.Remove aRolefrom those assigned to this user.voidDeprecated.Remove allRoles from those assigned to this user.toString()Deprecated.Return a String representation of this user.toXml()Deprecated.Return a String representation of this user in XML format.Methods inherited from class org.apache.catalina.users.AbstractUser
getFullName, getName, getPassword, getUsername, setFullName, setPassword, setUsername
-
Field Details
-
database
Deprecated.TheMemoryUserDatabasethat owns this user. -
groups
Deprecated.The set ofGroups that this user is a member of. -
roles
Deprecated.The set ofRoles associated with this user.
-
-
Method Details
-
getGroups
Deprecated.Return the set ofGroups to which this user belongs.- Specified by:
getGroupsin interfaceUser- Specified by:
getGroupsin classAbstractUser- Returns:
- the set of
Groups to which this user belongs.
-
getRoles
Deprecated.Return the set ofRoles assigned specifically to this user.- Specified by:
getRolesin interfaceUser- Specified by:
getRolesin classAbstractUser- Returns:
- the set of
Roles assigned specifically to this user.
-
getUserDatabase
Deprecated.Return theUserDatabasewithin which this User is defined.- Returns:
- the
UserDatabasewithin which this User is defined.
-
addGroup
Deprecated.Add a newGroupto those this user belongs to.- Specified by:
addGroupin interfaceUser- Specified by:
addGroupin classAbstractUser- Parameters:
group- The new group
-
addRole
Deprecated.Add a newRoleto those assigned specifically to this user.- Specified by:
addRolein interfaceUser- Specified by:
addRolein classAbstractUser- Parameters:
role- The new role
-
isInGroup
Deprecated.Is this user in the specified group?- Specified by:
isInGroupin interfaceUser- Specified by:
isInGroupin classAbstractUser- Parameters:
group- The group to check- Returns:
trueif the user is in the specified group
-
isInRole
Deprecated.Is this user specifically assigned the specifiedRole? This method does NOT check for roles inherited based onGroupmembership.- Specified by:
isInRolein interfaceUser- Specified by:
isInRolein classAbstractUser- Parameters:
role- The role to check- Returns:
trueif the user has the specified role
-
removeGroup
Deprecated.Remove aGroupfrom those this user belongs to.- Specified by:
removeGroupin interfaceUser- Specified by:
removeGroupin classAbstractUser- Parameters:
group- The old group
-
removeGroups
public void removeGroups()Deprecated.Remove allGroups from those this user belongs to.- Specified by:
removeGroupsin interfaceUser- Specified by:
removeGroupsin classAbstractUser
-
removeRole
Deprecated.Remove aRolefrom those assigned to this user.- Specified by:
removeRolein interfaceUser- Specified by:
removeRolein classAbstractUser- Parameters:
role- The old role
-
removeRoles
public void removeRoles()Deprecated.Remove allRoles from those assigned to this user.- Specified by:
removeRolesin interfaceUser- Specified by:
removeRolesin classAbstractUser
-
toXml
Deprecated.Return a String representation of this user in XML format.
IMPLEMENTATION NOTE - For backwards compatibility, the reader that processes this entry will accept either
usernameornamefor the username property.- Returns:
- the XML representation
-
toString
Deprecated.Return a String representation of this user.
-
AbstractUserinstead.