org.wso2.balana.ctx
Class AbstractRequestCtx

java.lang.Object
  extended by org.wso2.balana.ctx.AbstractRequestCtx
Direct Known Subclasses:
RequestCtx, RequestCtx

public abstract class AbstractRequestCtx
extends Object

Represents a XACML request made to the PDP. This is the class that contains all the data used to start a policy evaluation.abstract class has been defined to give a unique interface for both XACML 2.0 and XACML 3.0 RequestCtx


Field Summary
protected  Set<Attributes> attributesSet
          XACML3 attributes as Attributes objects
protected  Node documentRoot
           
protected  boolean isSearch
           
protected  int xacmlVersion
           
 
Constructor Summary
AbstractRequestCtx()
           
 
Method Summary
abstract  void encode(OutputStream output)
          Encodes this AbstractRequestCtx into its XML representation and writes this encoding to the given OutputStream.
abstract  void encode(OutputStream output, Indenter indenter)
          Encodes this AbstractRequestCtx into its XML representation and writes this encoding to the given OutputStream with indentation.
 Set<Attributes> getAttributesSet()
          Returns a Set containing Attribute objects.
 Node getDocumentRoot()
          Returns the root DOM node of the document used to create this object, or null if this object was created by hand (ie, not through the getInstance method) or if the root node was not provided to the constructor.
 int getXacmlVersion()
           
 boolean isSearch()
           
 void setSearch(boolean isSearch)
           
 void setXacmlVersion(int xacmlVersion)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

xacmlVersion

protected int xacmlVersion

documentRoot

protected Node documentRoot

attributesSet

protected Set<Attributes> attributesSet
XACML3 attributes as Attributes objects


isSearch

protected boolean isSearch
Constructor Detail

AbstractRequestCtx

public AbstractRequestCtx()
Method Detail

getDocumentRoot

public Node getDocumentRoot()
Returns the root DOM node of the document used to create this object, or null if this object was created by hand (ie, not through the getInstance method) or if the root node was not provided to the constructor.

Returns:
the root DOM node or null

setSearch

public void setSearch(boolean isSearch)

isSearch

public boolean isSearch()

getXacmlVersion

public int getXacmlVersion()

setXacmlVersion

public void setXacmlVersion(int xacmlVersion)

getAttributesSet

public Set<Attributes> getAttributesSet()
Returns a Set containing Attribute objects.

Returns:
the request' s all attributes as Set

encode

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

Parameters:
output - a stream into which the XML-encoded data is written
indenter - an object that creates indentation strings

encode

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

Parameters:
output - a stream into which the XML-encoded data is written


Copyright © 2015 WSO2. All rights reserved.