|
IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.btt.clientserver.DSERequestHandler
com.ibm.btt.cs.html.HtmlRequestHandler
public class HtmlRequestHandler
Handle requests that are made from html clients. The btt.xml file for the server specifies this class name as the handler for html requests. One instance of it is created and held by the HandlerRegistry for use by all html clients.
Field Summary |
---|
Fields inherited from class com.ibm.btt.clientserver.DSERequestHandler |
---|
errorCode, javaClientException, javaClientTrace |
Constructor Summary | |
---|---|
HtmlRequestHandler()
HtmlRequestHandler constructor comment. |
Method Summary | |
---|---|
protected void |
addConseqInfoToSessionCtx(java.lang.String sessionId,
KeyedCollection kcReqData)
Adds to the session context the information needed to manage the processor's consequentiality. |
protected void |
addConseqInfoToSessionCtx(java.lang.String sessionId,
java.lang.String applicationId,
KeyedCollection kcReqData)
Adds to the application session context the information needed to manage the processor's consequentiality. |
protected void |
addErrorInfo(BTTServerOperation oper,
java.lang.String message)
Adds to the operation context error information upgrading the existent array of error messages or creating it if it does not exist. |
void |
addFieldTo(Context ctx,
java.lang.String name,
java.lang.Object value)
This method creates and adds a toolkit related field to the context passed in. |
protected void |
addRequiredDataToOperationCtx(Context opCtx,
KeyedCollection kcReqData)
The operation context requires some data to be added to it. |
protected void |
addRequiredDataToSessionCtx(java.lang.String sessionId,
javax.servlet.http.HttpServletRequest req)
The session context requires some data to be added to it. |
protected boolean |
areTransitionCtxErrors(Context trCtx)
Returns true if any of the DataElements associated to this context has validation errors. |
protected void |
chainOperation(BTTServerOperation oper,
java.lang.String sessionId,
java.lang.String applicationId)
Chains the operation or processor context to the right parent. |
protected void |
checkContextExistence(BTTServerOperation oper)
just check the operation and operation context whether null, and throws exceptions with meaningful info. |
void |
checkForLocale(ChannelContext channelContext)
Updates channel context's request data with the appropriate Locale. |
protected void |
commitSessionCtx(ChannelContext channelContext)
commit session context to CHA server. |
protected java.lang.String |
createErrorMessage(java.lang.String type)
Creates an appropriate error message depending on the error type. |
(package private) void |
destroySession(javax.servlet.http.HttpServletRequest req,
java.lang.String sessionId)
|
void |
endRequest(ChannelContext channelContext)
Performs maintenance of the pending requests table stored in the requestValidationServices instance associated with this session. |
void |
endSessionRequest(ServerOperation anOperation)
Closes the operation. |
protected java.lang.Object |
executeOperationRequest(ChannelContext channelContext)
Excute operation request |
protected java.lang.Object |
executeProcessorRequest(ChannelContext channelContext)
Excute processor request |
java.lang.Object |
executeRequest(ChannelContext channelContext)
When a server is set up with the cookies flag in btt.xml set to false, then a DSEChannelSession object is used rather than an HttpSession. |
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. |
protected javax.servlet.http.HttpServletRequest |
getOrgRequest(ChannelContext channelContext)
|
protected java.lang.String |
getProcessorId(ChannelContext channelContext)
get processorId of the current processor, return null if not find |
protected RequestValidationServices |
getRVS(ChannelContext cc)
Returns the RequestValidationServices instance associated with the current session. |
protected java.lang.String |
getSessionId(ChannelContext aChannelContext)
Obtain the session id from the channel context. |
protected int |
indexOfInteger(java.lang.String address)
TODO this method should be removed, pls refer updateContextForGrid() for reason This is a utility method used to obtain a number inside the given string. |
boolean |
isFirstRequest(RequestValidationServices rvs,
ChannelContext chctx)
Check whether the current request is first request. |
protected boolean |
isValidGridData(DataElement de,
Context ctx)
Here Just check whether a data field name is a IColl element. |
void |
manageValidationErrors(BTTServerOperation oper,
javax.servlet.http.HttpServletRequest request,
KeyedCollection kcReqData)
Perform the necessary steps to manage validation errors. |
void |
preProcessRequest(ChannelContext channelContext)
Adds current request to the pendingRequestTable |
protected void |
processAbnormalNavigation(ChannelContext channelContext,
java.lang.String type)
Manages an attempt of abnormal navigation detected. |
void |
processNavigation(ChannelContext channelContext)
Process the request when there is no abnormal navigation. |
void |
processRequest(ChannelContext channelContext)
Process the request originated from a request that already has a session |
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 void |
putProcessorIntoCache(DSEHtmlProcessorOperation oper)
Gets the processor instance from the processor operation and puts it into cache in order to be reused by further requests. |
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. |
void |
resetFlagForRVS(ChannelContext channelContext)
Reset the coresponding flag for RVS |
protected void |
saveProcessor(DSEHtmlProcessorOperation oper,
java.lang.String sessionId,
java.lang.String applId)
Saves the processor information needed to rebuild it in further requests for this processor. |
void |
setLocale(javax.servlet.http.HttpServletRequest req,
Context ctx)
Creates a new locale object from the headers information and stores it in the context. |
protected void |
setNextPageId(ChannelContext channelContext,
BTTServerOperation theOperation,
java.lang.String sessionId,
java.lang.String applicationId,
PresentationHandler presHandler)
Updates the application session context with the next page id. |
protected void |
syncRequestEnd(ChannelContext channelContext)
|
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. |
protected void |
updateTimestamp(java.lang.String sessionId,
java.lang.String appSessionId,
Operation operation,
ChannelContext channelContext)
Updates the timestamp for this session and for the application session if it exists. |
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 |
---|
public HtmlRequestHandler()
Method Detail |
---|
protected void addConseqInfoToSessionCtx(java.lang.String sessionId, KeyedCollection kcReqData)
sessionId
- StringkcReqData
- com.ibm.btt.base.KeyedCollectionprotected void addConseqInfoToSessionCtx(java.lang.String sessionId, java.lang.String applicationId, KeyedCollection kcReqData)
sessionId
- StringapplicationId
- StringkcReqData
- com.ibm.btt.base.KeyedCollectionprotected void addErrorInfo(BTTServerOperation oper, java.lang.String message) throws DSEInvalidArgumentException, DSEInvalidRequestException
oper
- com.ibm.btt.base.DSEServerOperation The operation to upgrademessage
- java.lang.String The message to add to the operation's context
DSEInvalidArgumentException
DSEInvalidRequestException
public void addFieldTo(Context ctx, java.lang.String name, java.lang.Object value) throws DSEInvalidRequestException
ctx
- com.ibm.btt.base.Context The context where to add the new
fieldname
- java.lang.String The name of the field to createvalue
- java.lang.Object The value of the field to create
java.lang.Exception
DSEInvalidRequestException
protected void addRequiredDataToOperationCtx(Context opCtx, KeyedCollection kcReqData)
opCtx
- com.ibm.btt.base.ContextkcReqData
- com.ibm.btt.base.KeyedCollectionprotected void addRequiredDataToSessionCtx(java.lang.String sessionId, javax.servlet.http.HttpServletRequest req)
sessionId
- java.lang.Stringreq
- HttpServletRequestprotected boolean areTransitionCtxErrors(Context trCtx)
trCtx
- com.ibm.btt.base.Context
protected void chainOperation(BTTServerOperation oper, java.lang.String sessionId, java.lang.String applicationId) throws DSEInvalidRequestException
oper
- com.ibm.btt.base.DSEServerOperationsessionId
- java.lang.StringapplicationId
- java.lang.String
DSEInvalidRequestException
- There is no context associated with given sessionId or
applicationIdpublic void checkForLocale(ChannelContext channelContext) throws java.lang.Exception
channelContext
-
java.lang.Exception
protected java.lang.String createErrorMessage(java.lang.String type)
type
- String the type of abnormal navigation (pending, aging or
unconsistent processor)public void endRequest(ChannelContext channelContext)
channelContext
- com.ibm.btt.clientserver.ChannelContextpublic void endSessionRequest(ServerOperation anOperation)
anOperation
- com.ibm.btt.base.ServerOperationpublic java.lang.Object executeRequest(ChannelContext channelContext) throws java.lang.Exception
executeRequest
in class DSERequestHandler
channelContext
- com.ibm.btt.clientserver.ChannelContext
java.lang.Exception
public ServerOperation executeSessionRequest(ChannelContext channelContext) throws java.lang.Exception
channelContext
- com.ibm.btt.clientserver.ChannelContext
java.lang.Exception
protected RequestValidationServices getRVS(ChannelContext cc) throws DSEException
cc
- com.ibm.btt.clientserver.ChannelContext ChannelContext used to
get the session
DSEException
- Either it is not possible to retrieve a sessionId from the
channelContext or there is no session associated with the
sessionId.protected java.lang.String getSessionId(ChannelContext aChannelContext)
getSessionId
in class DSERequestHandler
aChannelContext
- com.ibm.btt.clientserver.ChannelContext
public void manageValidationErrors(BTTServerOperation oper, javax.servlet.http.HttpServletRequest request, KeyedCollection kcReqData) throws DSEInvalidArgumentException, DSEObjectNotFoundException
oper
- com.ibm.btt.base.DSEServerOperation The operation with errorsrequest
- javax.servlet.HttpServletRequest request objectkcReqData
- com.ibm.btt.base.KeyedCollection kColl received from client
DSEInvalidArgumentException
DSEObjectNotFoundException
public void preProcessRequest(ChannelContext channelContext) throws DSEException
preProcessRequest
in class DSERequestHandler
channelContext
- com.ibm.btt.clientserver.ChannelContext
DSEException
- Is not possible to retrieve a valid RequestValidationServices
for this session.protected void processAbnormalNavigation(ChannelContext channelContext, java.lang.String type) throws DSEException
channelContext
- com.ibm.btt.clientserver.ChannelContexttype
- java.lang.String The type of error
DSEException
public void processNavigation(ChannelContext channelContext) throws java.lang.Exception
channelContext
- com.ibm.btt.clientserver.ChannelContext
java.lang.Exception
public void processRequest(ChannelContext channelContext)
processRequest
in interface RequestHandler
processRequest
in class DSERequestHandler
channelContext
- com.ibm.btt.clientserver.ChannelContextprotected void syncRequestStart(ChannelContext channelContext) throws DSEInvalidRequestException, DSEObjectNotFoundException, DSECSSessionNotEstablishedException, DSEHtmlDoubleClickException
channelContext
-
DSEObjectNotFoundException
DSEInvalidRequestException
DSEHtmlDoubleClickException
DSECSSessionNotEstablishedException
protected void syncRequestEnd(ChannelContext channelContext) throws DSEInvalidRequestException, DSEObjectNotFoundException, DSECSSessionNotEstablishedException
channelContext
-
DSEInvalidRequestException
DSEObjectNotFoundException
DSECSSessionNotEstablishedException
public void processSessionRequest(ChannelContext channelContext)
processSessionRequest
in interface RequestHandler
processSessionRequest
in class DSERequestHandler
channelContext
- com.ibm.btt.clientserver.ChannelContextprotected void putProcessorIntoCache(DSEHtmlProcessorOperation oper)
oper
- DSEHtmlProcessorOperationprotected BTTServerOperation readOperation(java.lang.String operationName, boolean isProcessorOp, KeyedCollection kcReqData, java.lang.String sessionId) throws DSECSSessionNotEstablishedException, DSEInvalidRequestException
isProcessorOp
- boolean indicating if the request intends to execute a
processor or an operationkcReqData
- KeyedCollection created with the info sent from clientoperationName
- String with the id of the operation or processor that will be
passed to the right externalizersessionId
- String
DSECSSessionNotEstablishedException
- The session is expired
DSEInvalidRequestException
- Operation or processor can not be found, instantiated or
initializedprotected void saveProcessor(DSEHtmlProcessorOperation oper, java.lang.String sessionId, java.lang.String applId) throws DSEException
oper
- DSEHtmlProcessorOperation encapsulating the processorsessionId
- String containing the application session idapplId
- String containing the application SUB session id (if any)
DSEException
- The processor can not be savedpublic void setLocale(javax.servlet.http.HttpServletRequest req, Context ctx) throws java.lang.Exception
req
- Request object where to get the headers fromctx
- context where to store the Locale object
java.lang.Exception
protected void setNextPageId(ChannelContext channelContext, BTTServerOperation theOperation, java.lang.String sessionId, java.lang.String applicationId, PresentationHandler presHandler) throws DSEException
channelContext
- Used to get the related RequestValidationServicestheOperation
- sessionId
- applicationId
- presHandler
-
DSEException
protected void updateTimestamp(java.lang.String sessionId, java.lang.String appSessionId, Operation operation, ChannelContext channelContext) throws DSEInvalidArgumentException, DSEInvalidRequestException
sessionId
- java.lang.Stringoperation
- com.ibm.btt.base.Operation
DSEInvalidArgumentException
DSEInvalidRequestException
public boolean isFirstRequest(RequestValidationServices rvs, ChannelContext chctx) throws DSEException
rvs
- chctx
-
DSEException
public void resetFlagForRVS(ChannelContext channelContext)
protected java.lang.Object executeOperationRequest(ChannelContext channelContext) throws java.lang.Exception
channelContext
- com.ibm.btt.clientserver.ChannelContext
java.lang.Exception
protected void checkContextExistence(BTTServerOperation oper) throws DSEObjectNotFoundException
oper
-
DSEObjectNotFoundException
protected boolean isValidGridData(DataElement de, Context ctx)
de
- ctx
-
protected int indexOfInteger(java.lang.String address)
address
- java.lang.String
protected java.lang.Object executeProcessorRequest(ChannelContext channelContext) throws java.lang.Exception
channelContext
- com.ibm.btt.clientserver.ChannelContext
java.lang.Exception
protected javax.servlet.http.HttpServletRequest getOrgRequest(ChannelContext channelContext)
protected void commitSessionCtx(ChannelContext channelContext) throws DSEInvalidRequestException, DSEObjectNotFoundException
channelContext
-
DSEObjectNotFoundException
DSEInvalidRequestException
protected java.lang.String getProcessorId(ChannelContext channelContext)
channelContext
-
void destroySession(javax.servlet.http.HttpServletRequest req, java.lang.String sessionId)
|
IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |