IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc

com.ibm.btt.automaton.ext
Class DSEStep

java.lang.Object
  extended by com.ibm.btt.base.BTTProcessorNotifier
      extended by com.ibm.btt.automaton.DSEAction
          extended by com.ibm.btt.automaton.ext.DSEStep
All Implemented Interfaces:
Action, Cacheable, Operation, ProcessorNotifier, java.io.Externalizable, java.io.Serializable

public abstract class DSEStep
extends DSEAction
implements Operation

This class is the base class which any step defined as an action inside a process flow definition should inherit from. This class implements the base Operation interface protocol providing access to the context and the formats defined for the processor under which the step is running.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.ibm.btt.automaton.DSEAction
context, inputMapFmtTag, operationTag, outputMapFmtTag, sourceEvent, tag
 
Fields inherited from class com.ibm.btt.base.BTTProcessorNotifier
handlersList, name
 
Constructor Summary
DSEStep()
          This constructor creates a DSEAction object.
 
Method Summary
 DataElement addElement(DataElement aDataElement)
          Adds an element aDataElement to the KeyedCollection of the processor.
 void addOperationRepliedListener(OperationRepliedListener newListener)
          Adds an operation replied listener.
 void chainTo(Context aContext)
          Sets the receiving context as a child of aContext and as the new current child.
 void close()
          This method must include whatever housekeeping process before ending the processor.
 void execute()
          This method executes the executeStep of the step, that should be provided by any subclass of DSEStep and then signals the ok or error events according to the success of the execution
abstract  void executeStep()
          This method must be implemented by the subclasses in order to perform the specific steps.
 java.lang.String getApplicationId()
          Returns the value of the applicationId property.
 java.lang.String getContextName()
          Returns the context name.
 DataElement getElementAt(java.lang.String aCompositeKey)
          Returns the DataElement identified by the aCompositeKey parameter.
 java.lang.Object getFormat(java.lang.String aFormatName)
          Returns the formatElement named aFormatName from the formats Hashtable.
 Hashtable getFormats()
          * Returns the operation formats Hashtable.
 KeyedCollection getKeyedCollection()
          Returns the context keyedCollection.
protected  DSEOperationProcessor getOperationProcessor()
          This method returns the instance of DSEOperationProcessor which this step is running under.
 Context getParent()
          Returns the Context object defined as the parent context of the operation context.
 Service getService(java.lang.String aServiceName)
          Returns the service named aServiceName from the chain of contexts attached to the operation processor.
 java.lang.String getType()
          Returns the action context type.
 java.lang.Object getValueAt(java.lang.String aCompositeKey)
          Returns value of the data element identified by aConpositeKey.
 boolean isCacheable()
          This method returns false to indicate that this object is not supposed to be stored into the cache.
 boolean isChained()
          Returns true if the context is chained to the hierarchy.
 void prune()
          Removes the context from the hierarchy.
 void reinitialize()
          As long as the object is not cacheable, there is no need for reinitialization.
 DataElement removeAt(java.lang.String aCompositeKey)
          Removes the data element identified by aCompositeKey from the context data collection.
 void removeOperationRepliedListener(OperationRepliedListener newListener)
          Removes the operation replied listener.
 void setApplicationId(java.lang.String appId)
          Sets the value of the applicationId property.
 void setContextName(java.lang.String aContextName)
          Sets the context name to aContextName.
 void setKeyedCollection(KeyedCollection aKeyedCollection)
          Sets the context keyed collection to aKeyedCollection.
 void setType(java.lang.String aContextType)
          Sets the context type to aContextType.
 void setValueAt(java.lang.String aCompositeKey, java.lang.Object aDataValue)
          Sets the value of the data identified by aCompositeKey to aDataValue.
 void unchain()
          Removes the receiving context from the context hierarchy.
 java.lang.String[] xValidate()
          Returns a String that indicates if the validation has been achieved successfully or not.
 
Methods inherited from class com.ibm.btt.automaton.DSEAction
chainOrAssignContext, chainOrAssignContext, close, evaluateGuardCondition, externalizer, getContext, getGuardConditions, getInputMapFmtTag, getOperationTag, getOutputMapFmtTag, getParms, getProcessor, getSourceEvent, initializeFrom, mapTheInput, mapTheOutput, preProcess, readExternal, readExternal, removeExternal, setContext, setGuardConditions, setInputMapFmtTag, setOperationTag, setOutputMapFmtTag, setParms, setProcessor, setSourceEvent, toString, toStrings, toTags, writeExternal, writeExternal
 
Methods inherited from class com.ibm.btt.base.BTTProcessorNotifier
addHandler, getHandlersList, getName, removeHandler, setName, signalEvent, signalEvent, signalEvent, terminate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.ibm.btt.base.Operation
getContext, getName, setContext, setName
 
Methods inherited from interface com.ibm.btt.automaton.Action
getName, setName
 
Methods inherited from interface com.ibm.btt.base.ProcessorNotifier
addHandler, getHandlersList, removeHandler, signalEvent, signalEvent, terminate
 
Methods inherited from interface com.ibm.btt.base.Externalizable
getName, setName
 

Constructor Detail

DSEStep

public DSEStep()
This constructor creates a DSEAction object.

Method Detail

addElement

public DataElement addElement(DataElement aDataElement)
                       throws DSEInvalidRequestException
Adds an element aDataElement to the KeyedCollection of the processor. Refer to the Context class addElement method for an example of implementing this method.

This method throws a DSEInvalidRequestException.

Specified by:
addElement in interface Operation
Parameters:
aDataElement - DataElement
Returns:
DataElement
Throws:
DSEInvalidRequestException

addOperationRepliedListener

public void addOperationRepliedListener(OperationRepliedListener newListener)
Description copied from interface: Operation
Adds an operation replied listener.

Specified by:
addOperationRepliedListener in interface Operation
Parameters:
newListener - com.ibm.btt.base.OperationRepliedListener

chainTo

public void chainTo(Context aContext)
             throws DSEInvalidRequestException
Sets the receiving context as a child of aContext and as the new current child. Refer to the Context class chainTo method for an example of implementing this method.

This method throws a DSEInvalidRequestException.

Specified by:
chainTo in interface Operation
Throws:
DSEInvalidRequestException

close

public void close()
This method must include whatever housekeeping process before ending the processor. Subclasses may implement specific closing tasks.

Specified by:
close in interface Action
Specified by:
close in interface Operation
Overrides:
close in class DSEAction

execute

public void execute()
This method executes the executeStep of the step, that should be provided by any subclass of DSEStep and then signals the ok or error events according to the success of the execution

Specified by:
execute in interface Action
Specified by:
execute in interface Operation
Specified by:
execute in class DSEAction

executeStep

public abstract void executeStep()
                          throws java.lang.Exception
This method must be implemented by the subclasses in order to perform the specific steps.

Throws:
java.lang.Exception

getApplicationId

public java.lang.String getApplicationId()
Returns the value of the applicationId property.

Specified by:
getApplicationId in interface Operation
Returns:
String - The sessionId value.

getContextName

public java.lang.String getContextName()
Returns the context name.

Specified by:
getContextName in interface Operation
Returns:
String

getElementAt

public DataElement getElementAt(java.lang.String aCompositeKey)
                         throws DSEObjectNotFoundException
Returns the DataElement identified by the aCompositeKey parameter. Refer to the same method in KeyedCollection class for an example of implementing this method.

Specified by:
getElementAt in interface Operation
Throws:
DSEObjectNotFoundException

getFormat

public java.lang.Object getFormat(java.lang.String aFormatName)
                           throws DSEInvalidArgumentException
Returns the formatElement named aFormatName from the formats Hashtable.

Specified by:
getFormat in interface Operation
Throws:
DSEInvalidArgumentException

getFormats

public Hashtable getFormats()
* Returns the operation formats Hashtable.

Specified by:
getFormats in interface Operation
Returns:
com.ibm.btt.base.Hashtable

getKeyedCollection

public KeyedCollection getKeyedCollection()
                                   throws DSEInvalidRequestException
Returns the context keyedCollection. Refer to the Context class getKeyedCollection method for an example of implementing this method.

Specified by:
getKeyedCollection in interface Operation
Returns:
KeyedCollection
Throws:
DSEInvalidRequestException

getOperationProcessor

protected DSEOperationProcessor getOperationProcessor()
This method returns the instance of DSEOperationProcessor which this step is running under.

Returns:
DSEOperationProcessor

getParent

public Context getParent()
                  throws DSEInvalidRequestException
Returns the Context object defined as the parent context of the operation context.

Specified by:
getParent in interface Operation
Returns:
Context
Throws:
DSEInvalidRequestException

getService

public Service getService(java.lang.String aServiceName)
                   throws DSEObjectNotFoundException
Returns the service named aServiceName from the chain of contexts attached to the operation processor. Refer to the Context class getService method for an example of implementing this method.

This method throws a DSEObjectNotFoundException if the service is not found.

Specified by:
getService in interface Operation
Overrides:
getService in class DSEAction
Throws:
DSEObjectNotFoundException

getType

public java.lang.String getType()
                         throws DSEInvalidRequestException
Returns the action context type.

Specified by:
getType in interface Operation
Returns:
String
Throws:
DSEInvalidRequestException

getValueAt

public java.lang.Object getValueAt(java.lang.String aCompositeKey)
                            throws DSEObjectNotFoundException
Returns value of the data element identified by aConpositeKey. Refer to the same method of the KeyedCollection class for an example of implementing this method.

This method throws a DSEObjectNotFoundException if the data element is not found.

Specified by:
getValueAt in interface Operation
Throws:
DSEObjectNotFoundException

isCacheable

public boolean isCacheable()
This method returns false to indicate that this object is not supposed to be stored into the cache.

Specified by:
isCacheable in interface Cacheable
Returns:
boolean

isChained

public boolean isChained()
                  throws DSEInvalidRequestException
Returns true if the context is chained to the hierarchy.

Specified by:
isChained in interface Operation
Returns:
boolean
Throws:
DSEInvalidRequestException

prune

public void prune()
           throws DSEInvalidRequestException,
                  DSEObjectNotFoundException
Removes the context from the hierarchy. All of its descendants become orphans. Refer to the Context class prune method for an example of implementing this method.

This method throws a DSEInvalidRequestException and throws a DSEObjectNotFoundException.

Specified by:
prune in interface Operation
Throws:
DSEInvalidRequestException
DSEObjectNotFoundException

reinitialize

public void reinitialize()
As long as the object is not cacheable, there is no need for reinitialization.

Specified by:
reinitialize in interface Cacheable

removeAt

public DataElement removeAt(java.lang.String aCompositeKey)
                     throws DSEInvalidRequestException,
                            DSEObjectNotFoundException
Removes the data element identified by aCompositeKey from the context data collection. Refer to the Context class removeAt method for an example of implementing this method.

This method throws a DSEInvalidRequestException and throws a DSEObjectNotFoundException.

Specified by:
removeAt in interface Operation
Throws:
DSEInvalidRequestException
DSEObjectNotFoundException

removeOperationRepliedListener

public void removeOperationRepliedListener(OperationRepliedListener newListener)
Removes the operation replied listener.

Specified by:
removeOperationRepliedListener in interface Operation
Parameters:
newListener - com.ibm.btt.base.OperationRepliedListener

setApplicationId

public void setApplicationId(java.lang.String appId)
Sets the value of the applicationId property.

Specified by:
setApplicationId in interface Operation
Parameters:
appId - String The new value of the applicationId.

setContextName

public void setContextName(java.lang.String aContextName)
Sets the context name to aContextName.

Specified by:
setContextName in interface Operation

setKeyedCollection

public void setKeyedCollection(KeyedCollection aKeyedCollection)
                        throws DSEInvalidRequestException
Sets the context keyed collection to aKeyedCollection.

Specified by:
setKeyedCollection in interface Operation
Parameters:
aKeyedCollection - KeyedCollection
Throws:
DSEInvalidRequestException

setType

public void setType(java.lang.String aContextType)
             throws DSEInvalidRequestException
Sets the context type to aContextType.

Specified by:
setType in interface Operation
Throws:
DSEInvalidRequestException

setValueAt

public void setValueAt(java.lang.String aCompositeKey,
                       java.lang.Object aDataValue)
                throws DSEObjectNotFoundException,
                       DSEInvalidArgumentException
Sets the value of the data identified by aCompositeKey to aDataValue.

This method throws a DSEInvalidRequestException if the data type doesn't allow a setValue().

This method throws a DSEObjectNotFoundException if the data is not found.

Specified by:
setValueAt in interface Operation
Throws:
DSEInvalidRequestException
DSEObjectNotFoundException
DSEInvalidArgumentException

unchain

public void unchain()
             throws DSEInvalidRequestException,
                    DSEObjectNotFoundException
Removes the receiving context from the context hierarchy.

The parent attribute is se to null and the receiving context is removed from the children list in the parent context. The receiving context cannot have children.

This method throws a DSEInvalidRequestException and a DSEObjectNotFoundException.

Refer to the Context class unchain method.

Specified by:
unchain in interface Operation
Throws:
DSEInvalidRequestException
DSEObjectNotFoundException

xValidate

public java.lang.String[] xValidate()
Returns a String that indicates if the validation has been achieved successfully or not. If null the validation has been achieved successfully if is a String[] then the validation has not been achieved succefully and returns its error messages. Specific steps should implement their own cross validation if required. By default, the operation processor cross validation process is performed.

Specified by:
xValidate in interface Operation
Returns:
String[] - the result of the validation (null or error messages).

IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc

(c) Copyright IBM Corporation 1998, 2009