org.apache.catalina.users
Class MemoryUser
- Principal, User
Version:
- Craig R. McClanahan
- 4.1
addGroup , addRole , getFullName , getGroups , getName , getPassword , getRoles , getUsername , isInGroup , isInRole , removeGroup , removeGroups , removeRole , removeRoles , setFullName , setPassword , setUsername |
groups
protected ArrayList groups
The set of
Group
s that this user is a member of.
roles
protected ArrayList roles
The set of
Role
s associated with this user.
addGroup
public void addGroup(Group group)
Add a new
Group
to those this user belongs to.
- addGroup in interface User
- addGroup in interface AbstractUser
group
- The new group
addRole
public void addRole(Role role)
Add a new
Role
to those assigned specifically to this user.
- addRole in interface User
- addRole in interface AbstractUser
role
- The new role
getGroups
public Iterator getGroups()
Return the set of
Group
s to which this user belongs.
- getGroups in interface User
- getGroups in interface AbstractUser
getRoles
public Iterator getRoles()
Return the set of
Role
s assigned specifically to this user.
- getRoles in interface User
- getRoles in interface AbstractUser
isInGroup
public boolean isInGroup(Group group)
Is this user in the specified group?
- isInGroup in interface User
- isInGroup in interface AbstractUser
group
- The group to check
isInRole
public boolean isInRole(Role role)
Is this user specifically assigned the specified
Role
? This
method does
NOT check for roles inherited based on
Group
membership.
- isInRole in interface User
- isInRole in interface AbstractUser
role
- The role to check
removeRole
public void removeRole(Role role)
Remove a
Role
from those assigned to this user.
- removeRole in interface User
- removeRole in interface AbstractUser
role
- The old role
toString
public 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
username
or name for the username
property.
Copyright B) 2000-2003 Apache Software Foundation. All Rights Reserved.