|
|||||||||
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.ifstatement.TermNode issrg.pba.rbac.xmlpolicy.ifstatement.NamedTermNode
public abstract class NamedTermNode
This class defines the behaviour of the named terms - the Terms that have name meaningful outside the policy. Basically, it keeps the name and type of the node as specified in the policy, and also maintains a collection of nodes by their names.
Field Summary | |
---|---|
protected java.lang.String |
parameter_name
|
protected static java.util.Map |
s_namedTerms
|
protected java.lang.String |
type
|
Fields inherited from class issrg.pba.rbac.xmlpolicy.ifstatement.TermNode |
---|
maxOperand, minOperand, terms |
Fields inherited from class issrg.pba.rbac.xmlpolicy.PolicyXMLNode |
---|
attributes, children, name, nodeStr |
Constructor Summary | |
---|---|
protected |
NamedTermNode()
|
|
NamedTermNode(java.lang.String nodeName,
org.xml.sax.Attributes attr,
java.lang.String typeAttr,
java.lang.String nameAttr)
This constructor builds a node given its name, a set of attributes, and the names of the attributes defining the type and the name of the term. |
Method Summary | |
---|---|
static java.util.Map |
getAllNamedTerms()
This method returns a Map of Sets of all NamedTerms, indexed by the term node name. |
java.lang.String |
getName()
This method returns the name of this NamedTerm. |
static java.util.Set |
getNamedTerms(java.lang.String termName)
This method returns a Set of NamedTerm, given the name of the term node. |
java.lang.String |
getType()
This method returns the type of this NamedTerm. |
static void |
resetNamedTerms()
This method should be used by the parser to reset the collection of NamedTerms before parsing a new policy. |
Methods inherited from class issrg.pba.rbac.xmlpolicy.ifstatement.TermNode |
---|
construct, getInterpretersForNode, registerInterpreterForNode |
Methods inherited from class issrg.pba.rbac.xmlpolicy.PolicyXMLNode |
---|
addChild, addString, getAttributes, getChildren, getString, toString, toXML, toXML |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface issrg.pba.rbac.xmlpolicy.ifstatement.Term |
---|
evaluate |
Field Detail |
---|
protected static java.util.Map s_namedTerms
protected java.lang.String type
protected java.lang.String parameter_name
Constructor Detail |
---|
protected NamedTermNode()
public NamedTermNode(java.lang.String nodeName, org.xml.sax.Attributes attr, java.lang.String typeAttr, java.lang.String nameAttr) throws PolicyParsingException
nodeName
- the name of the XML elementattr
- the attributes of the XML element being parsedtypeAttr
- the name of the attribute containing the type of the termnameAttr
- the name of the attribute containing the name of the term
PolicyParsingException
Method Detail |
---|
public java.lang.String getType()
public java.lang.String getName()
getName
in class PolicyXMLNode
public static java.util.Set getNamedTerms(java.lang.String termName)
termName
- the name of the NamedTerm node (for example Arg or
Environment)
public static java.util.Map getAllNamedTerms()
Because of how the named terms are collected, the Map is valid until the next call to resetNamedTerms(), which will normally happen as soon as the policy has been parsed. Use PolicyParser methods to obtain the actual nodes for a particular policy.
public static void resetNamedTerms()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |