com.ibm.dse.automaton.html
Class DSEHtmlState

java.lang.Object
  |
  +--com.ibm.dse.base.DSEHandler
        |
        +--com.ibm.dse.automaton.DSEState
              |
              +--com.ibm.dse.automaton.html.DSEHtmlState

public class DSEHtmlState
extends DSEState

This class represents a state for an HTML processor.

See Also:
Serialized Form

Field Summary
protected  java.lang.String finalPage
           
 
Fields inherited from class com.ibm.dse.automaton.DSEState
ABORT_PROCESS, actionHandlers, CHANGE_STATE, CONTINUE, DEFAULT_TYPE, done, entryActionsTags, EXECUTE_ACTION_AND_CHANGESTATE, exitActionsTags, exitEventName, FINAL_TYPE, ignoreEntryActions, INITIAL_TYPE, name, PAGE_TYPE, pqThread, processor, runningModeFlag, sharedNotifiers, SKIP_ACTION, SKIP_ALL_ACTIONS, SKIP_CONDITIONS, SUBFLOW_TYPE, suspendedThread, SUSPENDTIME, tag, transitions, type, typeIdInfo
 
Constructor Summary
DSEHtmlState()
           
 
Method Summary
 void activate()
          The HtmlState has two special types which differentiates it from the State.
protected  void changeProcessorState(DSEEventObject event)
          This utility method is used to change the state of a processor in response to a change state event.
protected  void doEntryActions(Vector otherTrigs)
          Excecutes the entry actions for this state.
protected  boolean executeActions(TransitionDescriptor transition, DSEEventObject sourceEvent, Vector otherTrigs)
          This utility method executes the actions associated with the supplied transition.
protected  boolean executeActions(Vector actionTags, DSEEventObject sourceEvent, Vector otherTrigs, boolean ignoreFlag, java.lang.String transitionName)
          This method executes the actions associated with the action tags in the supplied vector of tags.
protected  void fireDSEChangeStateEvent(java.lang.String targetStateName, boolean ignoreEntryActionsFlag)
          Fires a change state event to the processor.
protected  void fireDSEChangeStateEvent(java.lang.String targetStateName, boolean ignoreEntryActionsFlag, boolean ignoreExitActionsFlag, java.lang.String transitionName)
          This method dispatches a change state event with required information
protected  void fireDSEChangeStateEvent(java.lang.String targetStateName, boolean ignoreEntryActionsFlag, java.lang.String transitionName)
          This method dispatches a change state event with required information
 java.lang.String getConsequentiality()
          This method returns the consequentiality of this state.
protected  DataMapperFormat getDataMapFormat(Tag formatName)
          This utility method returns a DataMapperFormat for the supplied format name.
 java.lang.String getFinalPage()
          This method gets the final page of this state.
 DataMapperFormat getInputFormat()
          Returns the input format attribute of this class.
 DataMapperFormat getOutputFormat()
          Returns the output format attribute of this class.
 java.lang.Object initializeFrom(Tag aTag)
          Initializes the state of this object from externalized data
 boolean isIgnoreReturnType()
          Returns a boolean indicating whether normal checking for return type should be ignored for this state.
protected  void processEventQueue(Vector otherTrigs)
          This method does most of the logical work of the state.
 void setConsequentiality(java.lang.String newConsequentiality)
          This method sets the consequentiality of this state.
 void setFinalPage(java.lang.String newFinalPage)
          This method sets the final page of this state.
 void setIgnoreReturnType(boolean newIgnoreReturnType)
          Sets the return type attribute of this object.
 void setInputFormat(DataMapperFormat newInputFormat)
          Sets the input format attribute of this class.
 void setOutputFormat(DataMapperFormat newOutputFormat)
          Sets the output format attribute format.
 
Methods inherited from class com.ibm.dse.automaton.DSEState
abort, addHandlersForAction, dispatchEvent, doExitActions, externalizer, fireDSEChangeStateEvent, fireDSEChangeStateEvent, fireDSEChangeStateEvent, getEntryActions, getExitActions, getGuardConditionResult, getInstanceOfAction, getName, getProcessor, getTag, getTransitions, getType, getTypeIdInfo, isIgnoreEntryActions, isRunningModeFlag, readExternal, readExternal, removeExternal, removeHandlersForAction, removeHandlersForAction, resume, setEntryActions, setExitActions, setIgnoreEntryActions, setName, setProcessor, setTag, setTransitions, setType, setTypeIdInfo, subscribeToShareNotifiers, suspend, terminate, toString, toStrings, toTags, unsubscribeToSharedNotifiers, writeExternal, writeExternal
 
Methods inherited from class com.ibm.dse.base.DSEHandler
handleEvent, handleEvent, stopHandlingEvent, stopHandlingEvent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

finalPage

protected java.lang.String finalPage
Constructor Detail

DSEHtmlState

public DSEHtmlState()
Method Detail

activate

public void activate()
              throws DSEInvalidArgumentException,
                     DSEProcessorException
The HtmlState has two special types which differentiates it from the State. Type PAGE: this state returns control to the user, and displays an HTML page. When this page is posted, the state is activated another time. We must ensure that the actions associated are processed only once (the first time the state is activated) and events are processed as well only once (the second time that it is activated). Type SUBFLOW: Same as PAGE, but it runs a subFlow instead of displaying a page. This two types don't receive events from actions or from notifiers in the context hierarchy, the events are received only from the HTML page (type PAGE) or from the typeIdInfo of the child process (type SUBFLOW).
Overrides:
activate in class DSEState
Tags copied from class: DSEState
Throws:
DSEInvalidArgumentException -  
DSEProcessorException -  

changeProcessorState

protected void changeProcessorState(DSEEventObject event)
                             throws DSEProcessorException
This utility method is used to change the state of a processor in response to a change state event. It extracts required information from the event object and uses this information to change state.
Parameters:
event - com.ibm.dse.base.DSEEventObject
Throws:
DSEProcessorException -  

doEntryActions

protected void doEntryActions(Vector otherTrigs)
                       throws DSEInvalidArgumentException,
                              DSEProcessorException
Excecutes the entry actions for this state.
Overrides:
doEntryActions in class DSEState
Parameters:
otherTrigs - com.ibm.dse.base.Vector
Throws:
DSEInvalidArgumentException -  
DSEProcessorException -  

executeActions

protected boolean executeActions(TransitionDescriptor transition,
                                 DSEEventObject sourceEvent,
                                 Vector otherTrigs)
                          throws DSEException
This utility method executes the actions associated with the supplied transition. If this method completes successfully, it fires a change state event to be handled by the state. It returns a boolean to indicate if any event was fired.
Parameters:
transition - com.ibm.dse.automaton.TransitionDescriptor
sourceEvent - com.ibm.dse.base.DSEEventObject
otherTrigs - com.ibm.dse.base.Vector
Returns:
boolean
Throws:
DSEException -  

executeActions

protected boolean executeActions(Vector actionTags,
                                 DSEEventObject sourceEvent,
                                 Vector otherTrigs,
                                 boolean ignoreFlag,
                                 java.lang.String transitionName)
                          throws DSEException
This method executes the actions associated with the action tags in the supplied vector of tags. If this method completes successfully, it fires a change state event to be handled by the state. The boolean and String arguments are passed in any change state event fired from this method.
Parameters:
actionTags - com.ibm.dse.base.Vector
sourceEvent - com.ibm.dse.base.DSEEventObject
otherTrigs - com.ibm.dse.base.Vector
ignoreFlag - boolean
transitionName - java.lang.String
Returns:
boolean
Throws:
DSEException -  

fireDSEChangeStateEvent

protected void fireDSEChangeStateEvent(java.lang.String targetStateName,
                                       boolean ignoreEntryActionsFlag)
                                throws DSEProcessorException
Fires a change state event to the processor.
Parameters:
targetStateName - java.lang.String
ignoreEntryActionsFlag - boolean
Throws:
DSEProcessorException -  

fireDSEChangeStateEvent

protected void fireDSEChangeStateEvent(java.lang.String targetStateName,
                                       boolean ignoreEntryActionsFlag,
                                       java.lang.String transitionName)
                                throws DSEProcessorException
This method dispatches a change state event with required information
Parameters:
targetStateName - java.lang.String
ignoreEntryActionsFlag - boolean
transitionName - java.lang.String
Throws:
DSEProcessorException -  

fireDSEChangeStateEvent

protected void fireDSEChangeStateEvent(java.lang.String targetStateName,
                                       boolean ignoreEntryActionsFlag,
                                       boolean ignoreExitActionsFlag,
                                       java.lang.String transitionName)
                                throws DSEProcessorException
This method dispatches a change state event with required information
Parameters:
targetStateName - java.lang.String
ignoreEntryActionsFlag - boolean
ignoreExitActionsFlag - boolean
transitionName - java.lang.String
Throws:
DSEProcessorException -  

getConsequentiality

public java.lang.String getConsequentiality()
This method returns the consequentiality of this state. It will be one of the following values from DSEHTMLProcessor: CONSEQ_UNDEFINED, CONSEQ_TRUE, or CONSEQ_FALSE ;
Returns:
java.lang.String

getDataMapFormat

protected DataMapperFormat getDataMapFormat(Tag formatName)
                                     throws DSEException
This utility method returns a DataMapperFormat for the supplied format name.
Parameters:
formatName - com.ibm.dse.base.Tag
Returns:
com.ibm.dse.base.DataMapperFormat
Throws:
DSEException -  

getFinalPage

public java.lang.String getFinalPage()
This method gets the final page of this state. This atribute only makes sense in final states. Represents the name of the page that will be displayed when the processor reaches the final state.
Returns:
java.lang.String

getInputFormat

public DataMapperFormat getInputFormat()
Returns the input format attribute of this class.
Returns:
com.ibm.dse.base.DataMapperFormat

getOutputFormat

public DataMapperFormat getOutputFormat()
Returns the output format attribute of this class.
Returns:
com.ibm.dse.base.DataMapperFormat

initializeFrom

public java.lang.Object initializeFrom(Tag aTag)
                                throws java.io.IOException,
                                       DSEException
Initializes the state of this object from externalized data
Overrides:
initializeFrom in class DSEState
Parameters:
aTag - com.ibm.dse.base.Tag
Returns:
java.lang.Object
Throws:
java.io.IOException -  
DSEException -  

isIgnoreReturnType

public boolean isIgnoreReturnType()
Returns a boolean indicating whether normal checking for return type should be ignored for this state. Return types were introduced for HTML processor states, and are used to process certain state types for which we wish to return control from the normal state machine flow. We however may wish to execute these states normally after the first time they return control. The return type attribute controls whether or not a state that would normally return control will ignore it. This method returns the current value of this attribute.
Returns:
boolean

processEventQueue

protected void processEventQueue(Vector otherTrigs)
                          throws DSEInvalidArgumentException,
                                 DSEProcessorException
This method does most of the logical work of the state. It queries the event event queue for an event defining a transition from the state. It then executes any actions corresponding to this transition, and declares interest in changing to a new state by firing a change state event. This event is also trapped in this method and used to change to the new state. The major portion of the logic of this code has been retained from the parent class, DSEState. However, there are significant changes that have been made to support the features required for the HomeBanking for WSSC HTML Client. Make special note that changes to the corresponding method in the superclass might have to be synched up with this method.
Overrides:
processEventQueue in class DSEState
Parameters:
otherTrigs - com.ibm.dse.base.Vector
Throws:
DSEInvalidArgumentException -  
DSEProcessorException -  

setConsequentiality

public void setConsequentiality(java.lang.String newConsequentiality)
This method sets the consequentiality of this state. It should be one of the following values from DSEHTMLProcessor: CONSEQ_UNDEFINED, CONSEQ_TRUE, or CONSEQ_FALSE ;
Parameters:
newConsequentiality - java.lang.String

setFinalPage

public void setFinalPage(java.lang.String newFinalPage)
This method sets the final page of this state. This atribute only makes sense in final states. Represents the name of the page that will be displayed when the processor reaches the final state.
Parameters:
newFinalPage - java.lang.String

setIgnoreReturnType

public void setIgnoreReturnType(boolean newIgnoreReturnType)
Sets the return type attribute of this object. Return types were introduced for HTML processor states, and are used to process certain state types for which we wish to return control from the normal state machine flow. We however may wish to execute these states after the first time they return control. The return type attribute controls whether or not a state that would normally return control will actually be processed.
Parameters:
newIgnoreReturnType - boolean

setInputFormat

public void setInputFormat(DataMapperFormat newInputFormat)
Sets the input format attribute of this class.
Parameters:
newInputFormat - com.ibm.dse.base.DataMapperFormat

setOutputFormat

public void setOutputFormat(DataMapperFormat newOutputFormat)
Sets the output format attribute format.
Parameters:
newOutputFormat - com.ibm.dse.base.DataMapperFormat