IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc

com.ibm.btt.base
Class OperationStep

java.lang.Object
  extended by com.ibm.btt.base.OperationStep
All Implemented Interfaces:
OperationStepInterface
Direct Known Subclasses:
CompareAssertion, ExistsAssertion, NumOfElementsAssertion

This class enables you to break an operation into a set of operation steps.
 This provides an opportunity to reuse code when performing the same specific tasks within
 different operations. This class accepts the main Operation protocol so that 
 pieces of code can be moved from the main operation flow to a specific operation step
 and the other way around without changing the code. Customized operation steps can be 
 defined as children of this class for multiple purposes.


Field Summary
static int RC_ERROR
          
Constructor Summary
OperationStep()
          
Method Summary
 DataElement addElement(DataElement aDataElement)
          
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RC_OK

public static final int RC_OK
See Also:
Constant Field Values

RC_ERROR

public static final int RC_ERROR
See Also:
Constant Field Values
Constructor Detail

OperationStep

public OperationStep()
Method Detail

execute

public abstract int execute()
                     throws java.lang.Exception
This is an abstract method.

Specified by:
execute in interface OperationStepInterface
Returns:
int
Throws:
java.lang.Exception

getContext

public Context getContext()
Returns the operation context. The value defaults to the name of the operation removing ClientOp/ServerOp and adding ClientOc/ServerOc.

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

getFormat

public java.lang.Object getFormat(java.lang.String aFormatName)
Returns the operation format named FormatName.

Specified by:
getFormat in interface OperationStepInterface
Parameters:
aFormatName - java.lang.String
Returns:
java.lang.Object

getOperation

public Operation getOperation()
Returns the operation attribute of operationStep.

Specified by:
getOperation in interface OperationStepInterface
Returns:
com.ibm.btt.base.Operation

getParams

public KeyedCollection getParams()
Returns the parameters of the operation step.

Specified by:
getParams in interface OperationStepInterface
Returns:
com.ibm.btt.base.KeyedCollection

getValueAt

public java.lang.Object getValueAt(java.lang.String aCompositeKey)
                            throws DSEObjectNotFoundException
Returns the 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 OperationStepInterface
Parameters:
aCompositeKey - java.lang.String
Returns:
java.lang.Object
Throws:
DSEObjectNotFoundException

setOperation

public void setOperation(Operation anOperation)
Sets the operation attribute of operationStep.

Specified by:
setOperation in interface OperationStepInterface
Parameters:
anOperation - com.ibm.btt.base.Operation

setParams

public void setParams(KeyedCollection kc)
Sets the parameters of the operation step.

Specified by:
setParams in interface OperationStepInterface
Parameters:
kc - com.ibm.btt.base.KeyedCollection

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(). It throws a DSEObjectNotFoundException if the data is not found.

Specified by:
setValueAt in interface OperationStepInterface
Parameters:
aCompositeKey - java.lang.String
aDataValue - java.lang.Object
Throws:
DSEObjectNotFoundException
DSEInvalidArgumentException

setContext

public void setContext(Context aContext)
Sets the operation context to aContext.

Specified by:
setContext in interface OperationStepInterface
Parameters:
aContext - com.ibm.btt.base.Context
Since:
5.2

getService

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

Specified by:
getService in interface OperationStepInterface
Parameters:
aServiceName - The name of the service.
Returns:
com.ibm.btt.base.Service
Throws:
java.io.IOException
DSEObjectNotFoundException

getFormats

public Hashtable getFormats()
Returns the operation formats Hashtable.

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

getParent

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

Specified by:
getParent in interface OperationStepInterface
Throws:
DSEInvalidRequestException

getApplicationId

public java.lang.String getApplicationId()
Returns the operation applicationId.

Specified by:
getApplicationId in interface OperationStepInterface

setApplicationId

public void setApplicationId(java.lang.String appId)
Sets the operation application id to applicationId.

Specified by:
setApplicationId in interface OperationStepInterface
Parameters:
name - java.lang.String

getName

public java.lang.String getName()
Returns the operation step name.

Specified by:
getName in interface OperationStepInterface

setName

public void setName(java.lang.String aName)
             throws DSEInvalidArgumentException
Sets the operation step name to name.

Specified by:
setName in interface OperationStepInterface
Parameters:
name - java.lang.String
Throws:
DSEInvalidArgumentException

addElement

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

Specified by:
addElement in interface OperationStepInterface
Parameters:
aDataElement - com.ibm.btt.base.DataElement
Returns:
com.ibm.btt.base.DataElement
Throws:
DSEInvalidRequestException

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 a DSEObjectNotFoundException.

Specified by:
removeAt in interface OperationStepInterface
Parameters:
aCompositeKey - java.lang.String
Returns:
com.ibm.btt.base.DataElement
Throws:
DSEInvalidRequestException
DSEObjectNotFoundException

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 OperationStepInterface
Returns:
com.ibm.btt.base.KeyedCollecion
Throws:
DSEInvalidRequestException

setKeyedCollection

public void setKeyedCollection(KeyedCollection kColl)
                        throws DSEInvalidRequestException
Sets the operation KeyedCollection

Specified by:
setKeyedCollection in interface OperationStepInterface
Throws:
DSEInvalidRequestException

preExecute

public java.lang.Object preExecute()
execute this method before excuting this opstep

Specified by:
preExecute in interface OperationStepInterface

postExecute

public void postExecute(java.lang.Object object)
execute the method after excuting this opstep

Specified by:
postExecute in interface OperationStepInterface
Parameters:
object -

getElementAt

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

Specified by:
getElementAt in interface OperationStepInterface
Parameters:
aFormatName - java.lang.String
Returns:
com.ibm.btt.base.DataElement
Throws:
DSEObjectNotFoundException

IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc

(c) Copyright IBM Corporation 1998, 2009