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 voidaddAll(Collection<Role> roles)Adds all specified roles to the role group.voidaddRole(Role aRole)Add a rolevoidclearRoles()Clear all the rolesbooleancontainsAtleastOneRole(RoleGroup anotherRoleGroup)Validates whether there is at least one matching role in "anotherRoleGroup"booleancontainsRole(Role aRole)Validates whether a simple role is availableCollection<Role>getRoles()Get the roles contained in theRoleGroup.voidremoveRole(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 returnedListshould be unmodifiable as theRoleGroupinterface provides methods to add and remove roles.- Returns:
- a unmodifiable
Collectioncontaining 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:
-
-