org.wso2.balana.ctx.xacml2
Class XACML2EvaluationCtx

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

public class XACML2EvaluationCtx
extends BasicEvaluationCtx


Field Summary
 
Fields inherited from class org.wso2.balana.ctx.BasicEvaluationCtx
pdpConfig
 
Constructor Summary
XACML2EvaluationCtx()
           
XACML2EvaluationCtx(RequestCtx requestCtx, PDPConfig pdpConfig)
           
 
Method Summary
 EvaluationResult getActionAttribute(URI type, URI id, URI category, String issuer)
          Returns attribute value(s) from the action section of the request.
 EvaluationResult getAttribute(URI type, URI id, String issuer, URI category)
          Returns available subject attribute value(s).
 EvaluationResult getEnvironmentAttribute(URI type, URI id, URI category, String issuer)
          Returns attribute value(s) from the environment section of the request.
 MultipleCtxResult getMultipleEvaluationCtx()
          Returns multiple context results.
 PDPConfig getPdpConfig()
           
 AbstractRequestCtx getRequestCtx()
          Returns XACML request
 EvaluationResult getResourceAttribute(URI type, URI id, URI category, String issuer)
          Returns attribute value(s) from the resource section of the request.
 AttributeValue getResourceId()
          Returns the resource named in the request as resource-id.
 int getResourceScope()
           
 int getScope()
          Returns the resource scope of the request, which will be one of the three fields denoting Immediate, Children, or Descendants.
 EvaluationResult getSubjectAttribute(URI type, URI id, URI category, String issuer)
          Returns attribute value(s) from the subject section of the request.
 int getXacmlVersion()
          Returns XACML version of the context
 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, getAttribute, 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

XACML2EvaluationCtx

public XACML2EvaluationCtx()

XACML2EvaluationCtx

public XACML2EvaluationCtx(RequestCtx requestCtx,
                           PDPConfig pdpConfig)
                    throws ParsingException
Throws:
ParsingException
Method Detail

getScope

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

Returns:
the scope of the resource in the request

getResourceId

public AttributeValue getResourceId()
Returns the resource named in the request as resource-id.

Returns:
the resource

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 - the new resource-id value

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

getXacmlVersion

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

Returns:
version

getSubjectAttribute

public EvaluationResult getSubjectAttribute(URI type,
                                            URI id,
                                            URI category,
                                            String issuer)
Returns attribute value(s) from the subject section of the request.

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

getResourceAttribute

public EvaluationResult getResourceAttribute(URI type,
                                             URI id,
                                             URI category,
                                             String issuer)
Returns attribute value(s) from the resource section of the request.

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
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

getActionAttribute

public EvaluationResult getActionAttribute(URI type,
                                           URI id,
                                           URI category,
                                           String issuer)
Returns attribute value(s) from the action section of the request.

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
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

getEnvironmentAttribute

public EvaluationResult getEnvironmentAttribute(URI type,
                                                URI id,
                                                URI category,
                                                String issuer)
Returns attribute value(s) from the environment section of the request.

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
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

getPdpConfig

public PDPConfig getPdpConfig()

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

getMultipleEvaluationCtx

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

Returns:
MultipleCtxResult

getResourceScope

public int getResourceScope()


Copyright © 2015 WSO2. All rights reserved.