public interface Group extends Principal
Abstract representation of a group of User
s in a
UserDatabase
. Each user that is a member of this group
inherits the Role
s assigned to the group.
Modifier and Type | Method and Description |
---|---|
void |
addRole(Role role)
Add a new
Role to those assigned specifically to this group. |
String |
getDescription() |
String |
getGroupname() |
Iterator<Role> |
getRoles() |
UserDatabase |
getUserDatabase() |
Iterator<User> |
getUsers() |
boolean |
isInRole(Role role)
Is this group specifically assigned the specified
Role ? |
void |
removeRole(Role role)
Remove a
Role from those assigned to this group. |
void |
removeRoles()
Remove all
Role 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 a
UserDatabase . |
String getDescription()
void setDescription(String description)
description
- The new descriptionString getGroupname()
UserDatabase
.void setGroupname(String groupname)
UserDatabase
.groupname
- The new group nameUserDatabase getUserDatabase()
UserDatabase
within which this Group is defined.void addRole(Role role)
Role
to those assigned specifically to this group.role
- The new roleboolean isInRole(Role role)
Role
?role
- The role to checktrue
if the group is assigned to the specified role
otherwise false
void removeRole(Role role)
Role
from those assigned to this group.role
- The old rolevoid removeRoles()
Role
s from those assigned to this group.Copyright © 2000-2016 Apache Software Foundation. All Rights Reserved.