|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.dse.base.DSENotifier | +--com.ibm.dse.automaton.DSEProcessor | +--com.ibm.dse.automaton.html.DSEHtmlProcessor
This is a subclass of DSEProcessor that implements behaviour specific to the HomeBanking HTML Client. Behaviour has been added in this class to support 'virtual' processors, ie processors which can be persisted with enough information to restore them to the state they were in at the time they are persisted. Behaviour has also been added to change the default behaviour of DSEProcessor, whereby it executes the state machine to its end. The changed behaviour is to check state types before they are processed, and to suspend the processor for some kinds of states, specifically, for the page, and subflow types. In addition, support for a validator class has been added. The validator class provides support for validating business data required for the workflow that the processor is implementing.
Field Summary | |
static java.lang.String |
ABORTING
|
static java.lang.String |
COMPID
|
static java.lang.String |
CONSEQ_FALSE
|
static java.lang.String |
CONSEQ_TRUE
|
static java.lang.String |
CONSEQ_UNDEFINED
|
static java.lang.String |
CONSEQUENTIAL
|
Fields inherited from class com.ibm.dse.automaton.DSEProcessor |
ABORTED,
aProcessorStatusChangedListener,
CHANGESTATE,
cleanQueueOnSwitch,
COMPLETED,
context,
currentState,
eventQueue,
externalizer,
INITIALIZED,
NOT_INITIALIZED,
processorId,
processorName,
RUNNING,
stateTag,
status,
STATUSCHANGEEVENT,
SUSPENDED,
TERMINATEEVENT |
Fields inherited from class com.ibm.dse.base.DSENotifier |
handlersList,
name |
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()
Called on to abort the state machine |
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)
This method attempts to change the current state being managed by the state machine to the one specified by the state name argument. |
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 |
execute()
Serves as an entry point for execution of the state machine. |
void |
execute(java.lang.String eventName)
This method is used to kick off execution of the HTML processor. |
java.lang.String |
getConseqErrorResponse()
Returns the consequential error response defined for this processor. |
java.lang.String |
getParentId()
Returns the parent id attribute of this processor. |
protected State |
getStateInstance(State state,
Tag aTag)
This is a utility method used to obtain an appropriate State instance for the supplied tag. |
ProcessorXValidate |
getXValidator()
Returns the validator attribute for this class. |
int |
indexOfInteger(java.lang.String address)
Utility method which looks for a number inside the given string. |
java.lang.Object |
initializeFrom(Tag aTag)
This method initializes this processor objects 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 |
setConseqErrorResponse(java.lang.String newConseqErrorResponse)
Sets the consequential error response for this processor object. |
void |
setParentId(java.lang.String newParentId)
Set the parent id attribute of this processor object. |
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 |
setXValidator(ProcessorXValidate newXValidator)
Sets the validator attribute of this processor object. |
static boolean |
stateReturnsControl(State state)
This method serves as 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)
This method 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. |
void |
validate(KeyedCollection coll,
Context context)
This method does basic validation of the business data passed in the keyed collection. |
void |
validateFromTransition(KeyedCollection coll,
Context context)
This method does basic validation of the business data passed in the keyed collection. |
void |
xValidate(Context context,
java.lang.String transitionName)
This method uses the processors 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 framework. |
Methods inherited from class com.ibm.dse.base.DSENotifier |
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 |
Field Detail |
public static final java.lang.String COMPID
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 CONSEQUENTIAL
public static final java.lang.String ABORTING
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
public void changeState(java.lang.String newState) throws DSEProcessorException
newState
- java.lang.Stringpublic void changeState(java.lang.String newState, boolean ignoreEntryActions) throws DSEProcessorException
newState
- java.lang.StringignoreEntryActions
- booleanpublic void changeState(java.lang.String newStateName, boolean activate, TransitionDescriptor transition) throws DSEProcessorException
newStateName
- java.lang.Stringactivate
- booleantransition
- com.ibm.dse.automaton.TransitionDescriptorpublic void changeState(java.lang.String newStateName, boolean activate, java.lang.String transitionName) throws DSEProcessorException
newStateName
- java.lang.StringignoreEntryActions
- booleantransitionName
- java.lang.Stringprotected boolean checkLegalSwitch(State state, TransitionDescriptor transition)
state
- com.ibm.dse.automaton.Statetransition
- com.ibm.dse.automaton.TransitionDescriptorpublic boolean checkLegalSwitch(java.lang.String stateName)
stateName
- java.lang.Stringpublic boolean checkLegalSwitch(java.lang.String stateName, java.lang.String eventName)
stateName
- java.lang.StringeventName
- java.lang.Stringpublic void execute() throws DSEInvalidArgumentException, DSEProcessorException
public void execute(java.lang.String eventName) throws DSEInvalidArgumentException, DSEProcessorException
public java.lang.String getConseqErrorResponse()
public java.lang.String getParentId()
protected State getStateInstance(State state, Tag aTag) throws java.lang.Exception
aTag
- com.ibm.dse.base.Tagpublic ProcessorXValidate getXValidator()
public int indexOfInteger(java.lang.String address)
address
- java.lang.Stringpublic java.lang.Object initializeFrom(Tag aTag) throws java.io.IOException, DSEException
aTag
- com.ibm.dse.base.Tagprotected boolean isSystemValue(java.lang.String valueName)
valueName
- java.lang.Stringpublic void setConseqErrorResponse(java.lang.String newConseqErrorResponse)
newConseqErrorResponse
- java.lang.Stringpublic void setParentId(java.lang.String newParentId)
newParentId
- java.lang.Stringprotected void setProcessorConsequentialState(State state, java.lang.String consequentiality)
state
- com.ibm.dse.automaton.Stateconsequentiality
- java.lang.Stringpublic void setXValidator(ProcessorXValidate newXValidator)
newXValidator
- com.ibm.dse.automaton.html.ProcessorXValidatepublic static boolean stateReturnsControl(State state)
state
- com.ibm.dse.automaton.Statepublic void updateContext(Context context) throws DSEObjectNotFoundException, DSEException
context
- com.ibm.dse.base.Contextpublic boolean updateContext(KeyedCollection coll) throws DSETypeException, DSEObjectNotFoundException, DSEInvalidArgumentException
coll
- com.ibm.dse.base.KeyedCollectionpublic void validate(KeyedCollection coll, Context context) throws DSEObjectNotFoundException, DSETypeException, DSEInvalidArgumentException
coll
- com.ibm.dse.base.KeyedCollectioncontext
- com.ibm.dse.base.Contextpublic void validateFromTransition(KeyedCollection coll, Context context) throws DSEException
coll
- com.ibm.dse.base.KeyedCollectioncontext
- com.ibm.dse.base.Contextpublic void xValidate(Context context, java.lang.String transitionName) throws java.lang.Exception
context
- com.ibm.dse.base.ContexttransitionName
- java.lang.String
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |