|
![]() |
||||||||
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.
Field Summary | |
---|---|
private String |
name
|
private RoleHierarchy |
roleHierarchy
|
private static long |
serialVersionUID
|
Constructor Summary | |
---|---|
Role(RoleHierarchy roleHierarchy,
String name)
Creates a new role reference. |
Method Summary | |
---|---|
static Role |
create(RoleHierarchy hierarchy,
String name)
Factory method for creating a role reference. |
boolean |
equals(Object obj)
|
String |
getName()
|
RoleHierarchy |
getRoleHierarchy()
|
private Set<Role> |
getRoleSet(Set<String> names)
|
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 |
Field Detail |
---|
private static final long serialVersionUID
-3359339547258162667L
private final RoleHierarchy roleHierarchy
private final String name
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.private Set<Role> getRoleSet(Set<String> names)
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 |
PERMIS Role Based Access Control 0.4.0 (Build 15)
2009/05/20 08:14:59
Copyright (c) 2002-2007 Ergon Informatik AG