public abstract class BasicEvaluationCtx extends Object implements EvaluationCtx
EvaluationCtx
. This implements some generic methods that
commons to most of the implementationsModifier and Type | Field and Description |
---|---|
protected DateAttribute |
currentDate
the cached current date, time, and date time,
which we may or may not be using depending on how this object was constructed
|
protected DateTimeAttribute |
currentDateTime |
protected TimeAttribute |
currentTime |
protected PDPConfig |
pdpConfig
PDP configurations
|
protected AbstractRequestCtx |
requestCtx
Represents a XACML request made to the PDP
|
protected Node |
requestRoot
the DOM root the original RequestContext document
|
protected boolean |
useCachedEnvValues
TODO what is this?
|
Constructor and Description |
---|
BasicEvaluationCtx() |
Modifier and Type | Method and Description |
---|---|
protected EvaluationResult |
callHelper(URI type,
URI id,
String issuer,
URI category)
Private helper that calls the finder if it's non-null, or else returns an empty bag
|
EvaluationResult |
getAttribute(String path,
URI type,
URI category,
URI contextSelector,
String xpathVersion)
Returns the attribute value(s) retrieved using the given XPath expression.
|
DateAttribute |
getCurrentDate()
Returns the value for the current date.
|
DateTimeAttribute |
getCurrentDateTime()
Returns the value for the current dateTime.
|
TimeAttribute |
getCurrentTime()
Returns the value for the current time.
|
AbstractRequestCtx |
getRequestCtx()
Returns XACML request
|
Node |
getRequestRoot()
Returns the DOM root of the original RequestType XML document.
|
boolean |
isSearching()
TODO
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getAttribute, getMultipleEvaluationCtx, getXacmlVersion
protected DateAttribute currentDate
protected TimeAttribute currentTime
protected DateTimeAttribute currentDateTime
protected boolean useCachedEnvValues
protected Node requestRoot
protected AbstractRequestCtx requestCtx
protected PDPConfig pdpConfig
public Node getRequestRoot()
getRequestRoot
in interface EvaluationCtx
public boolean isSearching()
isSearching
in interface EvaluationCtx
public TimeAttribute getCurrentTime()
getCurrentTime
in interface EvaluationCtx
public DateAttribute getCurrentDate()
getCurrentDate
in interface EvaluationCtx
public DateTimeAttribute getCurrentDateTime()
getCurrentDateTime
in interface EvaluationCtx
public AbstractRequestCtx getRequestCtx()
EvaluationCtx
getRequestCtx
in interface EvaluationCtx
AbstractRequestCtx
public EvaluationResult getAttribute(String path, URI type, URI category, URI contextSelector, String xpathVersion)
getAttribute
in interface EvaluationCtx
path
- the XPath expression to searchtype
- the type of the attribute value(s) to findcategory
- the category the attribute value(s) must be incontextSelector
- the selector to find the context to apply XPath expression
if this is null, applied for default contentxpathVersion
- the version of XPath to useprotected EvaluationResult callHelper(URI type, URI id, String issuer, URI category)
type
- the type of the attribute value(s) to findid
- the id of the attribute value(s) to findissuer
- the issuer of the attribute value(s) to find or nullcategory
- the category the attribute value(s) must be inCopyright © 2015 WSO2. All rights reserved.