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, hashCodefinalize, getClass, notify, notifyAll, wait, wait, waitgetParent, getRoleNamepublic SimpleRoleGroup(String roleName)
public SimpleRoleGroup(String roleName, Collection<Role> roles)
public SimpleRoleGroup(Group rolesGroup)
public RoleType getType()
RolegetType in interface RolegetType in class SimpleRolepublic void addAll(Collection<Role> roles)
RoleGroupAdds all specified roles to the role group.
public void removeRole(Role role)
RoleGroupremoveRole in interface RoleGrouppublic void clearRoles()
RoleGroupclearRoles in interface RoleGrouppublic 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 SimpleRoleCloneNotSupportedExceptionpublic boolean containsAll(Role anotherRole)
RolecontainsAll in interface RolecontainsAll in class SimpleRoleRole#contains(Role)public boolean containsAtleastOneRole(RoleGroup anotherRole)
RoleGroupcontainsAtleastOneRole in interface RoleGroupanotherRole - another role grouppublic boolean containsRole(Role role)
RoleGroupcontainsRole in interface RoleGrouprole - simple rolepublic String toString()
toString in class SimpleRoleCopyright © 2017 JBoss by Red Hat. All rights reserved.