Package org.apache.catalina.users
Class MemoryUser
- java.lang.Object
- 
- org.apache.catalina.users.AbstractUser
- 
- org.apache.catalina.users.MemoryUser
 
 
- 
- All Implemented Interfaces:
- java.security.Principal,- User
 
 @Deprecated public class MemoryUser extends AbstractUser Deprecated.UseAbstractUserinstead.Concrete implementation of Userfor theMemoryUserDatabaseimplementation ofUserDatabase.- Since:
- 4.1
- Author:
- Craig R. McClanahan
 
- 
- 
Field SummaryFields Modifier and Type Field Description protected MemoryUserDatabasedatabaseDeprecated.TheMemoryUserDatabasethat owns this user.protected java.util.concurrent.CopyOnWriteArrayList<Group>groupsDeprecated.The set ofGroups that this user is a member of.protected java.util.concurrent.CopyOnWriteArrayList<Role>rolesDeprecated.The set ofRoles associated with this user.- 
Fields inherited from class org.apache.catalina.users.AbstractUserfullName, password, username
 
- 
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidaddGroup(Group group)Deprecated.Add a newGroupto those this user belongs to.voidaddRole(Role role)Deprecated.Add a newRoleto those assigned specifically to this user.java.util.Iterator<Group>getGroups()Deprecated.Return the set ofGroups to which this user belongs.java.util.Iterator<Role>getRoles()Deprecated.Return the set ofRoles assigned specifically to this user.UserDatabasegetUserDatabase()Deprecated.Return theUserDatabasewithin which this User is defined.booleanisInGroup(Group group)Deprecated.Is this user in the specified group?booleanisInRole(Role role)Deprecated.Is this user specifically assigned the specifiedRole?voidremoveGroup(Group group)Deprecated.Remove aGroupfrom those this user belongs to.voidremoveGroups()Deprecated.Remove allGroups from those this user belongs to.voidremoveRole(Role role)Deprecated.Remove aRolefrom those assigned to this user.voidremoveRoles()Deprecated.Remove allRoles from those assigned to this user.java.lang.StringtoString()Deprecated.Return a String representation of this user.java.lang.StringtoXml()Deprecated.Return a String representation of this user in XML format.- 
Methods inherited from class org.apache.catalina.users.AbstractUsergetFullName, getName, getPassword, getUsername, setFullName, setPassword, setUsername
 
- 
 
- 
- 
- 
Field Detail- 
databaseprotected final MemoryUserDatabase database Deprecated.TheMemoryUserDatabasethat owns this user.
 - 
groupsprotected final java.util.concurrent.CopyOnWriteArrayList<Group> groups Deprecated.The set ofGroups that this user is a member of.
 
- 
 - 
Method Detail- 
getGroupspublic java.util.Iterator<Group> getGroups() Deprecated.Return the set ofGroups to which this user belongs.- Specified by:
- getGroupsin interface- User
- Specified by:
- getGroupsin class- AbstractUser
- Returns:
- the set of Groups to which this user belongs.
 
 - 
getRolespublic java.util.Iterator<Role> getRoles() Deprecated.Return the set ofRoles assigned specifically to this user.- Specified by:
- getRolesin interface- User
- Specified by:
- getRolesin class- AbstractUser
- Returns:
- the set of Roles assigned specifically to this user.
 
 - 
getUserDatabasepublic UserDatabase getUserDatabase() Deprecated.Return theUserDatabasewithin which this User is defined.- Returns:
- the UserDatabasewithin which this User is defined.
 
 - 
addGrouppublic void addGroup(Group group) Deprecated.Add a newGroupto those this user belongs to.- Specified by:
- addGroupin interface- User
- Specified by:
- addGroupin class- AbstractUser
- Parameters:
- group- The new group
 
 - 
addRolepublic void addRole(Role role) Deprecated.Add a newRoleto those assigned specifically to this user.- Specified by:
- addRolein interface- User
- Specified by:
- addRolein class- AbstractUser
- Parameters:
- role- The new role
 
 - 
isInGrouppublic boolean isInGroup(Group group) Deprecated.Is this user in the specified group?- Specified by:
- isInGroupin interface- User
- Specified by:
- isInGroupin class- AbstractUser
- Parameters:
- group- The group to check
- Returns:
- trueif the user is in the specified group
 
 - 
isInRolepublic boolean isInRole(Role role) Deprecated.Is this user specifically assigned the specifiedRole? This method does NOT check for roles inherited based onGroupmembership.- Specified by:
- isInRolein interface- User
- Specified by:
- isInRolein class- AbstractUser
- Parameters:
- role- The role to check
- Returns:
- trueif the user has the specified role
 
 - 
removeGrouppublic void removeGroup(Group group) Deprecated.Remove aGroupfrom those this user belongs to.- Specified by:
- removeGroupin interface- User
- Specified by:
- removeGroupin class- AbstractUser
- Parameters:
- group- The old group
 
 - 
removeGroupspublic void removeGroups() Deprecated.Remove allGroups from those this user belongs to.- Specified by:
- removeGroupsin interface- User
- Specified by:
- removeGroupsin class- AbstractUser
 
 - 
removeRolepublic void removeRole(Role role) Deprecated.Remove aRolefrom those assigned to this user.- Specified by:
- removeRolein interface- User
- Specified by:
- removeRolein class- AbstractUser
- Parameters:
- role- The old role
 
 - 
removeRolespublic void removeRoles() Deprecated.Remove allRoles from those assigned to this user.- Specified by:
- removeRolesin interface- User
- Specified by:
- removeRolesin class- AbstractUser
 
 - 
toXmlpublic java.lang.String 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
 
 - 
toStringpublic java.lang.String toString() Deprecated.Return a String representation of this user. - Specified by:
- toStringin interface- java.security.Principal
- Overrides:
- toStringin class- java.lang.Object
 
 
- 
 
-