Services Builder for Screens

com.attachmate.sc.ssa
Class BaseCustomNavStepEx

java.lang.Object
  |
  +--com.attachmate.nav.engine.ProcessStep
        |
        +--com.attachmate.sc.ssa.BaseCustomNavStepEx
All Implemented Interfaces:
com.attachmate.nav.engine.ICustomNavStep, IPerformanceTool

public abstract class BaseCustomNavStepEx
extends com.attachmate.nav.engine.ProcessStep
implements com.attachmate.nav.engine.ICustomNavStep, IPerformanceTool

Custom Steps Only
This class is the base for custom steps. It supplies the helper classes IQAScreen and ITaskData as fields granting the user access to both Screen and Task data.

The developer will need to subclass this abtract class and define the match(), processData() and getTransitionAction()methods to perform the custom actions needed.

NOTE:Since IQAScreen.sendKeys() doesn't have access to the recorded screen metrics, it will not perform at the same level of performance as the normal NavProcedure. It is highly recommended to only write custom steps when the normal NavProcedure does not work in order to maximize performance.


Field Summary
 
Fields inherited from class com.attachmate.nav.engine.ProcessStep
qaScreen, STATE_DATA, STATE_TRANSITION, system, taskData, useNavScreen
 
Fields inherited from interface com.attachmate.sc.ssa.IPerformanceTool
STATUS_DATA_CHANGED, STATUS_EOR, STATUS_FORMAT_CHANGED, STATUS_KBD_UNLOCK, STATUS_MESSAGE_WAITING, STATUS_SCREEN_ERASED, STATUS_SIZE_CHANGED, STATUS_TYPE_CHANGED
 
Constructor Summary
BaseCustomNavStepEx()
          Creates a new instance of BaseCustomNavStepEx
 
Method Summary
abstract  java.lang.String getTransitionAction()
          Called when the step transitions to the next step.
 void init(com.attachmate.nav.engine.INavContext context)
          Used by the NavEngine to initialize qaScreen and taskData.
abstract  boolean isRecognized()
          Decides if the current screen matches the recognition rule.
 boolean onReadExit(int readFlags, boolean bTimedOut)
          Called while performing IQAScreen.sendKeysto determine if the screen has settled.
abstract  void processData()
          Called to collect the data from the host screen(s).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BaseCustomNavStepEx

public BaseCustomNavStepEx()
Creates a new instance of BaseCustomNavStepEx

Method Detail

init

public void init(com.attachmate.nav.engine.INavContext context)
Used by the NavEngine to initialize qaScreen and taskData.

Specified by:
init in interface com.attachmate.nav.engine.ICustomNavStep
Parameters:
context - the current screen context.

isRecognized

public abstract boolean isRecognized()
                              throws com.attachmate.nav.engine.NavException
Decides if the current screen matches the recognition rule. Override this method to decide if the custom step can start execution on this screen. This is the equivalent of a step's recognition rule in the NavDesigner.

The developer should throw UserCustomStepException to report problems to the navigation engine.

Specified by:
isRecognized in interface com.attachmate.nav.engine.ICustomNavStep
Returns:
true if the step should be ran else return false.
com.attachmate.nav.engine.NavException
See Also:
UserCustomStepException

processData

public abstract void processData()
                          throws com.attachmate.nav.engine.NavException
Called to collect the data from the host screen(s). Collect any data from the screen. When the method returns, make sure that the session is at the screen where any chained task would expect. This is the equivalent of the step's output in the NavDesigner.

The developer should throw UserCustomStepException to report problems to the navigation engine.

Specified by:
processData in interface com.attachmate.nav.engine.ICustomNavStep
com.attachmate.nav.engine.NavException
See Also:
UserCustomStepException

getTransitionAction

public abstract java.lang.String getTransitionAction()
                                              throws com.attachmate.nav.engine.NavException
Called when the step transitions to the next step. This method should set fields and the cursor as needed in preparation of the final transaction navigation. This is the equivalent to the setting the cursor row, cursor column, Transition Action and Inputs in the Navigation Designer.

The developer should throw UserCustomStepException to report problems to the navigation engine.

Specified by:
getTransitionAction in interface com.attachmate.nav.engine.ICustomNavStep
Returns:
a String containing the last navigation command e.g. @E, @1, etc.
com.attachmate.nav.engine.NavException
See Also:
UserCustomStepException

onReadExit

public boolean onReadExit(int readFlags,
                          boolean bTimedOut)
                   throws com.attachmate.nav.engine.NavException
Called while performing IQAScreen.sendKeysto determine if the screen has settled. The default implementation examines the current cursor position and if it doesn't match the cursor coordinates set with the IQAScreen.setWaitForCursor.

(optional) This advanced feature was provided to allow developers to extend this function to enhance performance and reliablilty by replacing settle time as the default mechanism for screen transitions using sendKeys.

The developer should throw UserCustomStepException to report problems to the navigation engine.

Specified by:
onReadExit in interface IPerformanceTool
Parameters:
readFlags - the read return code.
bTimedOut - if true the previous read timed out
Returns:
true if another read is not needed, false if screen has not settled and another read is required.
com.attachmate.nav.engine.NavException
See Also:
UserCustomStepException, DefaultController.read()

Services Builder for Screens