org.orbeon.oxf.pipeline.api
Class PipelineContext

java.lang.Object
  extended byorg.orbeon.oxf.pipeline.api.PipelineContext

public class PipelineContext
extends Object

PipelineContext represents a context object passed to all the processors running in a given pipeline session.


Nested Class Summary
static interface PipelineContext.ContextListener
          ContextListener interface to listen on PipelineContext events.
static class PipelineContext.ContextListenerAdapter
          ContextListener adapter class to faciliate implementations of the ContextListener interface.
 
Field Summary
static String DATASOURCE_CONTEXT
           
static String EXTERNAL_CONTEXT
          Key name for the EXTERNAL_CONTEXT attribute of type ExternalContext.
static String FILTER_CHAIN
           
static String JNDI_CONTEXT
           
static String LOCATION_DATA
           
static String PARENT_PROCESSORS
           
static String PORTLET_CONFIG
           
static String REQUEST
           
static String REQUEST_GENERATOR_CONTEXT
           
static String SQL_PROCESSOR_CONTEXT
           
static String THROWABLE
           
static String XSLT_STYLESHEET_URI_LISTENER
           
 
Constructor Summary
PipelineContext()
           
 
Method Summary
 void addContextListener(PipelineContext.ContextListener listener)
          Add a new listener to the context.
 void destroy(boolean success)
          Destroy the pipeline context.
 Object getAttribute(Object key)
          Get an attribute in the context.
 boolean isDestroyed()
          Check whether this context has been destroyed.
 void setAttribute(Object key, Object o)
          Set an attribute in the context.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EXTERNAL_CONTEXT

public static final String EXTERNAL_CONTEXT
Key name for the EXTERNAL_CONTEXT attribute of type ExternalContext.

See Also:
Constant Field Values

FILTER_CHAIN

public static final String FILTER_CHAIN
See Also:
Constant Field Values

PORTLET_CONFIG

public static final String PORTLET_CONFIG
See Also:
Constant Field Values

JNDI_CONTEXT

public static final String JNDI_CONTEXT
See Also:
Constant Field Values

PARENT_PROCESSORS

public static final String PARENT_PROCESSORS
See Also:
Constant Field Values

THROWABLE

public static final String THROWABLE
See Also:
Constant Field Values

LOCATION_DATA

public static final String LOCATION_DATA
See Also:
Constant Field Values

REQUEST_GENERATOR_CONTEXT

public static final String REQUEST_GENERATOR_CONTEXT
See Also:
Constant Field Values

SQL_PROCESSOR_CONTEXT

public static final String SQL_PROCESSOR_CONTEXT
See Also:
Constant Field Values

XSLT_STYLESHEET_URI_LISTENER

public static final String XSLT_STYLESHEET_URI_LISTENER
See Also:
Constant Field Values

DATASOURCE_CONTEXT

public static final String DATASOURCE_CONTEXT
See Also:
Constant Field Values

REQUEST

public static final String REQUEST
See Also:
Constant Field Values
Constructor Detail

PipelineContext

public PipelineContext()
Method Detail

setAttribute

public void setAttribute(Object key,
                         Object o)
Set an attribute in the context.

Parameters:
key - the attribute key
o - the attribute value to associate with the key

getAttribute

public Object getAttribute(Object key)
Get an attribute in the context.

Parameters:
key - the attribute key
Returns:
the attribute value, null if there is no attribute with the given key

addContextListener

public void addContextListener(PipelineContext.ContextListener listener)
Add a new listener to the context.

Parameters:
listener -

destroy

public void destroy(boolean success)
Destroy the pipeline context. This method must be called on the context whether the pipeline terminated successfully or not.


isDestroyed

public boolean isDestroyed()
Check whether this context has been destroyed.

Returns:
true if the context has been destroyed, false otherwise