com.cafesoft.cams.access.attr
Class StandardEvaluationContext

java.lang.Object
  extended by com.cafesoft.cams.access.attr.StandardEvaluationContext
All Implemented Interfaces:
EvaluationContext

public class StandardEvaluationContext
extends Object
implements EvaluationContext

StandardEvaluationContext is the standard implementation of the EvaluationContext interface. It manages the context during evaluation of Functions and other Evaluatable entities. An instance of this class is typically instantiated at the beginning of an some evaluation context (for example, when an AccessControlRule is evaluated).

NOTE: This class does some optional caching for current date, time, and dateTime values (defined by a boolean flag to the constructors). These values always be available but they do not necessarily need to remain constant over the course of an evaluation if the values are being generated by the PDP (if the values are provided in the Request, then obviously they will remain constant). The default behavior is for these environment values to be cached, so that (for example) the current time remains constant over the course of an evaluation.

Since:
4/14/2004

Constructor Summary
StandardEvaluationContext(InternalAccessControlRequest acReq)
          Create a new StandardEvaluationContext instance using the specified AccessControlRequest.
 
Method Summary
 EvaluationResult getAttribute(URI attrCategory, URI type, URI id)
          Returns attribute value(s) from the access control request.
 AttributeValue getResourceId()
          Returns the resource named in the request as resource-id.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StandardEvaluationContext

public StandardEvaluationContext(InternalAccessControlRequest acReq)
Create a new StandardEvaluationContext instance using the specified AccessControlRequest.

Parameters:
acReq - the AccessControlRequest.
Method Detail

getResourceId

public AttributeValue getResourceId()
Returns the resource named in the request as resource-id.

Specified by:
getResourceId in interface EvaluationContext
Returns:
the resource identifier as an AttributeValue.

getAttribute

public EvaluationResult getAttribute(URI attrCategory,
                                     URI type,
                                     URI id)
Returns attribute value(s) from the access control request.

Specified by:
getAttribute in interface EvaluationContext
Parameters:
attrCategory - the attribute category of the attribute value(s) to find
type - the type of the attribute value(s) to find
id - the id of the attribute value(s) to find
Returns:
a result containing a bag either empty because no values were found or containing at least one value, or status associated with an "indeterminate" result.


Generated on 10:38:35 AM April 14, 2011, © 1996-2010 Cafésoft LLC. All rights reserved.