|
Apache Tomcat 6.0.53 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.catalina.users.AbstractUser org.apache.catalina.users.MemoryUser
public class MemoryUser
Concrete implementation of User
for the
MemoryUserDatabase
implementation of UserDatabase
.
Field Summary | |
---|---|
protected MemoryUserDatabase |
database
The MemoryUserDatabase that owns this user. |
protected java.util.ArrayList |
groups
The set of Group s that this user is a member of. |
protected java.util.ArrayList |
roles
The set of Role s associated with this user. |
Fields inherited from class org.apache.catalina.users.AbstractUser |
---|
fullName, password, username |
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. |
java.util.Iterator |
getGroups()
Return the set of Group s to which this user belongs. |
java.util.Iterator |
getRoles()
Return the set of Role s 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 Group s from those this user belongs to. |
void |
removeRole(Role role)
Remove a Role from those assigned to this user. |
void |
removeRoles()
Remove all Role s from those assigned to this user. |
java.lang.String |
toString()
Return a String representation of this user. |
java.lang.String |
toXml()
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 |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.security.Principal |
---|
equals, hashCode |
Field Detail |
---|
protected MemoryUserDatabase database
MemoryUserDatabase
that owns this user.
protected java.util.ArrayList groups
Group
s that this user is a member of.
protected java.util.ArrayList roles
Role
s associated with this user.
Method Detail |
---|
public java.util.Iterator getGroups()
Group
s to which this user belongs.
getGroups
in interface User
getGroups
in class AbstractUser
public java.util.Iterator getRoles()
Role
s assigned specifically to this user.
getRoles
in interface User
getRoles
in class AbstractUser
public UserDatabase getUserDatabase()
UserDatabase
within which this User is defined.
public void addGroup(Group group)
Group
to those this user belongs to.
addGroup
in interface User
addGroup
in class AbstractUser
group
- The new grouppublic void addRole(Role role)
Role
to those assigned specifically to this user.
addRole
in interface User
addRole
in class AbstractUser
role
- The new rolepublic boolean isInGroup(Group group)
isInGroup
in interface User
isInGroup
in class AbstractUser
group
- The group to checkpublic boolean isInRole(Role role)
Role
? This
method does NOT check for roles inherited based on
Group
membership.
isInRole
in interface User
isInRole
in class AbstractUser
role
- The role to checkpublic void removeGroup(Group group)
Group
from those this user belongs to.
removeGroup
in interface User
removeGroup
in class AbstractUser
group
- The old grouppublic void removeGroups()
Group
s from those this user belongs to.
removeGroups
in interface User
removeGroups
in class AbstractUser
public void removeRole(Role role)
Role
from those assigned to this user.
removeRole
in interface User
removeRole
in class AbstractUser
role
- The old rolepublic void removeRoles()
Role
s from those assigned to this user.
removeRoles
in interface User
removeRoles
in class AbstractUser
public java.lang.String toXml()
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.
public java.lang.String toString()
Return a String representation of this user.
toString
in interface java.security.Principal
toString
in class java.lang.Object
|
Apache Tomcat 6.0.53 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |