org.jboss.security.xacml.core
Class JBossResponseContext

java.lang.Object
  extended by org.jboss.security.xacml.core.JBossResponseContext
All Implemented Interfaces:
ContextMapOp, ElementMappingType, ResponseContext

public class JBossResponseContext
extends Object
implements ResponseContext

Implementation of the ResponseContext interface

Since:
Jul 6, 2007
Version:
$Revision$
Author:
Anil.Saldhana@redhat.com

Constructor Summary
JBossResponseContext()
           
 
Method Summary
 Element asElement(Document root)
          Return a new Element given the owner document
<T> T
get(String key)
          Get an element from the map
 int getDecision()
          Decision based on the evaluation of policies
 Node getDocumentElement()
          Return the element of the document from where the response was created if available Null if no parsing was involved
 ResultType getResult()
          Get the result
 void marshall(OutputStream os)
          Marshall the response context onto an Output Stream
 void readResponse(InputStream is)
          Read a response from an input stream
 void readResponse(Node node)
          Read a preparsed Node
<T> void
set(String key, T obj)
          Set an object on the map
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JBossResponseContext

public JBossResponseContext()
Method Detail

get

public <T> T get(String key)
Description copied from interface: ContextMapOp
Get an element from the map

Specified by:
get in interface ContextMapOp
Type Parameters:
T - object from the map
Parameters:
key - Key
Returns:
object from the map
See Also:
ContextMapOp.get(String)

set

public <T> void set(String key,
                    T obj)
Description copied from interface: ContextMapOp
Set an object on the map

Specified by:
set in interface ContextMapOp
Parameters:
key - Key for the map
obj - Object to be placed
See Also:
ContextMapOp.set(String, Object)

getDecision

public int getDecision()
Description copied from interface: ResponseContext
Decision based on the evaluation of policies

Specified by:
getDecision in interface ResponseContext
Returns:
int value XACMLConstants.DECISION_PERMIT
See Also:
ResponseContext.getDecision()

getResult

public ResultType getResult()
Description copied from interface: ResponseContext
Get the result

Specified by:
getResult in interface ResponseContext
Returns:
See Also:
ResponseContext.getResult()

getDocumentElement

public Node getDocumentElement()
Description copied from interface: ResponseContext
Return the element of the document from where the response was created if available Null if no parsing was involved

Specified by:
getDocumentElement in interface ResponseContext
Returns:
See Also:
ResponseContext.getDocumentElement()

marshall

public void marshall(OutputStream os)
              throws IOException
Description copied from interface: ResponseContext
Marshall the response context onto an Output Stream

Specified by:
marshall in interface ResponseContext
Parameters:
os - OutputStream (System.out, ByteArrayOutputStream etc)
Throws:
IOException
See Also:
ResponseContext.marshall(OutputStream)

readResponse

public void readResponse(InputStream is)
                  throws Exception
Description copied from interface: ResponseContext
Read a response from an input stream

Specified by:
readResponse in interface ResponseContext
Throws:
Exception
See Also:
ResponseContext.readResponse(InputStream)

readResponse

public void readResponse(Node node)
                  throws IOException
Description copied from interface: ResponseContext
Read a preparsed Node

Specified by:
readResponse in interface ResponseContext
Throws:
IOException
See Also:
ResponseContext.readResponse(Node)

asElement

public Element asElement(Document root)
Description copied from interface: ElementMappingType
Return a new Element given the owner document

Specified by:
asElement in interface ElementMappingType
Returns:
See Also:
ElementMappingType.asElement(Document)


Copyright © 2009 JBoss, a division of Red Hat, Inc.. All Rights Reserved.