org.apache.catalina.users
public class MemoryUser extends AbstractUser
Concrete implementation of User for the MemoryUserDatabase implementation of UserDatabase.
Since: 4.1
Version: $Revision: 467222 $ $Date: 2006-10-24 05:17:11 +0200 (Tue, 24 Oct 2006) $
Field Summary | |
---|---|
protected MemoryUserDatabase | database
The MemoryUserDatabase that owns this user. |
protected ArrayList | groups
The set of Groups that this user is a member of. |
protected ArrayList | roles
The set of Roles associated with this user. |
Method Summary | |
---|---|
void | addGroup(Group group)
Add a new Group to those this user belongs to.
|
void | addRole(Role role)
Add a new Role to those assigned specifically to this user.
|
Iterator | getGroups()
Return the set of Groups to which this user belongs. |
Iterator | getRoles()
Return the set of Roles assigned specifically to this user. |
UserDatabase | getUserDatabase()
Return the UserDatabase within which this User is defined. |
boolean | isInGroup(Group group)
Is this user in the specified group?
|
boolean | isInRole(Role role)
Is this user specifically assigned the specified Role? |
void | removeGroup(Group group)
Remove a Group from those this user belongs to.
|
void | removeGroups()
Remove all Groups from those this user belongs to. |
void | removeRole(Role role)
Remove a Role from those assigned to this user.
|
void | removeRoles()
Remove all Roles from those assigned to this user. |
String | toString() Return a String representation of this user in XML format. IMPLEMENTATION NOTE - For backwards compatibility,
the reader that processes this entry will accept either
|
Parameters: group The new group
Parameters: role The new role
Parameters: group The group to check
Parameters: role The role to check
Parameters: group The old group
Parameters: role The old role
Return a String representation of this user in XML format.
IMPLEMENTATION NOTE - For backwards compatibility,
the reader that processes this entry will accept either
username
or name for the username
property.