issrg.pba.rbac.xmlpolicy.ifstatement
Class PresentNode
java.lang.Object
issrg.pba.rbac.xmlpolicy.PolicyXMLNode
issrg.pba.rbac.xmlpolicy.ifstatement.TermNode
issrg.pba.rbac.xmlpolicy.ifstatement.OperationNode
issrg.pba.rbac.xmlpolicy.ifstatement.PresentNode
- All Implemented Interfaces:
- Term
public class PresentNode
- extends OperationNode
This is the class for Present node of the IF-statement. Its functionality is
very much determined by OperationNode and PresentInterpreter, which are
configured to deliver the following semantics:
This operation expects one and only one Term, which must either be
an ArgNode or EnvironmentNode and returns a
value of type Types.BOOLEAN_TYPE.
The evaluation result is "true", if and only if the Term refers to an
argument or environmental variable that is present in the current
Environment.
- Author:
- A.Otenko
Constructor Summary |
protected |
PresentNode()
|
|
PresentNode(XMLPolicyParser p,
org.xml.sax.Attributes attrs)
This constructor builds a PresentNode given the XMLPolicyParser and the
set of
attributes of this XML element. |
Method Summary |
void |
construct()
This method checks that there is only one child element in XML, and
that it is of type ArgNode or EnvironmentNode to ensure the semantic
correctness of XML policy. |
static void |
register()
Call this method to register the PresentNode with the XMLPolicyParser. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
PRESENT_NODE
public static final java.lang.String PRESENT_NODE
- See Also:
- Constant Field Values
PresentNode
protected PresentNode()
PresentNode
public PresentNode(XMLPolicyParser p,
org.xml.sax.Attributes attrs)
- This constructor builds a PresentNode given the XMLPolicyParser and the
set of
attributes of this XML element. It expects that there is one and only one
child node.
- Parameters:
p
- - the XMLPolicyParser that builds this PresentNodeattrs
- - the attributes of this XML element
register
public static void register()
- Call this method to register the PresentNode with the XMLPolicyParser. It
also
registers the default PresentInterpreter.
construct
public void construct()
throws PolicyParsingException
- This method checks that there is only one child element in XML, and
that it is of type ArgNode or EnvironmentNode to ensure the semantic
correctness of XML policy.
- Overrides:
construct
in class OperationNode
- Throws:
PolicyParsingException
- if one of the above-stated conditions is
violated