Top Description Methods
org.apache.catalina

public Interface Group

extends Principal
Known Direct Implementers
org.apache.catalina.users.AbstractGroup
Imports
java.security.Principal, java.util.Iterator

Abstract representation of a group of Users in a UserDatabase. Each user that is a member of this group inherits the Roles assigned to the group.

Author
Craig R. McClanahan
Since
4.1

Method Summary

Modifier and TypeMethod and Description
public void
addRole(Role
The new role
role
)

Add a new Role to those assigned specifically to this group.

public String

Returns:

the description of this group.
getDescription
()

public String

Returns:

the group name of this group, which must be unique within the scope of a UserDatabase.
getGroupname
()

public Iterator<Role>

Returns:

the set of Roles assigned specifically to this group.
getRoles
()

public UserDatabase

Returns:

the UserDatabase within which this Group is defined.
getUserDatabase
()

public Iterator<User>

Returns:

the set of Users that are members of this group.
getUsers
()

public boolean

Returns:

true if the group is assigned to the specified role otherwise false
isInRole
(Role
The role to check
role
)

Is this group specifically assigned the specified Role?

public void
removeRole(Role
The old role
role
)

Remove a Role from those assigned to this group.

public void
removeRoles()

Remove all Roles from those assigned to this group.

public void
setDescription(String
The new description
description
)

Set the description of this group.

public void
setGroupname(String
The new group name
groupname
)

Set the group name of this group, which must be unique within the scope of a UserDatabase.

Inherited from java.security.Principal:
equalsgetNamehashCodeimpliestoString

Method Detail

addRoleback to summary
public void addRole(Role role)

Add a new Role to those assigned specifically to this group.

Parameters
role:Role

The new role

getDescriptionback to summary
public String getDescription()
Returns:String

the description of this group.

getGroupnameback to summary
public String getGroupname()
Returns:String

the group name of this group, which must be unique within the scope of a UserDatabase.

getRolesback to summary
public Iterator<Role> getRoles()
Returns:Iterator<Role>

the set of Roles assigned specifically to this group.

getUserDatabaseback to summary
public UserDatabase getUserDatabase()
Returns:UserDatabase

the UserDatabase within which this Group is defined.

getUsersback to summary
public Iterator<User> getUsers()
Returns:Iterator<User>

the set of Users that are members of this group.

isInRoleback to summary
public boolean isInRole(Role role)

Is this group specifically assigned the specified Role?

Parameters
role:Role

The role to check

Returns:boolean

true if the group is assigned to the specified role otherwise false

removeRoleback to summary
public void removeRole(Role role)

Remove a Role from those assigned to this group.

Parameters
role:Role

The old role

removeRolesback to summary
public void removeRoles()

Remove all Roles from those assigned to this group.

setDescriptionback to summary
public void setDescription(String description)

Set the description of this group.

Parameters
description:String

The new description

setGroupnameback to summary
public void setGroupname(String groupname)

Set the group name of this group, which must be unique within the scope of a UserDatabase.

Parameters
groupname:String

The new group name