org.wso2.balana.ctx
Interface EvaluationCtx

All Known Implementing Classes:
BasicEvaluationCtx, XACML2EvaluationCtx, XACML3EvaluationCtx

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. There are two implementations of XACML3EvaluationCtx class for XACML3 and XACML3EvaluationCtx for XACML2

Since:
1.0
Author:
Seth Proctor

Method Summary
 EvaluationResult getAttribute(String path, URI type, URI category, URI contextSelector, String xpathVersion)
          Returns the attribute value(s) retrieved using the given XPath expression.
 EvaluationResult getAttribute(URI type, URI id, String issuer, URI category)
          Returns available subject attribute value(s).
 DateAttribute getCurrentDate()
          Returns the value for the current date as known by the PDP (if this value was also supplied in the Request, this will generally be a different value).
 DateTimeAttribute getCurrentDateTime()
          Returns the value for the current dateTime as known by the PDP (if this value was also supplied in the Request, this will generally be a different value).
 TimeAttribute getCurrentTime()
          Returns the value for the current time as known by the PDP (if this value was also supplied in the Request, this will generally be a different value).
 MultipleCtxResult getMultipleEvaluationCtx()
          Returns multiple context results.
 AbstractRequestCtx getRequestCtx()
          Returns XACML request
 Node getRequestRoot()
          Returns the DOM root of the original RequestType XML document, if this context is backed by an XACML Request.
 int getXacmlVersion()
          Returns XACML version of the context
 boolean isSearching()
          TODO what is this ?
 

Method Detail

getRequestRoot

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.

Returns:
the DOM root node
Throws:
UnsupportedOperationException - if the context is not backed by an XML representation

isSearching

boolean isSearching()
TODO what is this ?

Returns:

getCurrentTime

TimeAttribute getCurrentTime()
Returns the value for the current time as known by the PDP (if this value was also supplied in the Request, this will generally be a different value). Details of caching or location-based resolution are left to the underlying implementation.

Returns:
the current time

getCurrentDate

DateAttribute getCurrentDate()
Returns the value for the current date as known by the PDP (if this value was also supplied in the Request, this will generally be a different value). Details of caching or location-based resolution are left to the underlying implementation.

Returns:
the current date

getCurrentDateTime

DateTimeAttribute getCurrentDateTime()
Returns the value for the current dateTime as known by the PDP (if this value was also supplied in the Request, this will generally be a different value). Details of caching or location-based resolution are left to the underlying implementation.

Returns:
the current date

getAttribute

EvaluationResult getAttribute(URI type,
                              URI id,
                              String issuer,
                              URI category)
Returns available subject attribute value(s).

Parameters:
type - the type of the attribute value(s) to find
id - the id of the attribute value(s) to find
issuer - the issuer of the attribute value(s) to find or null
category - the category the attribute value(s) must be in
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

getAttribute

EvaluationResult getAttribute(String path,
                              URI type,
                              URI category,
                              URI contextSelector,
                              String xpathVersion)
Returns the attribute value(s) retrieved using the given XPath expression.

Parameters:
path - the XPath expression to search
type - the type of the attribute value(s) to find
category - the category the attribute value(s) must be in
contextSelector - the selector to find the context to apply XPath expression if this is null, applied for default content
xpathVersion - the version of XPath to use
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

getXacmlVersion

int getXacmlVersion()
Returns XACML version of the context

Returns:
version

getRequestCtx

AbstractRequestCtx getRequestCtx()
Returns XACML request

Returns:
AbstractRequestCtx

getMultipleEvaluationCtx

MultipleCtxResult getMultipleEvaluationCtx()
Returns multiple context results. if, request is combination of multiple requests

Returns:
MultipleCtxResult


Copyright © 2015 WSO2. All rights reserved.