issrg.pba.rbac.xmlpolicy.ifstatement
Class EqNode
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.EqNode
- All Implemented Interfaces:
- Term
public class EqNode
- extends OperationNode
This is the class for EQ node of the IF-statement. Its functionality is
very much determined by OperationNode and EqInterpreter, which are
configured to deliver the following semantics:
This operation expects two and only two Terms of the same type, and
returns a
value of type Types.BOOLEAN_TYPE.
The evaluation result is "true", if and only if calling equals() method on
the first term returns boolean "true".
It is possible to register equality interpreters for specific
combinations of Terms, which will be used in preference to the default
EqInterpreter. Use registerInterpreter method to do that.
- Author:
- A.Otenko
- See Also:
registerInterpreter(issrg.pba.rbac.xmlpolicy.ifstatement.Interpreter)
Field Summary |
static java.lang.String |
EQ_NODE
|
Constructor Summary |
protected |
EqNode()
|
|
EqNode(XMLPolicyParser p,
org.xml.sax.Attributes attrs)
This constructor builds an EqNode given the XMLPolicyParser and the set of
attributes of this XML element. |
Method Summary |
static void |
register()
Call this method to register the EqNode with the XMLPolicyParser. |
static void |
registerInterpreter(Interpreter i)
This method maintains a register of interpreters for specific combinations
of Terms. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
EQ_NODE
public static final java.lang.String EQ_NODE
- See Also:
- Constant Field Values
EqNode
protected EqNode()
EqNode
public EqNode(XMLPolicyParser p,
org.xml.sax.Attributes attrs)
- This constructor builds an EqNode given the XMLPolicyParser and the set of
attributes of this XML element. It expects that there are two and only two
child nodes.
- Parameters:
p
- - the XMLPolicyParser that builds this EqNodeattr
- - the attributes of this XML element
register
public static void register()
- Call this method to register the EqNode with the XMLPolicyParser. It also
registers the default EqInterpreter.
registerInterpreter
public static void registerInterpreter(Interpreter i)
- This method maintains a register of interpreters for specific combinations
of Terms. If no special interpreters are registered, the default one is
used, as described above.
- Parameters:
i
- - the Interpreter instance that can evaluate equality expression
for some combination of Terms