Package org.apache.catalina.users
Class AbstractGroup
java.lang.Object
org.apache.catalina.users.AbstractGroup
- Direct Known Subclasses:
MemoryGroup
Convenience base class for Group
implementations.
- Since:
- 4.1
- Author:
- Craig R. McClanahan
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract void
Add a newRole
to those assigned specifically to this group.Return the description of this group.Return the group name of this group, which must be unique within the scope of aUserDatabase
.getName()
Make the principal name the same as the group name.getRoles()
Return the set ofRole
s assigned specifically to this group.abstract UserDatabase
Return theUserDatabase
within which this Group is defined.getUsers()
Return an Iterator over the set ofUser
s that are members of this group.abstract boolean
Is this group specifically assigned the specifiedRole
?abstract void
removeRole
(Role role) Remove aRole
from those assigned to this group.abstract void
Remove allRole
s from those assigned to this group.void
setDescription
(String description) Set the description of this group.void
setGroupname
(String groupname) Set the group name of this group, which must be unique within the scope of aUserDatabase
.
-
Field Details
-
description
The description of this group. -
groupname
The group name of this group.
-
-
Constructor Details
-
AbstractGroup
public AbstractGroup()
-
-
Method Details
-
getDescription
Return the description of this group.- Specified by:
getDescription
in interfaceGroup
- Returns:
- the description of this group.
-
setDescription
Set the description of this group.- Specified by:
setDescription
in interfaceGroup
- Parameters:
description
- The new description
-
getGroupname
Return the group name of this group, which must be unique within the scope of aUserDatabase
.- Specified by:
getGroupname
in interfaceGroup
- Returns:
- the group name of this group, which must be unique
within the scope of a
UserDatabase
.
-
setGroupname
Set the group name of this group, which must be unique within the scope of aUserDatabase
.- Specified by:
setGroupname
in interfaceGroup
- Parameters:
groupname
- The new group name
-
getRoles
Return the set ofRole
s assigned specifically to this group. -
getUserDatabase
Return theUserDatabase
within which this Group is defined.- Specified by:
getUserDatabase
in interfaceGroup
- Returns:
- the
UserDatabase
within which this Group is defined.
-
getUsers
Return an Iterator over the set ofUser
s that are members of this group. -
addRole
Add a newRole
to those assigned specifically to this group. -
isInRole
Is this group specifically assigned the specifiedRole
? -
removeRole
Remove aRole
from those assigned to this group.- Specified by:
removeRole
in interfaceGroup
- Parameters:
role
- The old role
-
removeRoles
public abstract void removeRoles()Remove allRole
s from those assigned to this group.- Specified by:
removeRoles
in interfaceGroup
-
getName
Make the principal name the same as the group name.
-