IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc

com.ibm.btt.base
Class BTTServerOperation

java.lang.Object
  extended by com.ibm.btt.base.BTTOperation
      extended by com.ibm.btt.base.BTTServerOperation
All Implemented Interfaces:
Cacheable, Operation, ServerOperation, java.io.Externalizable, java.io.Serializable
Direct Known Subclasses:
DSEHtmlProcessorOperation, EventManagerServerOperation

public class BTTServerOperation
extends BTTOperation
implements ServerOperation

The BTTServerOperation class derives from BTTOperation and implements the interface ServerOperation. This is an abstract class and cannot be instantiated. A BTTServerOperation has one attribute called originWorkstation that contains the terminal identifier (TID) of the workstation that performed the request. This is used by the operation to send events to the client using the client/server mechanism interface.

See Also:
Serialized Form

Field Summary
(package private)  java.lang.String originWorkstation
           
 
Fields inherited from class com.ibm.btt.base.BTTOperation
aOperationRepliedListener, COMPID, externalizer
 
Constructor Summary
BTTServerOperation()
          This constructor creates a BTTServerOperation object.
BTTServerOperation(java.lang.String anOperationName)
          This constructor creates a new instance of ServerOperation with its corresponding Context (obtained from the definition files through anOperationName).
BTTServerOperation(java.lang.String anOperationName, Context aParentContext)
          This constructor creates a new instance of ServerOperation (obtained from the definition files through anOperationName) chained to aParentContext.
BTTServerOperation(java.lang.String anOperationName, java.lang.String aParentContext)
          This constructor creates a new instance of ServerOperation (obtained from the definition files through anOperationName) chained to the Context Named aParentContextName.
 
Method Summary
static BTTServerOperation createOperation(java.lang.String anOperationName, Context flowContext)
          get the operation instance according to the operation name and the flow context
 void execute()
          Implements the server operation logic.
 FormatElement getCSReplyFormat()
          Returns the csReplyFormat formatElement of the formats Hashtable.
 FormatElement getCSRequestFormat()
          Returns the csRquestFormat formatElement of the formats Hashtable.
 java.lang.String getOriginWorkstation()
          Returns the workstation terminal identifier (TID) belonging to the workstation that performed the request, which caused the operation to be executed.
 void runInSession(java.lang.String aSessionID)
          Searches in the table of sessions for the input session (see Context Interface).
 void setCSReplyFormat(FormatElement aFormat)
          Sets the csReplyFormat formatElement of the formats Hashtable to aFormat.
 void setCSRequestFormat(FormatElement aFormat)
          Sets the csRequetsFormat formatElement of the formats Hashtable to aFormat.
 void setOriginWorkstation(java.lang.String aString)
          Sets the workstation terminal identifier (TID) belonging to the workstation that performed the request.
 boolean updateContext(KeyedCollection kcReqData)
          Updates dse_errorMessages field in the context with the results of the validation.
 boolean updateContext(KeyedCollection kcReqData, java.lang.String convType)
          Updates dse_errorMessages field in the context with the results of the validation.
 boolean validate(KeyedCollection kcReq)
          Validates all the elements in the specified keyedCollection.
 boolean validate(KeyedCollection kcReq, java.lang.String convType)
          Validates all the elements in the specified keyedCollection.
 
Methods inherited from class com.ibm.btt.base.BTTOperation
addElement, addOperationRepliedListener, chainTo, clearKeyedCollection, close, externalizer, fireHandleOperationRepliedEvent, getApplicationId, getContext, getContextByType, getContextName, getContextNamed, getElementAt, getExternalizer, getFormat, getFormats, getHostReceiveFormat, getHostSendFormat, getInstanceOfOperationStep, getKeyedCollection, getName, getOperationStep, getOperationStepRC, getOperationSteps, getParent, getSelfDefinedOpTagInputStream, getService, getSessionId, getSgmlSelfDefinedOpFileName, getType, getValueAt, getXValidator, initializeFormatFrom, initializeFrom, initializeKeyedCollectionValueFrom, initializeOpStep, initializeOpStepsFrom, isCacheable, isChained, postExecute, preExecute, prune, readExternal, readExternal, readObject, reinitialize, removeAt, removeExternal, removeOperationRepliedListener, setApplicationId, setContext, setContextName, setDefinedContext, setExternalizer, setHostReceiveFormat, setHostSendFormat, setKeyedCollection, setName, setSessionId, setType, setValueAt, setXValidator, toString, toStrings, toTags, unchain, writeExternal, writeExternal, xValidate
 
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
addElement, addOperationRepliedListener, chainTo, close, getApplicationId, getContext, getContextName, getElementAt, getFormat, getFormats, getKeyedCollection, getName, getParent, getService, getType, getValueAt, isChained, prune, removeAt, removeOperationRepliedListener, setApplicationId, setContext, setContextName, setKeyedCollection, setName, setType, setValueAt, unchain, xValidate
 
Methods inherited from interface com.ibm.btt.base.Cacheable
isCacheable, reinitialize
 

Field Detail

originWorkstation

java.lang.String originWorkstation
Constructor Detail

BTTServerOperation

public BTTServerOperation()
This constructor creates a BTTServerOperation object.


BTTServerOperation

public BTTServerOperation(java.lang.String anOperationName)
                   throws java.io.IOException
This constructor creates a new instance of ServerOperation with its corresponding Context (obtained from the definition files through anOperationName).

Parameters:
anOperationName - java.lang.String
Throws:
java.io.IOException

BTTServerOperation

public BTTServerOperation(java.lang.String anOperationName,
                          Context aParentContext)
                   throws java.io.IOException,
                          DSEInvalidRequestException
This constructor creates a new instance of ServerOperation (obtained from the definition files through anOperationName) chained to aParentContext.

Parameters:
anOperationName - java.lang.String
aParentContext - com.ibm.btt.base.Context
Throws:
java.io.IOException
DSEInvalidRequestException

BTTServerOperation

public BTTServerOperation(java.lang.String anOperationName,
                          java.lang.String aParentContext)
                   throws java.io.IOException,
                          DSEInvalidRequestException,
                          DSEObjectNotFoundException
This constructor creates a new instance of ServerOperation (obtained from the definition files through anOperationName) chained to the Context Named aParentContextName.

Parameters:
anOperationName - java.lang.String
aParentContext - java.lang.String
Throws:
java.io.IOException
DSEInvalidRequestException
DSEObjectNotFoundException
Method Detail

execute

public void execute()
             throws java.lang.Exception
Implements the server operation logic. The execute method should be implemented by subclasses.

Specified by:
execute in interface Operation
Overrides:
execute in class BTTOperation
Throws:
java.lang.Exception

getCSReplyFormat

public FormatElement getCSReplyFormat()
Returns the csReplyFormat formatElement of the formats Hashtable.

Specified by:
getCSReplyFormat in interface ServerOperation
Returns:
com.ibm.btt.base.FormatElement

getCSRequestFormat

public FormatElement getCSRequestFormat()
Returns the csRquestFormat formatElement of the formats Hashtable.

Returns:
com.ibm.btt.base.FormatElement

getOriginWorkstation

public java.lang.String getOriginWorkstation()
Returns the workstation terminal identifier (TID) belonging to the workstation that performed the request, which caused the operation to be executed.

Specified by:
getOriginWorkstation in interface ServerOperation
Returns:
java.lang.String

setCSReplyFormat

public void setCSReplyFormat(FormatElement aFormat)
Sets the csReplyFormat formatElement of the formats Hashtable to aFormat.

Specified by:
setCSReplyFormat in interface ServerOperation
Parameters:
aFormat - com.ibm.btt.base.FormatElement

setCSRequestFormat

public void setCSRequestFormat(FormatElement aFormat)
Sets the csRequetsFormat formatElement of the formats Hashtable to aFormat.

Parameters:
aFormat - com.ibm.btt.base.FormatElement

setOriginWorkstation

public void setOriginWorkstation(java.lang.String aString)
Sets the workstation terminal identifier (TID) belonging to the workstation that performed the request.

Specified by:
setOriginWorkstation in interface ServerOperation
Parameters:
aString - java.lang.String

updateContext

public boolean updateContext(KeyedCollection kcReqData)
                      throws DSETypeException,
                             DSEObjectNotFoundException,
                             DSEInvalidArgumentException
Updates dse_errorMessages field in the context with the results of the validation.

Parameters:
kcReqData - com.ibm.btt.base.KeyedCollection
Returns:
boolean - True if validation successful
Throws:
DSETypeException.
DSEObjectNotFoundException.
DSEInvalidArgumentException.
DSETypeException
DSEObjectNotFoundException
DSEInvalidArgumentException

updateContext

public boolean updateContext(KeyedCollection kcReqData,
                             java.lang.String convType)
                      throws DSETypeException,
                             DSEObjectNotFoundException,
                             DSEInvalidArgumentException
Updates dse_errorMessages field in the context with the results of the validation. Validation process is using the specified conversion type to convert input data to final objects.

Parameters:
kcReqData - com.ibm.btt.base.KeyedCollection
convType - java.lang.String
Returns:
boolean - True if validation successful
Throws:
DSETypeException.
DSEObjectNotFoundException.
DSEInvalidArgumentException.
DSETypeException
DSEObjectNotFoundException
DSEInvalidArgumentException

validate

public boolean validate(KeyedCollection kcReq)
                 throws DSEObjectNotFoundException,
                        DSEInvalidArgumentException
Validates all the elements in the specified keyedCollection. Data fields are first syntactically validated and then semantically validated. Returns true if all elements validate successfully.

Parameters:
kcReq - com.ibm.btt.base.KeyedCollection
Returns:
boolean
Throws:
DSEObjectNotFoundException.
DSEInvalidArgumentException.
DSEObjectNotFoundException
DSEInvalidArgumentException

validate

public boolean validate(KeyedCollection kcReq,
                        java.lang.String convType)
                 throws DSEObjectNotFoundException,
                        DSEInvalidArgumentException
Validates all the elements in the specified keyedCollection. Data fields are first syntactically validated and then semantically validated. Returns true if all elements validate successfully.

Parameters:
kcReq - com.ibm.btt.base.KeyedCollection
convType - java.lang.String
Returns:
boolean
Throws:
DSEObjectNotFoundException.
DSEInvalidArgumentException.
DSEObjectNotFoundException
DSEInvalidArgumentException

createOperation

public static BTTServerOperation createOperation(java.lang.String anOperationName,
                                                 Context flowContext)
                                          throws java.io.IOException,
                                                 DSEInvalidRequestException
get the operation instance according to the operation name and the flow context

Parameters:
anOperationName - java.lang.String
flowContext - com.ibm.btt.base.Context
Returns:
com.ibm.btt.base.BTTServerOperation
Throws:
java.io.IOException
DSEInvalidRequestException

runInSession

public void runInSession(java.lang.String aSessionID)
                  throws java.lang.Exception
Searches in the table of sessions for the input session (see Context Interface). It keeps the origin workstation identifier and it calls the execute() method. If the session is not found then the execute() method is directly invoked instead.

Specified by:
runInSession in interface ServerOperation
Throws:
java.lang.Exception

IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc

(c) Copyright IBM Corporation 1998, 2009