Package org.apache.catalina.users
Class AbstractGroup
- java.lang.Object
- 
- org.apache.catalina.users.AbstractGroup
 
- 
- All Implemented Interfaces:
- java.security.Principal,- Group
 - Direct Known Subclasses:
- GenericGroup
 
 public abstract class AbstractGroup extends java.lang.Object implements Group Convenience base class for Groupimplementations.- Since:
- 4.1
- Author:
- Craig R. McClanahan
 
- 
- 
Field SummaryFields Modifier and Type Field Description protected java.lang.StringdescriptionThe description of this group.protected java.lang.StringgroupnameThe group name of this group.
 - 
Constructor SummaryConstructors Constructor Description AbstractGroup()
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract voidaddRole(Role role)Add a newRoleto those assigned specifically to this group.java.lang.StringgetDescription()Return the description of this group.java.lang.StringgetGroupname()Return the group name of this group, which must be unique within the scope of aUserDatabase.java.lang.StringgetName()Make the principal name the same as the group name.abstract java.util.Iterator<Role>getRoles()Return the set ofRoles assigned specifically to this group.abstract UserDatabasegetUserDatabase()Return theUserDatabasewithin which this Group is defined.abstract java.util.Iterator<User>getUsers()Return an Iterator over the set ofUsers that are members of this group.abstract booleanisInRole(Role role)Is this group specifically assigned the specifiedRole?abstract voidremoveRole(Role role)Remove aRolefrom those assigned to this group.abstract voidremoveRoles()Remove allRoles from those assigned to this group.voidsetDescription(java.lang.String description)Set the description of this group.voidsetGroupname(java.lang.String groupname)Set the group name of this group, which must be unique within the scope of aUserDatabase.
 
- 
- 
- 
Method Detail- 
getDescriptionpublic java.lang.String getDescription() Return the description of this group.- Specified by:
- getDescriptionin interface- Group
- Returns:
- the description of this group.
 
 - 
setDescriptionpublic void setDescription(java.lang.String description) Set the description of this group.- Specified by:
- setDescriptionin interface- Group
- Parameters:
- description- The new description
 
 - 
getGroupnamepublic java.lang.String getGroupname() Return the group name of this group, which must be unique within the scope of aUserDatabase.- Specified by:
- getGroupnamein interface- Group
- Returns:
- the group name of this group, which must be unique
 within the scope of a UserDatabase.
 
 - 
setGroupnamepublic void setGroupname(java.lang.String groupname) Set the group name of this group, which must be unique within the scope of aUserDatabase.- Specified by:
- setGroupnamein interface- Group
- Parameters:
- groupname- The new group name
 
 - 
getRolespublic abstract java.util.Iterator<Role> getRoles() Return the set ofRoles assigned specifically to this group.
 - 
getUserDatabasepublic abstract UserDatabase getUserDatabase() Return theUserDatabasewithin which this Group is defined.- Specified by:
- getUserDatabasein interface- Group
- Returns:
- the UserDatabasewithin which this Group is defined.
 
 - 
getUserspublic abstract java.util.Iterator<User> getUsers() Return an Iterator over the set ofUsers that are members of this group.
 - 
addRolepublic abstract void addRole(Role role) Add a newRoleto those assigned specifically to this group.
 - 
isInRolepublic abstract boolean isInRole(Role role) Is this group specifically assigned the specifiedRole?
 - 
removeRolepublic abstract void removeRole(Role role) Remove aRolefrom those assigned to this group.- Specified by:
- removeRolein interface- Group
- Parameters:
- role- The old role
 
 - 
removeRolespublic abstract void removeRoles() Remove allRoles from those assigned to this group.- Specified by:
- removeRolesin interface- Group
 
 - 
getNamepublic java.lang.String getName() Make the principal name the same as the group name.- Specified by:
- getNamein interface- java.security.Principal
 
 
- 
 
-