|
![]() |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface RoleHierarchyBean
A hierarchy of roles.
Method Summary | |
---|---|
void |
addRole(String role)
Adds a new role in this role hierarchy. |
void |
addRole(String role,
Set<String> parentRoles)
Adds a new role in this role hierarchy. |
void |
addRole(String role,
String parentRole)
Adds a new role in this role hierarchy. |
boolean |
connectRoles(String parentRole,
String childRole)
Convenience method: add an edge between two roles. |
boolean |
disconnectRoles(String parentRole,
String childRole)
Convenience method: remove an edge between two roles. |
Set<String> |
getChildRoles(String role)
Returns a unmodifiable list of all children. |
Set<String> |
getLeafRoles()
Returns a list of all roles with no children. |
Set<String> |
getParentRoles(String role)
Returns a unmodifiable list of all parents. |
Set<String> |
getRoles()
Returns a list of all roles in this hierarchy. |
Set<String> |
getRootRoles()
Returns a list of all roles with no parents. |
boolean |
isChildRole(String role,
String childRole)
Returns true if childRole is a child-role of role. |
boolean |
isLeafRole(String role)
Returns true if role is leaf, i.e. has no children. |
boolean |
isParentRole(String role,
String parentRole)
Returns true if parentRole is a parent-role of role. |
boolean |
isRootRole(String role)
Returns true if role is root, i.e. has no parents. |
boolean |
isSubRole(String role,
String subRole)
Returns true if subRole is a sub-role of role. |
boolean |
isSuperRole(String role,
String superRole)
Returns true if superRole is a super-role of role. |
void |
removeRole(String role)
Removes a role from role hierarchy. |
boolean |
renameRole(String role,
String newName)
Renames an existing role. |
boolean |
roleExists(String role)
|
void |
setChildRoles(String role,
Set<String> childrenRoles)
Set new children roles of a role. |
void |
setParentRoles(String role,
Set<String> parentRoles)
Set new parent roles of a role. |
Methods inherited from interface org.openpermis.policy.RoleHierarchy |
---|
getSubRoles, getSuperRoles |
Methods inherited from interface org.openpermis.policy.Part |
---|
equals, hashCode, isValid, toString |
Methods inherited from interface org.openpermis.policy.Identifiable |
---|
getIdentity |
Methods inherited from interface org.openpermis.policy.bean.PartBean |
---|
addPropertyChangeListener, equalSerialNumber, findBySerialNumber, getPartBeanType, getSerialNumber, removePropertyChangeListener, toShortString |
Methods inherited from interface org.openpermis.policy.Part |
---|
equals, hashCode, isValid, toString |
Methods inherited from interface org.openpermis.policy.bean.IdentifiableBean |
---|
setIdentity |
Methods inherited from interface org.openpermis.policy.Identifiable |
---|
getIdentity |
Method Detail |
---|
boolean roleExists(String role)
role
- the role to search.
Set<String> getRoles()
Set<String> getRootRoles()
Set<String> getLeafRoles()
Set<String> getChildRoles(String role)
Set<String> getParentRoles(String role)
boolean isRootRole(String role)
role
- the role to check.
true
if found.boolean isLeafRole(String role)
role
- the role to check.
true
if found.boolean isSubRole(String role, String subRole)
role
- the role to start search from.subRole
- the role to find.
true
if found.boolean isSuperRole(String role, String superRole)
role
- the role to start search from..superRole
- the role to find.
true
if found.boolean isChildRole(String role, String childRole)
role
- the role to start search from..childRole
- the role to find.
true
if found.boolean isParentRole(String role, String parentRole)
role
- the role to start search from..parentRole
- the role to find.
true
if found.void setChildRoles(String role, Set<String> childrenRoles)
role
- role to set children for.childrenRoles
- children roles to setvoid setParentRoles(String role, Set<String> parentRoles)
role
- role to set parents for.parentRoles
- parent roles to setboolean connectRoles(String parentRole, String childRole)
parentRole
- parent role.childRole
- child role
true
if edge was addedboolean disconnectRoles(String parentRole, String childRole)
parentRole
- parent role.childRole
- child role
true
if edge was removedvoid addRole(String role)
role
- the new role to be added.void addRole(String role, String parentRole)
role
- the new role to be added.parentRole
- the parent where the role is appended.void addRole(String role, Set<String> parentRoles)
role
- the new role to be added.parentRoles
- the parents where the role is appended.void removeRole(String role)
role
- the role to be removed.boolean renameRole(String role, String newName)
The renamed role will keep its super and sub roles.
role
- the role to be renamed.newName
- the new name for the role
true
if role was renamed.
|
![]() |
||||||||
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