|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectissrg.pba.rbac.xmlpolicy.PolicyXMLNode
issrg.pba.rbac.xmlpolicy.ifstatement.TermNode
issrg.pba.rbac.xmlpolicy.ifstatement.EnvironmentNode
This is the class that represents an Environment node and evaluates the environmental variables at run-time.
EnvironmentNode expects the environment to contain either issrg.pba.rbac.Argument objects, in which case the string value will be converted using Types.construct, or other objects, which will be passed as is to the interpreters.
If the environment contains the variables of types for which there is no constructor provided by the AEF (not registered with the Types), or the AEF failed to provide the variable with the name stated in the policy, an EvaluationException will occur at run-time.
Note that if the evaluation does not reach the point where the variable is needed, no exception will be thrown.
Types.construct(java.lang.String, java.lang.String)
Field Summary | |
static java.lang.String |
ENVIRONMENT_NODE
This is the name of the node that represents the Environment - a reference to an environmental parameter. |
static java.lang.String |
PARAMETER_ATTRIBUTE
This is the name of the attribute telling the name of the environmental parameter. |
protected java.lang.String |
parameter_name
|
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 |
EnvironmentNode()
|
|
EnvironmentNode(XMLPolicyParser p,
org.xml.sax.Attributes attr)
This constructor builds an EnvironmentNode given the XMLPolicyParser and the set of attributes of the XML element. |
Method Summary | |
java.lang.Object |
evaluate(Environment env)
This method evaluates the environmental parameter, as it is at run-time. |
java.lang.String |
getType()
This method returns the type of the environmental parameter as determined at construction type. |
static void |
register()
This method should be called to register the node with the XML Parser |
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, getName, getString, toString, toXML, toXML |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final java.lang.String ENVIRONMENT_NODE
public static final java.lang.String PARAMETER_ATTRIBUTE
protected java.lang.String type
protected java.lang.String parameter_name
Constructor Detail |
protected EnvironmentNode()
public EnvironmentNode(XMLPolicyParser p, org.xml.sax.Attributes attr) throws PolicyParsingException
p
- - the XMLPolicyParser that builds this EnvironmentNodeattr
- - the attributes of this XML elementTypes.construct(java.lang.String, java.lang.String)
Method Detail |
public static void register()
public java.lang.String getType()
public java.lang.Object evaluate(Environment env) throws EvaluationException
env
- - the Environment with the variables in it indexed by their
name
EvaluationException,
- if there is no variable in the Environment
with the expected name, or if its type is not the expected type, or if
Types.construct failed to decode the value from String (no decoder
registered or other decoding problem)
EvaluationException
- if the term cannot be evaluatedTypes.construct(java.lang.String, java.lang.String)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |