|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jboss.security.xacml.sunxacml.cond.VariableReference
public class VariableReference
This class supports the VariableReferenceType type introuced in XACML 2.0. It allows an expression to reference a variable definition. If there is no such definition then the Policy is invalid. A reference can be included anywwhere in an expression where the referenced expression would be valid.
| Constructor Summary | |
|---|---|
VariableReference(String variableId)
Simple constructor that takes only the identifier. |
|
VariableReference(String variableId,
VariableManager manager)
Constructor that takes the reference identifier and a manager. |
|
VariableReference(VariableDefinition definition)
Constructor that takes the definition referenced by this class. |
|
| Method Summary | |
|---|---|
void |
encode(OutputStream output)
Encodes this class into its XML representation and writes this encoding to the given OutputStream with no indentation. |
void |
encode(OutputStream output,
Indenter indenter)
Encodes this class into its XML representation and writes this encoding to the given OutputStream with indentation. |
EvaluationResult |
evaluate(EvaluationCtx context)
Evaluates the referenced expression using the given context, and either returns an error or a resulting value. |
boolean |
evaluatesToBag()
Deprecated. As of 2.0, you should use the returnsBag
method from the super-interface Expression. |
List |
getChildren()
Always returns an empty list since references never have children in the policy tree. |
static VariableReference |
getInstance(Node root,
PolicyMetaData metaData,
VariableManager manager)
Returns a new instance of the VariableReference class
based on a DOM node. |
VariableDefinition |
getReferencedDefinition()
Returns the VariableDefinition referenced by this class,
or null if the definition cannot be resolved. |
URI |
getType()
Returns the type of the referenced expression. |
String |
getVariableId()
Returns the reference identifier. |
boolean |
returnsBag()
Tells whether evaluation will return a bag or a single value. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public VariableReference(String variableId)
variableId - the reference identifierpublic VariableReference(VariableDefinition definition)
definition - the definition this class references
public VariableReference(String variableId,
VariableManager manager)
variableId - the reference identifiermanager - a VariableManager used to handle the
dependencies between references and definitions during
parsing| Method Detail |
|---|
public static VariableReference getInstance(Node root,
PolicyMetaData metaData,
VariableManager manager)
throws ParsingException
VariableReference class
based on a DOM node. The node must be the root of an XML
VariableReferenceType.
root - the DOM root of a VariableReferenceType XML typemetaData - the meta-data associated with the containing policymanager - the VariableManager used to connect this
reference to its definition
ParsingException - if the VariableReferenceType is invalidpublic String getVariableId()
public VariableDefinition getReferencedDefinition()
VariableDefinition referenced by this class,
or null if the definition cannot be resolved.
public EvaluationResult evaluate(EvaluationCtx context)
evaluate in interface Evaluatablecontext - the representation of the request
public URI getType()
getType in interface ExpressionProcessingException - if the type couldn't be resolvedpublic boolean returnsBag()
returnsBag in interface ExpressionProcessingException - if the return type couldn't be resolvedpublic boolean evaluatesToBag()
returnsBag
method from the super-interface Expression.
evaluatesToBag in interface EvaluatableProcessingException - if the return type couldn't be resolvedpublic List getChildren()
getChildren in interface EvaluatableListpublic void encode(OutputStream output)
OutputStream with no indentation.
encode in interface Expressionoutput - a stream into which the XML-encoded data is written
public void encode(OutputStream output,
Indenter indenter)
OutputStream with indentation.
encode in interface Expressionoutput - a stream into which the XML-encoded data is writtenindenter - an object that creates indentation strings
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||