Package org.jboss.security.identity
Interface RoleGroup
-
- All Superinterfaces:
Role
,Serializable
- All Known Implementing Classes:
SimpleRoleGroup
public interface RoleGroup extends Role
Represents a group of roles- Since:
- Nov 16, 2007
- Version:
- $Revision$
- Author:
- Anil.Saldhana@redhat.com
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addAll(Collection<Role> roles)
Adds all specified roles to the role group.void
addRole(Role aRole)
Add a rolevoid
clearRoles()
Clear all the rolesboolean
containsAtleastOneRole(RoleGroup anotherRoleGroup)
Validates whether there is at least one matching role in "anotherRoleGroup"boolean
containsRole(Role aRole)
Validates whether a simple role is availableCollection<Role>
getRoles()
Get the roles contained in theRoleGroup
.void
removeRole(Role aRole)
Remove a role-
Methods inherited from interface org.jboss.security.identity.Role
containsAll, getParent, getRoleName, getType
-
-
-
-
Method Detail
-
getRoles
Collection<Role> getRoles()
Get the roles contained in the
RoleGroup
. The returnedList
should be unmodifiable as theRoleGroup
interface provides methods to add and remove roles.- Returns:
- a unmodifiable
Collection
containing theRoleGroup
's roles.
-
addRole
void addRole(Role aRole)
Add a role- Parameters:
aRole
-
-
addAll
void addAll(Collection<Role> roles)
Adds all specified roles to the role group.
- Parameters:
roles
- the list of roles to be added.
-
clearRoles
void clearRoles()
Clear all the roles
-
removeRole
void removeRole(Role aRole)
Remove a role- Parameters:
aRole
-
-
containsRole
boolean containsRole(Role aRole)
Validates whether a simple role is available- Parameters:
aRole
- simple role- Returns:
- Throws:
IllegalArgumentException
- role is not simple
-
containsAtleastOneRole
boolean containsAtleastOneRole(RoleGroup anotherRoleGroup)
Validates whether there is at least one matching role in "anotherRoleGroup"- Parameters:
anotherRoleGroup
- another role group- Returns:
-
-