IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc

com.ibm.btt.cs.ajax
Class AbstractPaginationOp

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

public abstract class AbstractPaginationOp
extends BTTServerOperation

this class is used to handle the ajax table pagination request. Functional developer should implement this class to do real work. Main fuction: 1. chain the paginition operation context into parent context. e.g processor context 2. map necessary paginiation context info into invoked biz operation context as input 3. chain biz operation context into parent context. e.g processor context 4. invoke the biz operation for retrieve data into biz context 5. map the biz operation output context data into processor context. 6. unchain biz operaiton context

See Also:
Serialized Form

Nested Class Summary
(package private)  class AbstractPaginationOp.InternalOperationRepliedListener
           
 
Field Summary
 
Fields inherited from class com.ibm.btt.base.BTTOperation
aOperationRepliedListener, COMPID, externalizer
 
Constructor Summary
AbstractPaginationOp()
           
 
Method Summary
protected abstract  void afterExecuteBizOp()
          This logic wll be implemented on the project level to handle the result from the business operation and put the necessary data into the operation context if necessary. in this time, the biz operatoin context is chained into the parent context some data can be updated here when biz operation finished. you can ref DefaultPaginationOp for a sample
protected abstract  void beforeExecuteBizOp()
          The logic will be implemented on the project-level to get some required parameters from the request data and put the parameter into the biz operation context this is occurred before the biz operation instanced.
 void execute()
          1. create the biz operation object and chain its context to parent context. 2. initial some necessary parameters for biz operation execution 3. mapping parent(processor) context data into operation context 4. execute biz operation 5. mapping biz operation context into parent(processor) context for reply 6. unchain biz operaton context
 BTTOperation getBizOp()
          biz operation, it will help to get the real pagination data
 java.lang.String getTableData()
          response table data, it should be align with the client widget if extended.
protected abstract  void handleBizOpInputMapping()
          the alpha developer who create a new Technical operation can extends this method for adding some data mapping from parent/processor context to the biz operation context.
protected abstract  void handleBizOpOutputMapping()
          the alpha developer who create a new Technical operation can extends this method for adding some data mapping from biz operation context into parent/processor context.
protected abstract  void handleException(java.lang.Exception e)
          When an exception occurred in the operation executing process, how to handle the exception. maybe update the errMsg field or just throw the exception out
protected  boolean needExecBizOp()
          Customer can override this method to control whether to execute the biz operation when do pagination.
protected  void performBizOpInputMapper()
          use mapper to map pagination operation context and parent context into biz operation context. so that biz operation can leverage the updated data do action.
protected  void updatedReplyData()
          update the biz operation output data into tech operation context Notes that it is designed that A dataname kColl will real identify that which fields in the data source will be put into tech op context as reply. so that its fields name should be exactly same with the datasouce filed name.
 
Methods inherited from class com.ibm.btt.base.BTTServerOperation
createOperation, fireExitEvent, getCSReplyFormat, getCSRequestFormat, getOriginWorkstation, runInSession, setCSReplyFormat, setCSRequestFormat, setOriginWorkstation, updateContext, updateContext, validate, validate
 
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, stopExecution, 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
 

Constructor Detail

AbstractPaginationOp

public AbstractPaginationOp()
Method Detail

getBizOp

public BTTOperation getBizOp()
biz operation, it will help to get the real pagination data


execute

public final void execute()
                   throws java.lang.Exception
1. create the biz operation object and chain its context to parent context. 2. initial some necessary parameters for biz operation execution 3. mapping parent(processor) context data into operation context 4. execute biz operation 5. mapping biz operation context into parent(processor) context for reply 6. unchain biz operaton context

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

needExecBizOp

protected boolean needExecBizOp()
Customer can override this method to control whether to execute the biz operation when do pagination. Default return true, it is execute biz operation to retrieve data. If return false, it means that just come up reply data from context, so please make sure outer operation updated the table data correctly before if do so

Returns:

handleException

protected abstract void handleException(java.lang.Exception e)
                                 throws java.lang.Exception
When an exception occurred in the operation executing process, how to handle the exception. maybe update the errMsg field or just throw the exception out

Parameters:
e -
Throws:
java.lang.Exception

beforeExecuteBizOp

protected abstract void beforeExecuteBizOp()
                                    throws DSEException
The logic will be implemented on the project-level to get some required parameters from the request data and put the parameter into the biz operation context this is occurred before the biz operation instanced.

Throws:
DSEException

handleBizOpInputMapping

protected abstract void handleBizOpInputMapping()
                                         throws DSEException
the alpha developer who create a new Technical operation can extends this method for adding some data mapping from parent/processor context to the biz operation context. this method is called after the biz operation instanced.

Throws:
DSEException

handleBizOpOutputMapping

protected abstract void handleBizOpOutputMapping()
                                          throws DSEException
the alpha developer who create a new Technical operation can extends this method for adding some data mapping from biz operation context into parent/processor context. this method is called after biz operation execution finished.

Throws:
DSEException

afterExecuteBizOp

protected abstract void afterExecuteBizOp()
                                   throws DSEException
This logic wll be implemented on the project level to handle the result from the business operation and put the necessary data into the operation context if necessary. in this time, the biz operatoin context is chained into the parent context some data can be updated here when biz operation finished. you can ref DefaultPaginationOp for a sample

Throws:
DSEException

updatedReplyData

protected void updatedReplyData()
                         throws DSEObjectNotFoundException,
                                DSEInvalidArgumentException,
                                DSEInvalidRequestException
update the biz operation output data into tech operation context Notes that it is designed that A dataname kColl will real identify that which fields in the data source will be put into tech op context as reply. so that its fields name should be exactly same with the datasouce filed name. A dataname kColl maybe more fields than the tableColumnIDs defined, if a field in dataname kColl but not in datasouce, this field wll be ignored. this function will 1: mapping all tableColumnIDs fields into tech operation context 2: mapping all dataName kColl fileds that in datasouce but not in tableColumnIDs into tech operatoin context.

Throws:
DSEObjectNotFoundException
DSEInvalidArgumentException
DSEInvalidRequestException

performBizOpInputMapper

protected void performBizOpInputMapper()
                                throws DSEObjectNotFoundException,
                                       DSEInvalidArgumentException,
                                       DSEInvalidClassException,
                                       DSEInvalidRequestException
use mapper to map pagination operation context and parent context into biz operation context. so that biz operation can leverage the updated data do action.

Throws:
DSEObjectNotFoundException
DSEInvalidArgumentException
DSEInvalidRequestException
DSEInvalidClassException

getTableData

public java.lang.String getTableData()
response table data, it should be align with the client widget if extended.

Returns:

IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc

(c) Copyright IBM Corporation 1998, 2011