IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc

com.ibm.btt.automaton
Class DSEAction

java.lang.Object
  extended by com.ibm.btt.base.BTTProcessorNotifier
      extended by com.ibm.btt.automaton.DSEAction
All Implemented Interfaces:
Action, ProcessorNotifier, java.io.Externalizable, java.io.Serializable
Direct Known Subclasses:
CheckAction, DSEStep, ExecuteOperationAct, ExecuteSubflowAct, ExecuteXUISubflowAct, StartAction

public abstract class DSEAction
extends BTTProcessorNotifier
implements Action, Externalizable

Default implementation of an Action. User Actions can inherit this and implement the execute().

Additional description

See Also:
Serialized Form

Field Summary
protected  Context context
           
protected  Tag inputMapFmtTag
           
protected  Tag operationTag
           
protected  Tag outputMapFmtTag
           
protected  BTTProcessorEventObject sourceEvent
           
protected  Tag tag
           
 
Fields inherited from class com.ibm.btt.base.BTTProcessorNotifier
handlersList, name
 
Constructor Summary
DSEAction()
          Creates an instance of type DSEAction.
DSEAction(boolean mustRegister)
          Creates an instance of type DSEAction.
DSEAction(java.lang.String aName)
          Creates an instance of type DSEAction.
DSEAction(java.lang.String aName, java.lang.String aTID)
          Creates an instance of type DSEAction.
 
Method Summary
 boolean chainOrAssignContext()
          This method checks to see if the action has an externally defined context, if not then the processor's is assigned.
 boolean chainOrAssignContext(Action thisAction)
          Deprecated. Replaced by chainOrAssignContext(Action).
 void close()
          This method is for closing actions and releasing the processor and context objects.
 void close(boolean wasChained)
          This method is for actions that had their context's chained to the processor's.
 boolean evaluateGuardCondition(GuardCondition gc)
          Evaluate the guardCondition specified.
abstract  void execute()
          Abstract execute method to be implemented by concrete instantiations to do whatever this Action is supposed to do.
 Externalizer externalizer()
          This method gets the externalizer instance used to build.
 Context getContext()
          Returns the value of the context property.
 Vector getGuardConditions()
          Returns a Vector containing the GuardConditions for this Action
 Tag getInputMapFmtTag()
          This method returns the value of the inputMapFmtTag
 Tag getOperationTag()
          This method returns the value of the operationTag
 Tag getOutputMapFmtTag()
          This method returns the value of the outputMapFmtTag
 java.util.Hashtable getParms()
          Returns a hashtable of the Action's parameters.
 Processor getProcessor()
          Returns the value of the processor property.
 Service getService(java.lang.String aServiceName)
          Returns the service named aServiceName from the Processor.
 BTTProcessorEventObject getSourceEvent()
          Returns the value of the sourceEvent property.
 java.lang.Object initializeFrom(Tag aTag)
          The action tag's id is used as the Notifier name of the action for the inherited method setName().
protected  void mapTheInput(Context actionContext, Context opContext)
          This method is used for sharing data between contexts.
protected  void mapTheOutput(Context opContext, Context processorContext)
          This method is used for sharing data between contexts.
 void preProcess()
          This is invoked just before the execute method.
 void readExternal()
          This method will find the tag that corresponds to the name of THIS entity.
 void readExternal(java.io.ObjectInput in)
          Invokes the object creation from an ObjectInput.
 void removeExternal()
          Removes the Externalizer.
 void setContext(Context newContext)
          Sets the value of the context property.
 void setGuardConditions(Vector newGuardConditions)
          Sets the value of the guardConditions property.
 void setInputMapFmtTag(Tag nextSubTag)
          This method sets the value of the inputMapFmtTag
 void setOperationTag(Tag nextSubTag)
          This method sets the value of the operationTag
 void setOutputMapFmtTag(Tag nextSubTag)
          This method sets the value of the outputMapFmtTag
 void setParms(java.util.Hashtable newParms)
          This method sets the hashtable of the Action's parameters.
 void setProcessor(Processor newProcessor)
          Sets the value of the processor property.
 void setSourceEvent(BTTProcessorEventObject newSourceEvent)
          Sets the value of the sourceEvent property.
 java.lang.String toString()
          Returns a String representing the action.
 Vector toStrings()
          Returns a Vector with the String representation of the object.
 Vector toTags()
          Returns a Vector with the object represented as a Tag.
 void writeExternal()
          Writes this instance (converted into tags) to a file.
 void writeExternal(java.io.ObjectOutput out)
          Provides concrete serialization handling for DSEAction.
 
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.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
 

Field Detail

sourceEvent

protected BTTProcessorEventObject sourceEvent

context

protected Context context

tag

protected Tag tag

inputMapFmtTag

protected Tag inputMapFmtTag

outputMapFmtTag

protected Tag outputMapFmtTag

operationTag

protected Tag operationTag
Constructor Detail

DSEAction

public DSEAction()
Creates an instance of type DSEAction.


DSEAction

public DSEAction(java.lang.String aName)
Creates an instance of type DSEAction.

Parameters:
aName - java.lang.String

DSEAction

public DSEAction(java.lang.String aName,
                 java.lang.String aTID)
Creates an instance of type DSEAction.

Parameters:
aName - java.lang.String
aTID - java.lang.String

DSEAction

public DSEAction(boolean mustRegister)
Creates an instance of type DSEAction.

Parameters:
mustRegister - boolean
Method Detail

chainOrAssignContext

public boolean chainOrAssignContext()
This method checks to see if the action has an externally defined context, if not then the processor's is assigned. If the action already has a context, it needs to be chained to the processor's. If the context was chained rather than assigned, this method returns true.

Returns:
boolean

chainOrAssignContext

public boolean chainOrAssignContext(Action thisAction)
Deprecated. Replaced by chainOrAssignContext(Action).

This method checks to see if the action has an externally defined context, if not then the processor's is assigned. If the action already has a context, it needs to be chained to the processor's. If the context was chained rather than assigned, this method returns true.

Parameters:
thisAction - com.ibm.btt.automaton.Action
Returns:
boolean

close

public void close()
This method is for closing actions and releasing the processor and context objects.

Specified by:
close in interface Action

close

public void close(boolean wasChained)
This method is for actions that had their context's chained to the processor's. It unchains the context and closes the action, releasing the processor and context objects.

Specified by:
close in interface Action
Parameters:
wasChained - boolean

evaluateGuardCondition

public boolean evaluateGuardCondition(GuardCondition gc)
Evaluate the guardCondition specified.

Specified by:
evaluateGuardCondition in interface Action
Parameters:
gc - com.ibm.btt.automaton.GuardCondition
Returns:
boolean

execute

public abstract void execute()
                      throws java.lang.Exception
Abstract execute method to be implemented by concrete instantiations to do whatever this Action is supposed to do.

Specified by:
execute in interface Action
Throws:
java.lang.Exception - The implementor of this class must decide when to throw an exception occurred to the automaton.

externalizer

public Externalizer externalizer()
                          throws java.io.IOException
This method gets the externalizer instance used to build. This method is an Externalizable interface method.

Returns:
com.ibm.btt.base.Externalizer
Throws:
java.lang.IOException
java.io.IOException

getContext

public Context getContext()
Returns the value of the context property. This method is an Externalizable interface method.

Specified by:
getContext in interface Action
Returns:
com.ibm.btt.base.Context

getGuardConditions

public Vector getGuardConditions()
Returns a Vector containing the GuardConditions for this Action

Specified by:
getGuardConditions in interface Action
Returns:
com.ibm.btt.base.Vector

getInputMapFmtTag

public Tag getInputMapFmtTag()
This method returns the value of the inputMapFmtTag


getOperationTag

public Tag getOperationTag()
This method returns the value of the operationTag


getOutputMapFmtTag

public Tag getOutputMapFmtTag()
This method returns the value of the outputMapFmtTag


getParms

public java.util.Hashtable getParms()
Returns a hashtable of the Action's parameters.

Specified by:
getParms in interface Action
Returns:
java.util.Hashtable

getProcessor

public Processor getProcessor()
Returns the value of the processor property.

Specified by:
getProcessor in interface Action
Returns:
com.ibm.btt.automaton.Processor

getSourceEvent

public BTTProcessorEventObject getSourceEvent()
Returns the value of the sourceEvent property.

Specified by:
getSourceEvent in interface Action
Returns:
com.ibm.btt.event.BTTProcessorEventObject

initializeFrom

public java.lang.Object initializeFrom(Tag aTag)
                                throws java.io.IOException,
                                       DSEException
The action tag's id is used as the Notifier name of the action for the inherited method setName(). If a context name is not specified externally, the processor's context is assigned as the action's context. All other action attributes are put into a hashtable of parameters. The condition subtags for this action are looped through sending each condition token into convertTagToObject to be instantiated and then add to the vector of conditions. This method is an Externalizable interface method.

Parameters:
aTag - com.ibm.btt.base.Tag Contains the name and attributes of the object to be created.
Returns:
Object - An instance of DSEAction.
Throws:
java.io.IOException - The object can not be created.
DSEException

mapTheInput

protected void mapTheInput(Context actionContext,
                           Context opContext)
                    throws DSEInvalidRequestException
This method is used for sharing data between contexts. First, the method obtains the inputMapFmt from the action's hashtable of parameters, and then uses it to map the data from the action's context to the operation's context.

Parameters:
actionContext - com.ibm.btt.base.Context
OpContext - com.ibm.btt.base.Context
Throws:
DSEInvalidRequestException - if the request is not valid

mapTheOutput

protected void mapTheOutput(Context opContext,
                            Context processorContext)
                     throws DSEInvalidRequestException
This method is used for sharing data between contexts. First, the method obtains the outputMapFmt from the action's hashtable of parameters, and then uses it to map the data from the operation's context to the processor's context.

Parameters:
OpContext - com.ibm.btt.base.Context
actionContext - com.ibm.btt.base.Context
Throws:
DSEInvalidRequestException - if the request is not valid

preProcess

public void preProcess()
                throws java.lang.Exception
This is invoked just before the execute method.

Specified by:
preProcess in interface Action
Throws:
java.lang.Exception - The implementor of this class must decide when to throw an exception occurred to the automaton.

readExternal

public void readExternal()
                  throws java.io.IOException
This method will find the tag that corresponds to the name of THIS entity. Then it will initialize THIS entity with the contents of the tag

Throws:
java.io.IOException

readExternal

public void readExternal(java.io.ObjectInput in)
                  throws java.io.IOException,
                         java.lang.ClassNotFoundException
Invokes the object creation from an ObjectInput.

Specified by:
readExternal in interface java.io.Externalizable
Parameters:
in - java.io.ObjectInput
Throws:
java.io.IOException
java.lang.ClassNotFoundException

removeExternal

public void removeExternal()
                    throws java.io.IOException
Removes the Externalizer. This method is an Externalizable interface method.

Throws:
java.lang.IOException
java.io.IOException

setContext

public void setContext(Context newContext)
Sets the value of the context property.

Specified by:
setContext in interface Action
Parameters:
newContext - com.ibm.btt.base.Context

setGuardConditions

public void setGuardConditions(Vector newGuardConditions)
Sets the value of the guardConditions property.

Specified by:
setGuardConditions in interface Action
Parameters:
newGuardConditions - com.ibm.btt.base.Vector

setInputMapFmtTag

public void setInputMapFmtTag(Tag nextSubTag)
This method sets the value of the inputMapFmtTag


setOperationTag

public void setOperationTag(Tag nextSubTag)
This method sets the value of the operationTag


setOutputMapFmtTag

public void setOutputMapFmtTag(Tag nextSubTag)
This method sets the value of the outputMapFmtTag


setParms

public void setParms(java.util.Hashtable newParms)
This method sets the hashtable of the Action's parameters.

Specified by:
setParms in interface Action
Parameters:
newParms - java.util.Hashtable

setProcessor

public void setProcessor(Processor newProcessor)
Sets the value of the processor property.

Specified by:
setProcessor in interface Action
Parameters:
newProcessor - com.ibm.btt.automaton.Processor

setSourceEvent

public void setSourceEvent(BTTProcessorEventObject newSourceEvent)
Sets the value of the sourceEvent property.

Specified by:
setSourceEvent in interface Action
Parameters:
newSourceEvent - com.ibm.btt.event.BTTProcessorEventObject

toString

public java.lang.String toString()
Returns a String representing the action.

Overrides:
toString in class java.lang.Object
Returns:
java.lang.String.

toStrings

public Vector toStrings()
Returns a Vector with the String representation of the object. This method is an Externalizable interface method.

Returns:
com.ibm.btt.base.Vector

toTags

public Vector toTags()
              throws java.io.IOException
Returns a Vector with the object represented as a Tag. This method is an Externalizable interface method.

Returns:
com.ibm.btt.base.Vector
Throws:
java.io.IOException

writeExternal

public void writeExternal()
                   throws java.io.IOException
Writes this instance (converted into tags) to a file. This method is an Externalizable interface method.

Throws:
java.io.IOException

writeExternal

public void writeExternal(java.io.ObjectOutput out)
                   throws java.io.IOException
Provides concrete serialization handling for DSEAction.

Specified by:
writeExternal in interface java.io.Externalizable
Parameters:
out - java.io.ObjectOutput
Throws:
java.io.IOException

getService

public Service getService(java.lang.String aServiceName)
                   throws DSEObjectNotFoundException
Returns the service named aServiceName from the Processor.

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

Throws:
DSEObjectNotFoundException

IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc

(c) Copyright IBM Corporation 1998, 2009