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

Quick Search    Search Deep

com.sun.xacml
Interface EvaluationCtx  view EvaluationCtx download EvaluationCtx.java

All Known Implementing Classes:
BasicEvaluationCtx

public interface EvaluationCtx

Manages the context of a single policy evaluation. Typically, an instance is instantiated whenever the PDP gets a request and needs to perform an evaluation as a result.

Note that this class does some optional caching for current date, time, and dateTime values (defined by a boolean flag to the constructors). The XACML specification requires that these values always be available, but it does not specify whether or not they must 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:
1.0

Field Summary
static java.lang.String RESOURCE_ID
          The standard URI for listing a resource's id
static java.lang.String RESOURCE_SCOPE
          The standard URI for listing a resource's scope
static int SCOPE_CHILDREN
          Resource scope of Children (the given resource and its direct children)
static int SCOPE_DESCENDANTS
          Resource scope of Descendants (the given resource and all descendants at any depth or distance)
static int SCOPE_IMMEDIATE
          Resource scope of Immediate (only the given resource)
 
Method Summary
 com.sun.xacml.cond.EvaluationResult getActionAttribute(java.net.URI type, java.net.URI id, java.net.URI issuer)
          Returns available action attribute value(s).
 com.sun.xacml.cond.EvaluationResult getAttribute(java.lang.String contextPath, org.w3c.dom.Node namespaceNode, java.net.URI type, java.lang.String xpathVersion)
          Returns the attribute value(s) retrieved using the given XPath expression.
 com.sun.xacml.finder.AttributeFinder getAttributeFinder()
          Deprecated. As of version 1.2, this method should not be used, as it provides access to a mutable interface. This method will be removed in the next major release.
 com.sun.xacml.attr.DateAttribute getCurrentDate()
          Returns the cached value for the current date.
 com.sun.xacml.attr.DateTimeAttribute getCurrentDateTime()
          Returns the cached value for the current dateTime.
 com.sun.xacml.attr.TimeAttribute getCurrentTime()
          Returns the cached value for the current time.
 com.sun.xacml.cond.EvaluationResult getEnvironmentAttribute(java.net.URI type, java.net.URI id, java.net.URI issuer)
          Returns available environment attribute value(s).
 org.w3c.dom.Node getRequestRoot()
          Returns the DOM root of the original RequestType XML document, if this context is backed by an XACML Request.
 com.sun.xacml.cond.EvaluationResult getResourceAttribute(java.net.URI type, java.net.URI id, java.net.URI issuer)
          Returns available resource attribute value(s).
 com.sun.xacml.attr.AttributeValue getResourceId()
          Returns the identifier for the resource being requested.
 int getScope()
          Returns the resource scope, which will be one of the three fields denoting Immediate, Children, or Descendants.
 com.sun.xacml.cond.EvaluationResult getSubjectAttribute(java.net.URI type, java.net.URI id, java.net.URI category)
          Returns available subject attribute value(s) ignoring the issuer.
 com.sun.xacml.cond.EvaluationResult getSubjectAttribute(java.net.URI type, java.net.URI id, java.net.URI issuer, java.net.URI category)
          Returns available subject attribute value(s).
 void setCurrentDate(com.sun.xacml.attr.DateAttribute currentDate)
          Sets the current date for this evaluation.
 void setCurrentDateTime(com.sun.xacml.attr.DateTimeAttribute currentDateTime)
          Sets the current dateTime for this evaluation.
 void setCurrentTime(com.sun.xacml.attr.TimeAttribute currentTime)
          Sets the current time for this evaluation.
 void setResourceId(com.sun.xacml.attr.AttributeValue resourceId)
          Changes the value of the resource-id attribute in this context.
 

Field Detail

RESOURCE_ID

public static final java.lang.String RESOURCE_ID
The standard URI for listing a resource's id

See Also:
Constant Field Values

RESOURCE_SCOPE

public static final java.lang.String RESOURCE_SCOPE
The standard URI for listing a resource's scope

See Also:
Constant Field Values

SCOPE_IMMEDIATE

public static final int SCOPE_IMMEDIATE
Resource scope of Immediate (only the given resource)

See Also:
Constant Field Values

SCOPE_CHILDREN

public static final int SCOPE_CHILDREN
Resource scope of Children (the given resource and its direct children)

See Also:
Constant Field Values

SCOPE_DESCENDANTS

public static final int SCOPE_DESCENDANTS
Resource scope of Descendants (the given resource and all descendants at any depth or distance)

See Also:
Constant Field Values
Method Detail

getAttributeFinder

public com.sun.xacml.finder.AttributeFinder getAttributeFinder()
Deprecated. As of version 1.2, this method should not be used, as it provides access to a mutable interface. This method will be removed in the next major release.

Returns the AttributeFinder used by this context.


getRequestRoot

public org.w3c.dom.Node getRequestRoot()
Returns the DOM root of the original RequestType XML document, if this context is backed by an XACML Request. If this context is not backed by an XML representation, then an exception is thrown.


getResourceId

public com.sun.xacml.attr.AttributeValue getResourceId()
Returns the identifier for the resource being requested.


getScope

public int getScope()
Returns the resource scope, which will be one of the three fields denoting Immediate, Children, or Descendants.


setResourceId

public void setResourceId(com.sun.xacml.attr.AttributeValue resourceId)
Changes the value of the resource-id attribute in this context. This is useful when you have multiple resources (ie, a scope other than IMMEDIATE), and you need to keep changing only the resource-id to evaluate the different effective requests.


getCurrentTime

public com.sun.xacml.attr.TimeAttribute getCurrentTime()
Returns the cached value for the current time. If the value has never been set by a call to setCurrentTime, or if caching is not enabled in this instance, then this will return null.


setCurrentTime

public void setCurrentTime(com.sun.xacml.attr.TimeAttribute currentTime)
Sets the current time for this evaluation. If caching is not enabled for this instance then the value is ignored.


getCurrentDate

public com.sun.xacml.attr.DateAttribute getCurrentDate()
Returns the cached value for the current date. If the value has never been set by a call to setCurrentDate, or if caching is not enabled in this instance, then this will return null.


setCurrentDate

public void setCurrentDate(com.sun.xacml.attr.DateAttribute currentDate)
Sets the current date for this evaluation. If caching is not enabled for this instance then the value is ignored.


getCurrentDateTime

public com.sun.xacml.attr.DateTimeAttribute getCurrentDateTime()
Returns the cached value for the current dateTime. If the value has never been set by a call to setCurrentDateTime, or if caching is not enabled in this instance, then this will return null.


setCurrentDateTime

public void setCurrentDateTime(com.sun.xacml.attr.DateTimeAttribute currentDateTime)
Sets the current dateTime for this evaluation. If caching is not enabled for this instance then the value is ignored.


getSubjectAttribute

public com.sun.xacml.cond.EvaluationResult getSubjectAttribute(java.net.URI type,
                                                               java.net.URI id,
                                                               java.net.URI category)
Returns available subject attribute value(s) ignoring the issuer.


getSubjectAttribute

public com.sun.xacml.cond.EvaluationResult getSubjectAttribute(java.net.URI type,
                                                               java.net.URI id,
                                                               java.net.URI issuer,
                                                               java.net.URI category)
Returns available subject attribute value(s).


getResourceAttribute

public com.sun.xacml.cond.EvaluationResult getResourceAttribute(java.net.URI type,
                                                                java.net.URI id,
                                                                java.net.URI issuer)
Returns available resource attribute value(s).


getActionAttribute

public com.sun.xacml.cond.EvaluationResult getActionAttribute(java.net.URI type,
                                                              java.net.URI id,
                                                              java.net.URI issuer)
Returns available action attribute value(s).


getEnvironmentAttribute

public com.sun.xacml.cond.EvaluationResult getEnvironmentAttribute(java.net.URI type,
                                                                   java.net.URI id,
                                                                   java.net.URI issuer)
Returns available environment attribute value(s).


getAttribute

public com.sun.xacml.cond.EvaluationResult getAttribute(java.lang.String contextPath,
                                                        org.w3c.dom.Node namespaceNode,
                                                        java.net.URI type,
                                                        java.lang.String xpathVersion)
Returns the attribute value(s) retrieved using the given XPath expression.