org.wso2.balana.ctx.xacml3
Class XACML3EvaluationCtx

java.lang.Object
  extended by org.wso2.balana.ctx.BasicEvaluationCtx
      extended by org.wso2.balana.ctx.xacml3.XACML3EvaluationCtx
All Implemented Interfaces:
EvaluationCtx

public class XACML3EvaluationCtx
extends BasicEvaluationCtx

This is implementation of XACML3 evaluation context


Field Summary
 
Fields inherited from class org.wso2.balana.ctx.BasicEvaluationCtx
currentDate, currentDateTime, currentTime, pdpConfig, requestRoot, useCachedEnvValues
 
Constructor Summary
XACML3EvaluationCtx(RequestCtx requestCtx, PDPConfig pdpConfig)
          Creates a new XACML3EvaluationCtx
 
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).
 List<Attributes> getAttributes(String category)
           
 Set<Attributes> getAttributesSet()
           
 Map<String,List<Attributes>> getMapAttributes()
           
 Set<Attributes> getMultipleContentSelectors()
           
 MultipleCtxResult getMultipleEvaluationCtx()
          Returns multiple context results.
 Set<PolicyReference> getPolicyReferences()
           
 AbstractRequestCtx getRequestCtx()
          Returns XACML request
 Attribute getResourceId()
           
 int getResourceScope()
           
 Attribute getResourceScopeAttribute()
           
 int getXacmlVersion()
          Returns XACML version of the context
 boolean isMultipleAttributes()
           
 void setPolicyReferences(Set<PolicyReference> policyReferences)
           
 void setResourceId(AttributeValue resourceId, Set<Attributes> attributesSet)
          Changes the value of the resource-id attribute in this context.
 
Methods inherited from class org.wso2.balana.ctx.BasicEvaluationCtx
callHelper, getCurrentDate, getCurrentDateTime, getCurrentTime, getRequestRoot, isSearching
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XACML3EvaluationCtx

public XACML3EvaluationCtx(RequestCtx requestCtx,
                           PDPConfig pdpConfig)
Creates a new XACML3EvaluationCtx

Parameters:
requestCtx - XACML3 RequestCtx
pdpConfig - PDP configurations
Method Detail

getAttribute

public EvaluationResult getAttribute(URI type,
                                     URI id,
                                     String issuer,
                                     URI category)
Description copied from interface: EvaluationCtx
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

public EvaluationResult getAttribute(String path,
                                     URI type,
                                     URI category,
                                     URI contextSelector,
                                     String xpathVersion)
Description copied from class: BasicEvaluationCtx
Returns the attribute value(s) retrieved using the given XPath expression.

Specified by:
getAttribute in interface EvaluationCtx
Overrides:
getAttribute in class BasicEvaluationCtx
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

public int getXacmlVersion()
Description copied from interface: EvaluationCtx
Returns XACML version of the context

Returns:
version

getMultipleEvaluationCtx

public MultipleCtxResult getMultipleEvaluationCtx()
Description copied from interface: EvaluationCtx
Returns multiple context results. if, request is combination of multiple requests

Returns:
MultipleCtxResult

setResourceId

public void setResourceId(AttributeValue resourceId,
                          Set<Attributes> attributesSet)
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.

Parameters:
resourceId - resourceId the new resource-id value
attributesSet - a Set of Attributes

isMultipleAttributes

public boolean isMultipleAttributes()

getRequestCtx

public AbstractRequestCtx getRequestCtx()
Description copied from interface: EvaluationCtx
Returns XACML request

Specified by:
getRequestCtx in interface EvaluationCtx
Overrides:
getRequestCtx in class BasicEvaluationCtx
Returns:
AbstractRequestCtx

getPolicyReferences

public Set<PolicyReference> getPolicyReferences()
Returns:

setPolicyReferences

public void setPolicyReferences(Set<PolicyReference> policyReferences)
Parameters:
policyReferences -

getAttributes

public List<Attributes> getAttributes(String category)
Parameters:
category -
Returns:

getMultipleContentSelectors

public Set<Attributes> getMultipleContentSelectors()

getMapAttributes

public Map<String,List<Attributes>> getMapAttributes()

getAttributesSet

public Set<Attributes> getAttributesSet()

getResourceId

public Attribute getResourceId()

getResourceScope

public int getResourceScope()

getResourceScopeAttribute

public Attribute getResourceScopeAttribute()


Copyright © 2015 WSO2. All rights reserved.