public interface EvaluationCtx
BasicEvaluationCtx
class
provides a basic implementation that is used by default.Modifier and Type | Field and Description |
---|---|
static String |
RESOURCE_ID
The standard URI for listing a resource's id
|
static 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)
|
Modifier and Type | Method and Description |
---|---|
EvaluationResult |
getActionAttribute(URI type,
URI id,
URI issuer)
Returns available action attribute value(s).
|
EvaluationResult |
getAttribute(String contextPath,
Node namespaceNode,
URI type,
String xpathVersion)
Returns the attribute value(s) retrieved using the given XPath
expression.
|
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).
|
EvaluationResult |
getEnvironmentAttribute(URI type,
URI id,
URI issuer)
Returns available environment attribute value(s).
|
Node |
getRequestRoot()
Returns the DOM root of the original RequestType XML document, if
this context is backed by an XACML Request.
|
EvaluationResult |
getResourceAttribute(URI type,
URI id,
URI issuer)
Returns available resource attribute value(s).
|
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.
|
EvaluationResult |
getSubjectAttribute(URI type,
URI id,
URI category)
Returns available subject attribute value(s) ignoring the issuer.
|
EvaluationResult |
getSubjectAttribute(URI type,
URI id,
URI issuer,
URI category)
Returns available subject attribute value(s).
|
void |
setResourceId(AttributeValue resourceId)
Changes the value of the resource-id attribute in this context.
|
static final String RESOURCE_ID
static final String RESOURCE_SCOPE
static final int SCOPE_IMMEDIATE
static final int SCOPE_CHILDREN
static final int SCOPE_DESCENDANTS
Node getRequestRoot()
UnsupportedOperationException
- if the context is not backed
by an XML representationint getScope()
AttributeValue getResourceId()
void setResourceId(AttributeValue resourceId)
resourceId
- the new resource-id valueTimeAttribute getCurrentTime()
DateAttribute getCurrentDate()
DateTimeAttribute getCurrentDateTime()
EvaluationResult getSubjectAttribute(URI type, URI id, URI category)
type
- the type of the attribute value(s) to findid
- the id of the attribute value(s) to findcategory
- the category the attribute value(s) must be inEvaluationResult getSubjectAttribute(URI type, URI id, URI 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 inEvaluationResult getResourceAttribute(URI type, URI id, URI issuer)
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 nullEvaluationResult getActionAttribute(URI type, URI id, URI issuer)
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 nullEvaluationResult getEnvironmentAttribute(URI type, URI id, URI issuer)
Note that if you want to resolve the correct current date, time, or dateTime as seen from an evaluation point of view, you should use this method and supply the corresponding identifier.
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 nullEvaluationResult getAttribute(String contextPath, Node namespaceNode, URI type, String xpathVersion)
contextPath
- the XPath expression to searchnamespaceNode
- the DOM node defining namespace mappings to use,
or null if mappings come from the context roottype
- the type of the attribute value(s) to findxpathVersion
- the version of XPath to useCopyright © 2023 JBoss by Red Hat. All rights reserved.