atg.service.pipeline.processor
Class EmptyProcessor

java.lang.Object
  extended by atg.service.pipeline.processor.EmptyProcessor
All Implemented Interfaces:
PipelineProcessor

public class EmptyProcessor
extends java.lang.Object
implements PipelineProcessor

This processor does nothing at all. It is useful when you need to insert a no-op link into a pipeline chain to account for all possible transition values of some other link. It always returns a single value defined by the returnValue property, which defaults to 1.


Field Summary
static java.lang.String CLASS_VERSION
           
 
Fields inherited from interface atg.service.pipeline.PipelineProcessor
STOP_CHAIN_EXECUTION, STOP_CHAIN_EXECUTION_AND_COMMIT, STOP_CHAIN_EXECUTION_AND_ROLLBACK
 
Constructor Summary
EmptyProcessor()
           
 
Method Summary
 int[] getRetCodes()
          Get the list of return values this processor can return.
 int getReturnValue()
          Get the return value that this processor always returns.
 int runProcess(java.lang.Object pParam, PipelineResult pResult)
          Do nothing, and return the value specified by returnValue.
 void setReturnValue(int pReturnValue)
          Set the return value that this processor always returns.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CLASS_VERSION

public static java.lang.String CLASS_VERSION
Constructor Detail

EmptyProcessor

public EmptyProcessor()
Method Detail

setReturnValue

public void setReturnValue(int pReturnValue)
Set the return value that this processor always returns.


getReturnValue

public int getReturnValue()
Get the return value that this processor always returns.


getRetCodes

public int[] getRetCodes()
Get the list of return values this processor can return.

Specified by:
getRetCodes in interface PipelineProcessor
Returns:
an array of all the return codes that could be returned by this PipelineProcessor.

runProcess

public int runProcess(java.lang.Object pParam,
                      PipelineResult pResult)
               throws java.lang.Exception
Do nothing, and return the value specified by returnValue.

Specified by:
runProcess in interface PipelineProcessor
Parameters:
pParam - an optional user parameter
pResult - the PipelineResult object which is used to return errors or other data
Returns:
an integer value which is mapped to the next processor to execute. STOP_CHAIN_EXECUTION will notify the PipelineManager to stop execution. An unmapped value will throw a RunProcessException.
Throws:
java.lang.Exception