public class SimpleRoleGroup extends SimpleRole implements RoleGroup
ANYBODY, ANYBODY_ROLE
Constructor and Description |
---|
SimpleRoleGroup(Group rolesGroup) |
SimpleRoleGroup(Set<Principal> rolesAsPrincipals) |
SimpleRoleGroup(String roleName) |
SimpleRoleGroup(String roleName,
Collection<Role> roles) |
Modifier and Type | Method and Description |
---|---|
void |
addAll(Collection<Role> roles)
Adds all specified roles to the role group.
|
void |
addRole(Role role)
Add a role
|
void |
clearRoles()
Clear all the roles
|
Object |
clone() |
boolean |
containsAll(Role anotherRole)
Indicate whether the argument role is equal or contained
depending on the role-type
|
boolean |
containsAtleastOneRole(RoleGroup anotherRole)
Validates whether there is at least one matching
role in "anotherRoleGroup"
|
boolean |
containsRole(Role role)
Validates whether a simple role is available
|
Collection<Role> |
getRoles()
Get the roles contained in the
RoleGroup . |
RoleType |
getType()
Get type of role
|
void |
removeRole(Role role)
Remove a role
|
String |
toString() |
equals, getParent, getRoleName, hashCode
finalize, getClass, notify, notifyAll, wait, wait, wait
getParent, getRoleName
public SimpleRoleGroup(String roleName)
public SimpleRoleGroup(String roleName, Collection<Role> roles)
public SimpleRoleGroup(Group rolesGroup)
public RoleType getType()
Role
getType
in interface Role
getType
in class SimpleRole
public void addAll(Collection<Role> roles)
RoleGroup
Adds all specified roles to the role group.
public void removeRole(Role role)
RoleGroup
removeRole
in interface RoleGroup
public void clearRoles()
RoleGroup
clearRoles
in interface RoleGroup
public Collection<Role> getRoles()
RoleGroup
Get the roles contained in the RoleGroup
. The returned List
should be unmodifiable as the
RoleGroup
interface provides methods to add and remove roles.
public Object clone() throws CloneNotSupportedException
clone
in class SimpleRole
CloneNotSupportedException
public boolean containsAll(Role anotherRole)
Role
containsAll
in interface Role
containsAll
in class SimpleRole
Role#contains(Role)
public boolean containsAtleastOneRole(RoleGroup anotherRole)
RoleGroup
containsAtleastOneRole
in interface RoleGroup
anotherRole
- another role grouppublic boolean containsRole(Role role)
RoleGroup
containsRole
in interface RoleGroup
role
- simple rolepublic String toString()
toString
in class SimpleRole
Copyright © 2017 JBoss by Red Hat. All rights reserved.