issrg.pba.rbac.xmlpolicy
Class XMLPolicyParser.RoleListNode

java.lang.Object
  extended by issrg.pba.rbac.xmlpolicy.PolicyXMLNode
      extended by issrg.pba.rbac.xmlpolicy.XMLPolicyParser.RoleListNode
Enclosing class:
XMLPolicyParser

public class XMLPolicyParser.RoleListNode
extends PolicyXMLNode

This is an implementation of Role List. The object constructs the credential the Role List represents. It uses a RoleHierarchyPolicyNode to identify the roles listed.

Version:
1.0
Author:
A Otenko

Field Summary
protected  Credentials credential
          This is the credential, represented by the Role List.
protected  XMLPolicyParser.RoleHierarchyPolicyNode policy
          This is the reference to the Role Hierarchy Policy
 
Fields inherited from class issrg.pba.rbac.xmlpolicy.PolicyXMLNode
attributes, children, name, nodeStr
 
Constructor Summary
XMLPolicyParser.RoleListNode(org.xml.sax.Attributes attrs)
          This constructor builds a RoleListNode given the set of attributes.
XMLPolicyParser.RoleListNode(XMLPolicyParser.RoleHierarchyPolicyNode rhpn, org.xml.sax.Attributes attrs)
          This constructor builds a RoleListNode given the RoleHierarchyPolicy and the attributes of the XML element.
 
Method Summary
 void construct()
          This method checks that all the roles listed have been declared in the corresponding RoleHierarchyPolicyNode and constructs a Credentials representing the union of all the roles in the list.
 Credentials getCredential()
          This method returns the credential this role list represents
 
Methods inherited from class issrg.pba.rbac.xmlpolicy.PolicyXMLNode
addChild, addString, getAttributes, getChildren, getName, getString, toString, toXML, toXML
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

policy

protected XMLPolicyParser.RoleHierarchyPolicyNode policy
This is the reference to the Role Hierarchy Policy


credential

protected Credentials credential
This is the credential, represented by the Role List.

Constructor Detail

XMLPolicyParser.RoleListNode

public XMLPolicyParser.RoleListNode(org.xml.sax.Attributes attrs)
This constructor builds a RoleListNode given the set of attributes. It uses the default RoleHierarchyPolicy that must be discovered by XMLPolicyParser by the time of constructing this Role List.

This is a shortcut to calling new RoleListNode(null, attrs).

Parameters:
attrs - - the attributes of this XML element

XMLPolicyParser.RoleListNode

public XMLPolicyParser.RoleListNode(XMLPolicyParser.RoleHierarchyPolicyNode rhpn,
                                    org.xml.sax.Attributes attrs)
This constructor builds a RoleListNode given the RoleHierarchyPolicy and the attributes of the XML element.

Parameters:
rhpn - - RoleHierarchyPolicyNode representing the role hierarchy policy to be used by this Role List; if null, the default RoleHierarchyPolicy discovered by XMLPolicyParser will be used
attrs - - the attributes of the XML element
Method Detail

construct

public void construct()
               throws PolicyParsingException
This method checks that all the roles listed have been declared in the corresponding RoleHierarchyPolicyNode and constructs a Credentials representing the union of all the roles in the list. The validityForRoleList is assumed to have been set by XMLPolicyParser, but this is not always so (because of the sequence of policy parsing), so the RoleAssignmentPolicyNode invokes this method again after the validity of the roles has been discovered.

Overrides:
construct in class PolicyXMLNode
Throws:
PolicyParsingException - if any syntax or semantics error occurred

getCredential

public Credentials getCredential()
This method returns the credential this role list represents