Package org.apache.catalina.users
Class AbstractGroup
java.lang.Object
org.apache.catalina.users.AbstractGroup
- Direct Known Subclasses:
GenericGroup
Convenience base class for Group implementations.
- Since:
- 4.1
- Author:
- Craig R. McClanahan
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract voidAdd a newRoleto 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 ofRoles assigned specifically to this group.abstract UserDatabaseReturn theUserDatabasewithin which this Group is defined.getUsers()Return an Iterator over the set ofUsers that are members of this group.abstract booleanIs this group specifically assigned the specifiedRole?abstract voidremoveRole(Role role) Remove aRolefrom those assigned to this group.abstract voidRemove allRoles from those assigned to this group.voidsetDescription(String description) Set the description of this group.voidsetGroupname(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:
getDescriptionin interfaceGroup- Returns:
- the description of this group.
-
setDescription
Set the description of this group.- Specified by:
setDescriptionin 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:
getGroupnamein 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:
setGroupnamein interfaceGroup- Parameters:
groupname- The new group name
-
getRoles
Return the set ofRoles assigned specifically to this group. -
getUserDatabase
Return theUserDatabasewithin which this Group is defined.- Specified by:
getUserDatabasein interfaceGroup- Returns:
- the
UserDatabasewithin which this Group is defined.
-
getUsers
Return an Iterator over the set ofUsers that are members of this group. -
addRole
Add a newRoleto those assigned specifically to this group. -
isInRole
Is this group specifically assigned the specifiedRole? -
removeRole
Remove aRolefrom those assigned to this group.- Specified by:
removeRolein interfaceGroup- Parameters:
role- The old role
-
removeRoles
public abstract void removeRoles()Remove allRoles from those assigned to this group.- Specified by:
removeRolesin interfaceGroup
-
getName
Make the principal name the same as the group name.
-