|
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.base.BTTProcessorNotifier
com.ibm.btt.automaton.DSEProcessor
com.ibm.btt.automaton.html.DSEHtmlProcessor
@ATTR(value={"conseqErrorPage#String#IMPLIED","processorTimeout#Integer#IMPLIED","xValidation#String#IMPLIED"}) public class DSEHtmlProcessor
This is a subclass of DSEProcessor that implements behavior specific to the HomeBanking HTML Client. This behaviour include supporting "virtual" processors (that is, processors which can be persisted with enough information so that they can be restored to the state they were in when they were persisted) and changing the default behavior of DSEProcessor so that it executes the state machine to its end. The changed default behavior consists of checking state types before they are processed, and suspending the processor for the page, and subflow states. In addition, this class adds support for a validator class. The validator validates the business data required for the workflow that the processor is implementing.
Field Summary | |
---|---|
static java.lang.String |
ABORTING
|
static java.lang.String |
CONSEQ_ERROR_PAGE
|
static java.lang.String |
CONSEQ_FALSE
|
static java.lang.String |
CONSEQ_TRUE
|
static java.lang.String |
CONSEQ_UNDEFINED
|
static java.lang.String |
CONSEQUENTIAL
|
static java.lang.String |
DELEGATEVALASSESSMENT
|
static java.lang.String |
HTML
|
protected Tag |
isFormatTag
|
protected java.lang.String |
parentAppSessionId
Support for application session * |
protected java.lang.String |
parentSessionId
Support for application session * |
protected Context |
prevActionContext
Attribute for InterStateFormat support * |
static java.lang.String |
PROCESSTIMEOUT
|
static java.lang.String |
XVALIDATION
|
Fields inherited from class com.ibm.btt.automaton.DSEProcessor |
---|
ABORTED, aProcessorStatusChangedListener, CHANGESTATE, CLEAN_EVENTS_QUEUE_ON_SWITCH, cleanQueueOnSwitch, COMPLETED, context, currentState, eventQueue, externalizer, INITIALIZED, NOT_INITIALIZED, processorId, processorName, RUNNING, stateTag, status, STATUSCHANGEEVENT, SUSPENDED, TERMINATEEVENT |
Fields inherited from class com.ibm.btt.base.BTTProcessorNotifier |
---|
handlersList, name |
Fields inherited from interface com.ibm.btt.automaton.Processor |
---|
COMPID |
Constructor Summary | |
---|---|
DSEHtmlProcessor()
DSEHtmlProcessor constructor. |
|
DSEHtmlProcessor(boolean mustRegister)
DSEHtmlProcessor constructor. |
|
DSEHtmlProcessor(java.lang.String aName)
DSEHtmlProcessor constructor. |
|
DSEHtmlProcessor(java.lang.String aName,
java.lang.String aTID)
DSEHtmlProcessor constructor. |
Method Summary | |
---|---|
void |
abort()
Aborts the state machine. |
protected void |
addElementsToTransitionContext(Context tcContext,
java.lang.String[] elementsToAdd,
int size)
Adds the DataElements whose names are in elementsToAdd to the transition context keyed collection |
void |
changeState(java.lang.String newState)
This is equivalent to calling changeState(String, false, null). |
void |
changeState(java.lang.String newState,
boolean ignoreEntryActions)
This is equivalent to calling changeState(String, false, TransitionDescriptor), with a transition descriptor object that has its ignoreEntryActions flag set to the boolean argument. |
void |
changeState(java.lang.String newStateName,
boolean activate,
java.lang.String transitionName)
This method is equivalent to calling changeState(String, boolean, TransitionDescriptor). |
void |
changeState(java.lang.String newStateName,
boolean activate,
TransitionDescriptor transition)
Attempts to change the current state being managed by the state machine to the one specified by the state name argument. |
protected void |
checkDelValidationAssessmentFlag(HtmlTransitionDescriptor transition,
java.lang.String transitionName,
java.lang.String sessionID)
Checks if the 'delegateValidationAssessment' parameter has been dynamically set by the JSP and if so updates the html transition attribute with the proper value |
protected boolean |
checkLegalSwitch(State state,
TransitionDescriptor transition)
This utility method returns a boolean indicating whether it is legal for the state machine to switch to state supplied as argument. |
boolean |
checkLegalSwitch(java.lang.String stateName)
This utility method returns a boolean indicating whether it is legal for the state machine to switch to state supplied as argument. |
boolean |
checkLegalSwitch(java.lang.String stateName,
java.lang.String eventName)
This utility method returns a boolean indicating whether it is legal for the state machine to switch to state supplied as argument. |
void |
clear()
release the the references of other objects, Some of these objects are candidates for garbage collection |
void |
close()
Unchains the context and releases the eventQueue object. |
protected void |
doDataMapping(Tag formatTag,
Context sourceCtx,
Context targetCtx)
|
void |
execute()
Serves as an entry point for execution of the state machine. |
void |
execute(java.lang.String eventName)
Starts executing the HTML processor. |
java.lang.String |
getConseqErrorResponse()
Returns the consequential error response defined for this processor. |
Context |
getContext()
|
Tag |
getInterStateFormatTag()
|
java.lang.String |
getParentAppSessionId()
Gets the parentAppSessionId |
java.lang.String |
getParentId()
Returns the parent id attribute of this processor. |
java.lang.String |
getParentSessionId()
Gets the parentSessionId |
Context |
getPrevActionContext()
|
Context |
getProcessorContext()
|
java.lang.Long |
getProcessorTimeout()
Returns the specified timeout in miliseconds for the processor |
protected State |
getStateInstance(State state,
Tag aTag)
This is a utility method used to obtain an appropriate State instance for the supplied tag. |
Context |
getTransitionContext(HtmlTransitionDescriptor transition,
java.lang.String transitionName,
java.lang.String sessionID)
Gets the TC if any and updates it with the data elements whose names are stored in the TCInfo of the given transactionName or creates a new one. |
ProcessorXValidate |
getXValidator()
Returns the validator attribute for this class. |
int |
indexOfInteger(java.lang.String address)
This is a utility method used to obtain a number inside the given string. |
java.lang.Object |
initializeFrom(Tag aTag)
Initializes this processor object's state from externalized data definitions. |
protected boolean |
isSystemValue(java.lang.String valueName)
This utility method returns true if the string value passed represents the name of a HTML client system variable, which is defined as one prefixed with dse_. |
void |
reinitialize()
Reinitializes THIS object. |
protected void |
removeElementsFromTransitionContext(KeyedCollection tcContextKColl,
java.lang.String[] elementsToRemove,
int size)
Removes the DataElements whose names are in elementsToAdd from the transition context keyed collection |
void |
setConseqErrorResponse(java.lang.String newConseqErrorResponse)
Sets the consequential error response for this processor object. |
void |
setInterStateFormatTag(Tag formatTag)
|
void |
setParentAppSessionId(java.lang.String parentAppSessionId)
Sets the parentAppSessionId |
void |
setParentId(java.lang.String newParentId)
Sets the parentId property of this processor object. |
void |
setParentSessionId(java.lang.String parentSessionId)
Sets the parentSessionId |
void |
setPrevActionContext(Context paContext)
|
protected void |
setProcessorConsequentialState(State state,
java.lang.String consequentiality)
This utility method changes the status of the processor depending on the consequentiality of the state and the supplied consequentiality argument. |
void |
setProcessorTimeout(java.lang.Long newProcessorTimeout)
Sets the specified time to the processor's timeout in miliseconds. |
void |
setXValidator(ProcessorXValidate newXValidator)
Sets the validator attribute of this processor object. |
static boolean |
stateReturnsControl(State state)
This method is a utility method for HTML processors and determines whether the state supplied to it as argument is of a type for which the processor will suspend execution of the state machine. |
void |
updateContext(Context context)
Updates the processor context by copying values by name from the supplied context into the processor context. |
boolean |
updateContext(KeyedCollection coll)
Validates the data received from client and copies it into the processor context. |
boolean |
updateContext(KeyedCollection coll,
java.lang.String sessionID)
Validates the data received from client and copies it into the processor context. |
void |
validate(KeyedCollection coll,
Context context)
Performs basic validation of the business data passed in the keyed collection. |
void |
validateFromTransition(KeyedCollection coll,
Context context)
Performs basic validation of the business data passed in the keyed collection. |
void |
xValidate(Context context,
java.lang.String transitionName)
Uses the processor's defined validator class to perform validation of data and stores any exceptions thrown in the course of validation in the context heirarchy to be utilized by the HomeBanking toolkit. |
Methods inherited from class com.ibm.btt.base.BTTProcessorNotifier |
---|
addHandler, getHandlersList, getName, removeHandler, setName, signalEvent, signalEvent, signalEvent |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface com.ibm.btt.automaton.Processor |
---|
addHandler, getHandlersList, signalEvent |
Methods inherited from interface com.ibm.btt.base.Cacheable |
---|
getName |
Methods inherited from interface com.ibm.btt.base.Externalizable |
---|
getName, setName |
Field Detail |
---|
public static final java.lang.String HTML
public static final java.lang.String CONSEQ_UNDEFINED
public static final java.lang.String CONSEQ_TRUE
public static final java.lang.String CONSEQ_FALSE
public static final java.lang.String CONSEQ_ERROR_PAGE
public static final java.lang.String XVALIDATION
public static final java.lang.String PROCESSTIMEOUT
public static final java.lang.String DELEGATEVALASSESSMENT
public static final java.lang.String CONSEQUENTIAL
public static final java.lang.String ABORTING
protected java.lang.String parentSessionId
protected java.lang.String parentAppSessionId
protected Context prevActionContext
protected Tag isFormatTag
Constructor Detail |
---|
public DSEHtmlProcessor()
public DSEHtmlProcessor(java.lang.String aName)
aName
- java.lang.Stringpublic DSEHtmlProcessor(java.lang.String aName, java.lang.String aTID)
aName
- java.lang.StringaTID
- java.lang.Stringpublic DSEHtmlProcessor(boolean mustRegister)
mustRegister
- booleanMethod Detail |
---|
public void abort() throws DSEProcessorException
abort
in interface Processor
abort
in class DSEProcessor
DSEProcessorException
protected void addElementsToTransitionContext(Context tcContext, java.lang.String[] elementsToAdd, int size) throws DSEInvalidRequestException
KeyedCollection
- -
The transition context kCollString
- [] -
The names of the elements to be added in the kCollint
- -
The number of elements to be added
DSEInvalidRequestException
public void changeState(java.lang.String newState) throws DSEProcessorException
changeState
in class DSEProcessor
newState
- java.lang.String
DSEProcessorException
public void changeState(java.lang.String newState, boolean ignoreEntryActions) throws DSEProcessorException
changeState
in interface Processor
changeState
in class DSEProcessor
newState
- java.lang.StringignoreEntryActions
- boolean
DSEProcessorException
public void changeState(java.lang.String newStateName, boolean activate, java.lang.String transitionName) throws DSEProcessorException
newStateName
- java.lang.StringignoreEntryActions
- booleantransitionName
- java.lang.String
DSEProcessorException
public void changeState(java.lang.String newStateName, boolean activate, TransitionDescriptor transition) throws DSEProcessorException
The consequentiality of the state specified by the state name argument and the transition passed in as an argument are used to determine the consequential status of the processor. State and transition consequentiality are attributes that define whether the processor will be placed in a consequential state upon traversal of the state or transition. Consequentiality for a state or transition can take one of three values: undefined, true, or false. See com.ibm.btt.automaton.html.DSEHtmlState for a formal definitions.
If the state specified by the state name argument defines consequentiality (true or false), then its value for consequentiality is used to determine the consequential status of the processor. If it does not but the transition does, the transition's consequentiality is used to determine the processors consequential status. If the processor is consequential and the state or transition has a status of false, the processor is removed from the consequential state. If the processor is not consequential, and the state or transition has a status of true, the processor is placed into a consequential state. As mentioned above, the transitions values are only used if the state has a value of undefined for its consequentiality.
If the activate argument is true, the new state is activated upon completion of this method.
newStateName
- java.lang.Stringactivate
- booleantransition
- com.ibm.btt.automaton.TransitionDescriptor
DSEProcessorException
protected void checkDelValidationAssessmentFlag(HtmlTransitionDescriptor transition, java.lang.String transitionName, java.lang.String sessionID)
HtmlTransitionDescriptor
- -
The transitionString
- -
the transition nameString
- -
the session IDprotected void doDataMapping(Tag formatTag, Context sourceCtx, Context targetCtx) throws DSEException
format
- com.ibm.btt.base.DataMapperFormatsourceCtx
- com.ibm.btt.base.ContexttargetCtx
- com.ibm.btt.base.Context
DSEException
public boolean checkLegalSwitch(java.lang.String stateName)
stateName
- java.lang.String
public boolean checkLegalSwitch(java.lang.String stateName, java.lang.String eventName)
stateName
- java.lang.StringeventName
- java.lang.String
protected boolean checkLegalSwitch(State state, TransitionDescriptor transition)
state
- com.ibm.btt.automaton.Statetransition
- com.ibm.btt.automaton.TransitionDescriptor
public void close() throws DSEInvalidRequestException, DSEObjectNotFoundException
close
in interface Processor
close
in class DSEProcessor
DSEInvalidRequestException
DSEObjectNotFoundException
public void execute() throws DSEInvalidArgumentException, DSEProcessorException
execute
in interface Executable
execute
in class DSEProcessor
DSEInvalidArgumentException
DSEProcessorException
public void execute(java.lang.String eventName) throws DSEInvalidArgumentException, DSEProcessorException
DSEInvalidArgumentException
DSEProcessorException
public java.lang.String getConseqErrorResponse()
public java.lang.String getParentAppSessionId()
public java.lang.String getParentId()
public java.lang.String getParentSessionId()
public java.lang.Long getProcessorTimeout()
protected State getStateInstance(State state, Tag aTag) throws java.lang.Exception
aTag
- com.ibm.btt.base.Tag
java.lang.Exception
public Context getTransitionContext(HtmlTransitionDescriptor transition, java.lang.String transitionName, java.lang.String sessionID) throws DSEInvalidRequestException
HtmlTransitionDescriptor
- -
The transitionString
- -
the transition nameString
- -
the session ID
DSEInvalidRequestException
public ProcessorXValidate getXValidator()
public int indexOfInteger(java.lang.String address)
address
- java.lang.String
public java.lang.Object initializeFrom(Tag aTag) throws java.io.IOException, DSEException
initializeFrom
in class DSEProcessor
aTag
- com.ibm.btt.base.Tag
java.io.IOException
DSEException
DSEProcessorException
protected boolean isSystemValue(java.lang.String valueName)
valueName
- java.lang.String
public void reinitialize()
reinitialize
in interface Cacheable
reinitialize
in class DSEProcessor
protected void removeElementsFromTransitionContext(KeyedCollection tcContextKColl, java.lang.String[] elementsToRemove, int size)
KeyedCollection
- -
The transition context kCollString
- [] -
The names of the elements to be removed from the kCollint
- -
The number of elements to be removedpublic Context getPrevActionContext()
getPrevActionContext
in interface InterStateFormatEnabledProcessor
public Tag getInterStateFormatTag()
getInterStateFormatTag
in interface InterStateFormatEnabledProcessor
public Context getContext()
getContext
in interface InterStateFormatEnabledProcessor
getContext
in interface Processor
getContext
in class DSEProcessor
public Context getProcessorContext()
public void setPrevActionContext(Context paContext)
setPrevActionContext
in interface InterStateFormatEnabledProcessor
public void setInterStateFormatTag(Tag formatTag)
setInterStateFormatTag
in interface InterStateFormatEnabledProcessor
public void setConseqErrorResponse(java.lang.String newConseqErrorResponse)
newConseqErrorResponse
- java.lang.Stringpublic void setParentAppSessionId(java.lang.String parentAppSessionId)
parentAppSessionId
- The parentAppSessionId to setpublic void setParentId(java.lang.String newParentId)
newParentId
- java.lang.Stringpublic void setParentSessionId(java.lang.String parentSessionId)
parentSessionId
- The parentSessionId to setprotected void setProcessorConsequentialState(State state, java.lang.String consequentiality)
state
- com.ibm.btt.automaton.Stateconsequentiality
- java.lang.Stringpublic void setProcessorTimeout(java.lang.Long newProcessorTimeout)
newParentId
- java.lang.Longpublic void setXValidator(ProcessorXValidate newXValidator)
newXValidator
- com.ibm.btt.automaton.html.ProcessorXValidatepublic static boolean stateReturnsControl(State state)
state
- com.ibm.btt.automaton.State
public void updateContext(Context context) throws DSEObjectNotFoundException, DSEException
context
- com.ibm.btt.base.Context
DSEObjectNotFoundException
DSEException
public boolean updateContext(KeyedCollection coll) throws DSETypeException, DSEObjectNotFoundException, DSEInvalidArgumentException
coll
- com.ibm.btt.base.KeyedCollection
DSETypeException
DSEObjectNotFoundException
DSEInvalidArgumentException
public boolean updateContext(KeyedCollection coll, java.lang.String sessionID) throws DSETypeException, DSEObjectNotFoundException, DSEInvalidArgumentException
coll
- com.ibm.btt.base.KeyedCollection
DSETypeException
DSEObjectNotFoundException
DSEInvalidArgumentException
public void validate(KeyedCollection coll, Context context) throws DSEObjectNotFoundException, DSETypeException, DSEInvalidArgumentException
coll
- com.ibm.btt.base.KeyedCollectioncontext
- com.ibm.btt.base.Context
DSEException
DSEObjectNotFoundException
DSETypeException
DSEInvalidArgumentException
public void validateFromTransition(KeyedCollection coll, Context context) throws DSEException
coll
- com.ibm.btt.base.KeyedCollectioncontext
- com.ibm.btt.base.Context
DSEException
public void xValidate(Context context, java.lang.String transitionName) throws java.lang.Exception
context
- com.ibm.btt.base.ContexttransitionName
- java.lang.String
java.lang.Exception
public void clear()
|
IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |