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
Modifier and TypeFieldDescriptionprotected final MemoryUserDatabase
Deprecated.TheMemoryUserDatabase
that owns this user.protected final CopyOnWriteArrayList<Group>
Deprecated.The set ofGroup
s that this user is a member of.protected final CopyOnWriteArrayList<Role>
Deprecated.The set ofRole
s associated with this user.Fields inherited from class org.apache.catalina.users.AbstractUser
fullName, password, username
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Deprecated.Add a newGroup
to those this user belongs to.void
Deprecated.Add a newRole
to those assigned specifically to this user.Deprecated.Return the set ofGroup
s to which this user belongs.getRoles()
Deprecated.Return the set ofRole
s assigned specifically to this user.Deprecated.Return theUserDatabase
within which this User is defined.boolean
Deprecated.Is this user in the specified group?boolean
Deprecated.Is this user specifically assigned the specifiedRole
?void
removeGroup
(Group group) Deprecated.Remove aGroup
from those this user belongs to.void
Deprecated.Remove allGroup
s from those this user belongs to.void
removeRole
(Role role) Deprecated.Remove aRole
from those assigned to this user.void
Deprecated.Remove allRole
s 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.TheMemoryUserDatabase
that owns this user. -
groups
Deprecated.The set ofGroup
s that this user is a member of. -
roles
Deprecated.The set ofRole
s associated with this user.
-
-
Method Details
-
getGroups
Deprecated.Return the set ofGroup
s to which this user belongs.- Specified by:
getGroups
in interfaceUser
- Specified by:
getGroups
in classAbstractUser
- Returns:
- the set of
Group
s to which this user belongs.
-
getRoles
Deprecated.Return the set ofRole
s assigned specifically to this user.- Specified by:
getRoles
in interfaceUser
- Specified by:
getRoles
in classAbstractUser
- Returns:
- the set of
Role
s assigned specifically to this user.
-
getUserDatabase
Deprecated.Return theUserDatabase
within which this User is defined.- Returns:
- the
UserDatabase
within which this User is defined.
-
addGroup
Deprecated.Add a newGroup
to those this user belongs to.- Specified by:
addGroup
in interfaceUser
- Specified by:
addGroup
in classAbstractUser
- Parameters:
group
- The new group
-
addRole
Deprecated.Add a newRole
to those assigned specifically to this user.- Specified by:
addRole
in interfaceUser
- Specified by:
addRole
in classAbstractUser
- Parameters:
role
- The new role
-
isInGroup
Deprecated.Is this user in the specified group?- Specified by:
isInGroup
in interfaceUser
- Specified by:
isInGroup
in classAbstractUser
- Parameters:
group
- The group to check- Returns:
true
if 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 onGroup
membership.- Specified by:
isInRole
in interfaceUser
- Specified by:
isInRole
in classAbstractUser
- Parameters:
role
- The role to check- Returns:
true
if the user has the specified role
-
removeGroup
Deprecated.Remove aGroup
from those this user belongs to.- Specified by:
removeGroup
in interfaceUser
- Specified by:
removeGroup
in classAbstractUser
- Parameters:
group
- The old group
-
removeGroups
public void removeGroups()Deprecated.Remove allGroup
s from those this user belongs to.- Specified by:
removeGroups
in interfaceUser
- Specified by:
removeGroups
in classAbstractUser
-
removeRole
Deprecated.Remove aRole
from those assigned to this user.- Specified by:
removeRole
in interfaceUser
- Specified by:
removeRole
in classAbstractUser
- Parameters:
role
- The old role
-
removeRoles
public void removeRoles()Deprecated.Remove allRole
s from those assigned to this user.- Specified by:
removeRoles
in interfaceUser
- Specified by:
removeRoles
in 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
username
orname
for the username property.- Returns:
- the XML representation
-
toString
Deprecated.Return a String representation of this user.
-
AbstractUser
instead.