|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object issrg.pba.rbac.xmlpolicy.PolicyXMLNode issrg.pba.rbac.xmlpolicy.XMLPolicyParser.RoleHierarchyNode
public class XMLPolicyParser.RoleHierarchyNode
This is the class representing SupRole nodes. It knows its value and its direct subordinates. However, it can always tell you whether a given Role is subordinate to it or not.
Field Summary | |
---|---|
protected int |
hierarchyLevel
This is a number, representing how high in the hierarchy this node is located. |
protected XMLPolicyParser.RoleHierarchyNode[] |
subordinates
|
protected java.lang.String |
type
|
protected java.lang.String |
value
|
Fields inherited from class issrg.pba.rbac.xmlpolicy.PolicyXMLNode |
---|
attributes, children, name, nodeStr |
Constructor Summary | |
---|---|
XMLPolicyParser.RoleHierarchyNode(org.xml.sax.Attributes attrs)
|
Method Summary | |
---|---|
int |
getLevel()
This method returns the hierarchy level of the node. |
java.lang.String |
getRoleType()
This method returns the Role Type. |
java.lang.Object |
getRoleValue()
This method returns the Role Value as Object (required by issrg.pba.rbac.Role interface). |
java.lang.String |
getValue()
This method returns the Role Value as String. |
boolean |
isSuperiorTo(RoleHierarchyNode rhn)
This method returns whether or not the given role's privileges should be inherited or not. |
void |
optimise(java.util.Map roleHierarchy)
This method links the roles together, using the given Map as a reference to other Roles. |
void |
setLevel(int level)
This method sets the hierarchy level of the node. |
protected void |
setRoleType(java.lang.String t)
This method sets the type of the role; for use by the Role Spec Policy only at the object initialisation time. |
java.lang.String |
toString()
The string representation of this node is the role value. |
Methods inherited from class issrg.pba.rbac.xmlpolicy.PolicyXMLNode |
---|
addChild, addString, construct, getAttributes, getChildren, getName, getString, toXML, toXML |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected int hierarchyLevel
Its property is that hierarchy level of the most superior roles is 0, and that any child role hierarchy level is a bigger integer (not always greater just by one, because this is not a tree). So if this role has bigger integer than another, then the former definitely cannot be superior to the latter.
protected java.lang.String type
protected java.lang.String value
protected XMLPolicyParser.RoleHierarchyNode[] subordinates
Constructor Detail |
---|
public XMLPolicyParser.RoleHierarchyNode(org.xml.sax.Attributes attrs)
Method Detail |
---|
public void optimise(java.util.Map roleHierarchy) throws PolicyParsingException
roleHierarchy
- - the Map of roles, where the key is the role
value, and the value is the RoleHierarchyNode
PolicyParsingException
public int getLevel()
public void setLevel(int level)
level
- - the least new level of the node; if the node already
has a higher level, the level won't be updated; otherwise its
level and the level of all of its subordinates will be updatedpublic java.lang.String getValue()
public java.lang.Object getRoleValue()
getRoleValue
in interface Role
public java.lang.String getRoleType()
getRoleType
in interface Role
protected void setRoleType(java.lang.String t)
public boolean isSuperiorTo(RoleHierarchyNode rhn)
TODO: do i remove String equality of their values?
isSuperiorTo
in interface RoleHierarchyNode
rhn
- is the role
public java.lang.String toString()
toString
in class PolicyXMLNode
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |