Package org.apache.catalina.users
Class AbstractGroup
- java.lang.Object
-
- org.apache.catalina.users.AbstractGroup
-
-
Field Summary
Fields Modifier and Type Field Description protected StringdescriptionThe description of this group.protected StringgroupnameThe group name of this group.
-
Constructor Summary
Constructors Constructor Description AbstractGroup()
-
Method Summary
All 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.StringgetDescription()Return the description of this group.StringgetGroupname()Return the group name of this group, which must be unique within the scope of aUserDatabase.StringgetName()Make the principal name the same as the group name.abstract Iterator<Role>getRoles()Return the set ofRoles assigned specifically to this group.abstract UserDatabasegetUserDatabase()Return theUserDatabasewithin which this Group is defined.abstract 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(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.
-
-
-
Method Detail
-
getDescription
public String getDescription()
Return the description of this group.- Specified by:
getDescriptionin interfaceGroup- Returns:
- the description of this group.
-
setDescription
public void setDescription(String description)
Set the description of this group.- Specified by:
setDescriptionin interfaceGroup- Parameters:
description- The new description
-
getGroupname
public String 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
public void setGroupname(String groupname)
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
public abstract Iterator<Role> getRoles()
Return the set ofRoles assigned specifically to this group.
-
getUserDatabase
public abstract UserDatabase getUserDatabase()
Return theUserDatabasewithin which this Group is defined.- Specified by:
getUserDatabasein interfaceGroup- Returns:
- the
UserDatabasewithin which this Group is defined.
-
getUsers
public abstract Iterator<User> getUsers()
Return an Iterator over the set ofUsers that are members of this group.
-
addRole
public abstract void addRole(Role role)
Add a newRoleto those assigned specifically to this group.
-
isInRole
public abstract boolean isInRole(Role role)
Is this group specifically assigned the specifiedRole?
-
removeRole
public abstract void removeRole(Role role)
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
-
-