IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc

com.ibm.btt.cs.rest
Class RestRequestHandler

java.lang.Object
  extended by com.ibm.btt.clientserver.DSERequestHandler
      extended by com.ibm.btt.cs.html.HtmlRequestHandler
          extended by com.ibm.btt.cs.ajax.AjaxHtmlRequestHandler
              extended by com.ibm.btt.cs.rest.RestRequestHandler
All Implemented Interfaces:
RequestHandler

public class RestRequestHandler
extends AjaxHtmlRequestHandler


Field Summary
 
Fields inherited from class com.ibm.btt.clientserver.DSERequestHandler
errorCode, javaClientException, javaClientTrace
 
Constructor Summary
RestRequestHandler()
           
 
Method Summary
protected  void addRequiredDataToSessionCtx(java.lang.String sessionId, javax.servlet.http.HttpServletRequest req)
          The session context requires some data to be added to it.
 void endRequest(ChannelContext channelContext)
          unchain the processor context and save the loaded processor context
 ServerOperation executeSessionRequest(ChannelContext channelContext)
          When a session is established, we need to call an operation which sets the context to hold data that is saved in the session.
 void processNavigation(ChannelContext channelContext)
          Process the request when there is no abnormal navigation.
 void processSessionRequest(ChannelContext channelContext)
          This method is similar to processRequest, only back and double click validation are not performed as a new session is being established.
protected  BTTServerOperation readOperation(java.lang.String operationName, boolean isProcessorOp, KeyedCollection kcReqData, java.lang.String sessionId)
          Returns an operation containing either the operation going to be executed or a processor operation encapsulating the processor to execute.
protected  void syncRequestStart(ChannelContext channelContext)
          this method is used to synchronize the html channel and ajax channel to make sure that at one time just one channel request processed.
 
Methods inherited from class com.ibm.btt.cs.ajax.AjaxHtmlRequestHandler
chainOperation, commitSessionCtx, executeOperationRequest, isValidAjaxOpContext, processRequest, syncRequestEnd, updateContext
 
Methods inherited from class com.ibm.btt.cs.html.HtmlRequestHandler
addConseqInfoToSessionCtx, addConseqInfoToSessionCtx, addErrorInfo, addFieldTo, addRequiredDataToOperationCtx, areTransitionCtxErrors, chainOperation, checkContextExistence, checkForLocale, createErrorMessage, endSessionRequest, executeProcessorRequest, executeRequest, getOrgRequest, getProcessorId, getRVS, getSessionId, indexOfInteger, isFirstRequest, isValidGridData, manageValidationErrors, preProcessRequest, processAbnormalNavigation, putProcessorIntoCache, resetFlagForRVS, saveProcessor, setLocale, setNextPageId, updateTimestamp
 
Methods inherited from class com.ibm.btt.clientserver.DSERequestHandler
checkExecutionPermission, executeSession, formatOpContext, getPresentationHandler, getRequestValue, getSessionContext, handleException, handleException, isNotNull, process, runInSession, setReplyFmt, tryToFormat, tryToUnformat, unFormatRequest, usingCookies
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RestRequestHandler

public RestRequestHandler()
Method Detail

processSessionRequest

public void processSessionRequest(ChannelContext channelContext)
Description copied from class: HtmlRequestHandler
This method is similar to processRequest, only back and double click validation are not performed as a new session is being established. A dummy session has been created during the preProcessRequest method. This session must be overriden by the startup operation (executed inside the executeSessionRequest) so the application is not aware of the existence of this session until the operation is executed. If an error occurs before the operation is executed the toolkit must handle the dummy session created. The dummy session has an identifier: dse_DummySession to be checked by the infrastructure in order to handle the dummy session when the application has not set its own session object.

Specified by:
processSessionRequest in interface RequestHandler
Overrides:
processSessionRequest in class HtmlRequestHandler
Parameters:
channelContext - com.ibm.btt.clientserver.ChannelContext

executeSessionRequest

public ServerOperation executeSessionRequest(ChannelContext channelContext)
                                      throws java.lang.Exception
Description copied from class: HtmlRequestHandler
When a session is established, we need to call an operation which sets the context to hold data that is saved in the session.

Overrides:
executeSessionRequest in class HtmlRequestHandler
Parameters:
channelContext - com.ibm.btt.clientserver.ChannelContext
Throws:
java.lang.Exception

addRequiredDataToSessionCtx

protected void addRequiredDataToSessionCtx(java.lang.String sessionId,
                                           javax.servlet.http.HttpServletRequest req)
Description copied from class: HtmlRequestHandler
The session context requires some data to be added to it.

Overrides:
addRequiredDataToSessionCtx in class HtmlRequestHandler
Parameters:
sessionId - java.lang.String
req - HttpServletRequest

processNavigation

public void processNavigation(ChannelContext channelContext)
                       throws java.lang.Exception
Description copied from class: AjaxHtmlRequestHandler
Process the request when there is no abnormal navigation.

Overrides:
processNavigation in class AjaxHtmlRequestHandler
Parameters:
channelContext - com.ibm.btt.clientserver.ChannelContext
Throws:
java.lang.Exception

endRequest

public void endRequest(ChannelContext channelContext)
Description copied from class: AjaxHtmlRequestHandler
unchain the processor context and save the loaded processor context

Overrides:
endRequest in class AjaxHtmlRequestHandler
Parameters:
channelContext - com.ibm.btt.clientserver.ChannelContext

readOperation

protected BTTServerOperation readOperation(java.lang.String operationName,
                                           boolean isProcessorOp,
                                           KeyedCollection kcReqData,
                                           java.lang.String sessionId)
                                    throws DSECSSessionNotEstablishedException,
                                           DSEInvalidRequestException
Returns an operation containing either the operation going to be executed or a processor operation encapsulating the processor to execute. If this is the case, the processor is initialized before return the operation.

Overrides:
readOperation in class HtmlRequestHandler
Parameters:
isProcessorOp - boolean indicating if the request intends to execute a processor or an operation
kcReqData - KeyedCollection created with the info sent from client
operationName - String with the id of the operation or processor that will be passed to the right externalizer
sessionId - String
Throws:
DSECSSessionNotEstablishedException - The session is expired
DSEInvalidRequestException - Operation or processor can not be found, instantiated or initialized

syncRequestStart

protected void syncRequestStart(ChannelContext channelContext)
                         throws DSEInvalidRequestException,
                                DSEObjectNotFoundException,
                                DSECSSessionNotEstablishedException
Description copied from class: HtmlRequestHandler
this method is used to synchronize the html channel and ajax channel to make sure that at one time just one channel request processed.

Overrides:
syncRequestStart in class AjaxHtmlRequestHandler
Throws:
DSEInvalidRequestException
DSEObjectNotFoundException
DSECSSessionNotEstablishedException

IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc

(c) Copyright IBM Corporation 1998, 2011