Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.sun.xacml.cond
Class EvaluationResult  view EvaluationResult download EvaluationResult.java

java.lang.Object
  extended bycom.sun.xacml.cond.EvaluationResult

public class EvaluationResult
extends java.lang.Object

This is used in cases where a normal result is some AttributeValue, but if an attribute couldn't be resolved (or some other problem occurred), then a Status object needs to be returned instead. This is used instead of throwing an exception for performance, but mainly because failure to resolve an attribute is not an error case for the code, merely for the evaluation, and represents normal operation. Separate exception types will be added later to represent errors in pdp operation.

Since:
1.0

Field Summary
private static EvaluationResult falseBooleanResult
          Single instances of EvaluationResults with false and true BooleanAttributes in them.
private  com.sun.xacml.ctx.Status status
           
private static EvaluationResult trueBooleanResult
           
private  com.sun.xacml.attr.AttributeValue value
           
private  boolean wasInd
           
 
Constructor Summary
EvaluationResult(com.sun.xacml.attr.AttributeValue value)
          Constructor that creates an EvaluationResult containing a single AttributeValue
EvaluationResult(com.sun.xacml.ctx.Status status)
          Constructor that creates an EvaluationResult of Indeterminate, including Status data.
 
Method Summary
 com.sun.xacml.attr.AttributeValue getAttributeValue()
          Returns the attribute value, or null if there was an error
static EvaluationResult getFalseInstance()
          Returns an EvaluationResult that represents a false value.
static EvaluationResult getInstance(boolean value)
          Returns an EvaluationResult that represents the boolean value provided.
 com.sun.xacml.ctx.Status getStatus()
          Returns the status if there was an error, or null it no error occurred
static EvaluationResult getTrueInstance()
          Returns an EvaluationResult that represents a true value.
 boolean indeterminate()
          Returns true if the result was indeterminate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

wasInd

private boolean wasInd

value

private com.sun.xacml.attr.AttributeValue value

status

private com.sun.xacml.ctx.Status status

falseBooleanResult

private static EvaluationResult falseBooleanResult
Single instances of EvaluationResults with false and true BooleanAttributes in them. This avoids the need to create new objects when performing boolean operations, which we do a lot of.


trueBooleanResult

private static EvaluationResult trueBooleanResult
Constructor Detail

EvaluationResult

public EvaluationResult(com.sun.xacml.attr.AttributeValue value)
Constructor that creates an EvaluationResult containing a single AttributeValue


EvaluationResult

public EvaluationResult(com.sun.xacml.ctx.Status status)
Constructor that creates an EvaluationResult of Indeterminate, including Status data.

Method Detail

indeterminate

public boolean indeterminate()
Returns true if the result was indeterminate


getAttributeValue

public com.sun.xacml.attr.AttributeValue getAttributeValue()
Returns the attribute value, or null if there was an error


getStatus

public com.sun.xacml.ctx.Status getStatus()
Returns the status if there was an error, or null it no error occurred


getInstance

public static EvaluationResult getInstance(boolean value)
Returns an EvaluationResult that represents the boolean value provided.


getFalseInstance

public static EvaluationResult getFalseInstance()
Returns an EvaluationResult that represents a false value.


getTrueInstance

public static EvaluationResult getTrueInstance()
Returns an EvaluationResult that represents a true value.