SunTM's XACML Implementation for JavaTM

com.sun.xacml.cond
Interface Evaluatable

All Known Implementing Classes:
Apply, AttributeDesignator, AttributeSelector, AttributeValue

public interface Evaluatable

Generic interface that is implemented by all objects that can appear in an ApplyType. This lets the evaluation code of Apply and functions iterate through their members and evaluate them, working only on the returned values or errors.

Since:
1.0

Method Summary
 void encode(OutputStream output)
          Encodes this Evaluatable into its XML representation and writes this encoding to the given OutputStream with no indentation.
 void encode(OutputStream output, Indenter indenter)
          Encodes this Evaluatable into its XML representation and writes this encoding to the given OutputStream with indentation.
 EvaluationResult evaluate(EvaluationCtx context)
          Evaluates the object using the given context, and either returns an error or a resulting value.
 boolean evaluatesToBag()
          Tells whether evaluation will return a bag or a single value.
 List getChildren()
          Returns all children, in order, of this element in the Condition tree, or en empty set if this element has no children.
 URI getType()
          Get the type of this object.
 

Method Detail

evaluate

public EvaluationResult evaluate(EvaluationCtx context)
Evaluates the object using the given context, and either returns an error or a resulting value.

Parameters:
context - the representation of the request
Returns:
the result of evaluation

getType

public URI getType()
Get the type of this object. This may be the data type of an Attribute or the return type of an AttributeDesignator, etc.

Returns:
the type of data represented by this object

evaluatesToBag

public boolean evaluatesToBag()
Tells whether evaluation will return a bag or a single value.

Returns:
true if evaluation will return a bag, false otherwise

getChildren

public List getChildren()
Returns all children, in order, of this element in the Condition tree, or en empty set if this element has no children. In XACML 1.x, only the ApplyType ever has children.

Returns:
a List of Evaluatables

encode

public void encode(OutputStream output)
Encodes this Evaluatable into its XML representation and writes this encoding to the given OutputStream with no indentation.

Parameters:
output - a stream into which the XML-encoded data is written

encode

public void encode(OutputStream output,
                   Indenter indenter)
Encodes this Evaluatable into its XML representation and writes this encoding to the given OutputStream with indentation.

Parameters:
output - a stream into which the XML-encoded data is written
indenter - an object that creates indentation strings

Sun's XACML Implementation Version 1.2

Copyright 2003-2004 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.

Sun, Sun Microsystems, the Sun Logo, and Java are trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries.