org.wso2.balana.ctx.xacml3
Class RequestCtx

java.lang.Object
  extended by org.wso2.balana.ctx.AbstractRequestCtx
      extended by org.wso2.balana.ctx.xacml3.RequestCtx

public class RequestCtx
extends AbstractRequestCtx

Represents a XACML3 request made to the PDP. This is the class that contains all the data used to start a policy evaluation.


Field Summary
 
Fields inherited from class org.wso2.balana.ctx.AbstractRequestCtx
attributesSet, documentRoot, isSearch, xacmlVersion
 
Constructor Summary
RequestCtx(Node documentRoot, Set<Attributes> attributesSet, boolean returnPolicyIdList, boolean combinedDecision, MultiRequests multiRequests, RequestDefaults defaults)
          Constructor that creates a RequestCtx from components.
RequestCtx(Set<Attributes> attributesSet, Node documentRoot)
          Constructor that creates a RequestCtx from components.
 
Method Summary
 void encode(OutputStream output)
          Encodes this AbstractRequestCtx into its XML representation and writes this encoding to the given OutputStream.
 void encode(OutputStream output, Indenter indenter)
          Encodes this AbstractRequestCtx into its XML representation and writes this encoding to the given OutputStream with indentation.
 RequestDefaults getDefaults()
          Returns a RequestDefaults that encapsulates RequestDefaults element in request
static RequestCtx getInstance(Node root)
          Create a new RequestCtx by parsing a node.
 MultiRequests getMultiRequests()
          Returns a MultiRequests that encapsulates MultiRequests element in request
 boolean isCombinedDecision()
          Returns a boolean value whether to combine decisions or not
 boolean isReturnPolicyIdList()
          Returns a boolean value whether to send back policy list of not
 
Methods inherited from class org.wso2.balana.ctx.AbstractRequestCtx
getAttributesSet, getDocumentRoot, getXacmlVersion, isSearch, setSearch, setXacmlVersion
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RequestCtx

public RequestCtx(Set<Attributes> attributesSet,
                  Node documentRoot)
Constructor that creates a RequestCtx from components.

Parameters:
attributesSet - a Set of Attributess
documentRoot - the root node of the DOM tree for this request
Throws:
IllegalArgumentException - if the inputs are not well formed

RequestCtx

public RequestCtx(Node documentRoot,
                  Set<Attributes> attributesSet,
                  boolean returnPolicyIdList,
                  boolean combinedDecision,
                  MultiRequests multiRequests,
                  RequestDefaults defaults)
           throws IllegalArgumentException
Constructor that creates a RequestCtx from components.

Parameters:
documentRoot - the root node of the DOM tree for this request
attributesSet - a Set of Attributess
returnPolicyIdList - a boolean value whether to send back policy list of not
combinedDecision - a boolean value whether to combine decisions or not
multiRequests - a MultiRequests for the MultiRequests element in request
defaults - a RequestDefaults for the RequestDefaults element in request
Throws:
IllegalArgumentException - if the inputs are not well formed
Method Detail

getInstance

public static RequestCtx getInstance(Node root)
                              throws ParsingException
Create a new RequestCtx by parsing a node. This node should be created by schema-verified parsing of an XML document.

Parameters:
root - the node to parse for the RequestCtx
Returns:
a new RequestCtx constructed by parsing
Throws:
ParsingException - if the DOM node is invalid

isCombinedDecision

public boolean isCombinedDecision()
Returns a boolean value whether to combine decisions or not

Returns:
true of false

isReturnPolicyIdList

public boolean isReturnPolicyIdList()
Returns a boolean value whether to send back policy list of not

Returns:
true or false

getMultiRequests

public MultiRequests getMultiRequests()
Returns a MultiRequests that encapsulates MultiRequests element in request

Returns:
MultiRequests element in request

getDefaults

public RequestDefaults getDefaults()
Returns a RequestDefaults that encapsulates RequestDefaults element in request

Returns:
RequestDefaults element in request

encode

public void encode(OutputStream output,
                   Indenter indenter)
Encodes this AbstractRequestCtx into its XML representation and writes this encoding to the given OutputStream with indentation.

Specified by:
encode in class AbstractRequestCtx
Parameters:
output - a stream into which the XML-encoded data is written
indenter - an object that creates indentation strings

encode

public void encode(OutputStream output)
Encodes this AbstractRequestCtx into its XML representation and writes this encoding to the given OutputStream. No indentation is used.

Specified by:
encode in class AbstractRequestCtx
Parameters:
output - a stream into which the XML-encoded data is written


Copyright © 2015 WSO2. All rights reserved.