|
![]() |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.openpermis.policy.Role
public final class Role
A reference to a named role within a role hierarchy.
Constructor Summary | |
---|---|
Role(RoleHierarchy roleHierarchy,
String name)
Creates a new role reference. |
Method Summary | |
---|---|
RoleDefinition |
asRoleDefinition()
Returns the role definition representation of this role. |
static Role |
create(RoleHierarchy hierarchy,
String name)
Factory method for creating a role reference. |
boolean |
equals(Object obj)
|
String |
getName()
|
RoleHierarchy |
getRoleHierarchy()
|
Set<Role> |
getSubRoles()
Returns all the roles that inherit privileges from this role. |
Set<Role> |
getSuperRoles()
Returns all the roles from which this role inherits privileges. |
int |
hashCode()
|
static Set<Role> |
set(RoleHierarchy hierarchy,
Collection<String> names)
Creates a set of roles from a role hierarchy and a collection of role names. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Role(RoleHierarchy roleHierarchy, String name)
roleHierarchy
- the RoleHierarchy
to which the role belongs.name
- the name identifying the role within its hierarchy.Method Detail |
---|
public static Role create(RoleHierarchy hierarchy, String name)
hierarchy
- the RoleHierarchy
from which to refer to a role.name
- the name of the role to refer to.
Role
.public static Set<Role> set(RoleHierarchy hierarchy, Collection<String> names)
hierarchy
- the RoleHierarchy
to which the roles belong.names
- a collection of role names.
Set
of roles.public RoleHierarchy getRoleHierarchy()
public String getName()
public Set<Role> getSuperRoles()
Set
of roles from which this role inherits privileges. The passed
role is itself included, so the returned set will always contain at least one role.public Set<Role> getSubRoles()
Set
of roles that inherit privileges from this role. The passed
role is itself included, so the returned set will always contain at least one role.public final RoleDefinition asRoleDefinition()
The role definition is created as the string version of the identity of the hierarchy of this role and its name.
public String toString()
toString
in class Object
public boolean equals(Object obj)
equals
in class Object
public int hashCode()
hashCode
in class Object
|
![]() |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
OpenPermis Role Based Access Control 0.9.0 (Build 16)
2009/08/13 07:16:59
Copyright (c) 2002-2007 Ergon Informatik AG