com.ibm.eNetwork.beans.HOD
Class MacroActionPrompt

java.lang.Object
  |
  +--com.ibm.eNetwork.beans.HOD.MacroAction
        |
        +--com.ibm.eNetwork.beans.HOD.MacroActionPrompt
All Implemented Interfaces:
com.ibm.eNetwork.HOD.common.HODConstants, com.ibm.eNetwork.beans.HOD.macro.parser.MacroParsable, java.io.Serializable

public class MacroActionPrompt
extends MacroAction

This class represents one prompt action associated with a MacroScreen object. The prompt action is used for placing variable data input into an action sequence. That is, if the data won't be acquired until macro runtime, a prompt should be used.

The Macro bean handles prompting differently depending on whether there are prompt listeners attached to the bean or not. If there are prompt listeners (actually in MacroRuntimeListener) attached and the Macro bean encounters a prompt action, the Macro bean calls the listeners to provide it with the data for the prompt. If there are no prompt listeners, no prompt event fires and the Macro bean tries to use the default value for the prompt action. If there is no default value, the Macro bean is not able to continue and the play ends in error.

See Also:
Macro, MacroRuntimeListener, Serialized Form

Fields inherited from interface com.ibm.eNetwork.HOD.common.HODConstants
DEFAULT_WIN_FONT, HOD_ICON_EVENT, HOD_MSG_FILE, HOD_RAS_COMPID_ADVMACRO, HOD_RAS_COMPID_ASSOC_PRT, HOD_RAS_COMPID_BLINKREMAP, HOD_RAS_COMPID_CODEPAGE, HOD_RAS_COMPID_COLORREMAP, HOD_RAS_COMPID_CONFIG, HOD_RAS_COMPID_FILETRANSFER, HOD_RAS_COMPID_FTP_SCREEN, HOD_RAS_COMPID_FTP_SESSION, HOD_RAS_COMPID_FTP_TERMINAL, HOD_RAS_COMPID_FUDOMA, HOD_RAS_COMPID_HOD_API, HOD_RAS_COMPID_IMPEXP, HOD_RAS_COMPID_JNILOAD, HOD_RAS_COMPID_KEYPAD, HOD_RAS_COMPID_KEYREMAP, HOD_RAS_COMPID_MACRO, HOD_RAS_COMPID_MACROMANGR, HOD_RAS_COMPID_PRT_TERMINAL, HOD_RAS_COMPID_SCREEN, HOD_RAS_COMPID_SESSION, HOD_RAS_COMPID_SESSION_MGR, HOD_RAS_COMPID_SLP, HOD_RAS_COMPID_TERMINAL, HOD_RAS_COMPID_ZIPPRINT, HOD_RAS_FUNC_NAME, HOD_START_UP, HOD_TRANSFER_FILE_INFO, MOUSE_DOUBLE_CLICK_THRESHOLD, XFER_ASCII_GET_OPTIONS, XFER_ASCII_GET_OPTIONS_DEFAULT, XFER_ASCII_PUT_OPTIONS, XFER_ASCII_PUT_OPTIONS_DEFAULT, XFER_BINARY_GET_OPTIONS, XFER_BINARY_GET_OPTIONS_DEFAULT, XFER_BINARY_PUT_OPTIONS, XFER_BINARY_PUT_OPTIONS_DEFAULT, XFER_DEFAULT_OPTIONS, XFER_FILETYPE_DTA, XFER_FILETYPE_SAVF, XFER_FILETYPE_SRC, XFER_HOST_TYPE, XFER_HOST_TYPE_CICS, XFER_HOST_TYPE_CMS, XFER_HOST_TYPE_DEFAULT, XFER_HOST_TYPE_OS400, XFER_HOST_TYPE_TSO, XFER_PACKET_SIZE, XFER_PACKET_SIZE_DEFAULT, XFER_TIME_OUT_VALUE, XFER_TIME_OUT_VALUE_DEFAULT, XFER_TRANSFER_MODE, XFER_TRANSFER_MODE_ASCII, XFER_TRANSFER_MODE_BINARY, XFER_TRANSFER_MODE_DEFAULT
 
Constructor Summary
MacroActionPrompt()
          Constructs an empty instance of a macro prompt.
MacroActionPrompt(int argRow, int argCol, int argLen, java.lang.String argName, java.lang.String argDesc, java.lang.String argDef, boolean argClear, boolean argEncrypt, boolean argMoveCursor, boolean argXlateAid)
          Constructs a functional instance of a macro prompt with the given parameters.
MacroActionPrompt(MacroActionInput argInputAction)
          Constructs a functional instance of a macro prompt from the relevant parameters in the given MacroActionInput object.
 
Method Summary
 void execute()
          Executes the macro prompt action.
 java.lang.String format(int argType, boolean displayAll)
          Formats the action object's contents into a readable string.
 java.lang.String getAssignToVar()
          Returns the name of the variable to which prompt response is being assigned.
 int getColumn()
          Returns the column position for the prompt.
 java.lang.String getColumnRaw()
          Returns the expression form of the column position for the prompt.
 java.lang.String getDefault()
          Returns the default value for the prompt action.
 java.lang.String getDefaultRaw()
          Returns the expression form of the default value for the prompt action.
 java.lang.String getDescription()
          Returns the description associated with the prompt action.
 java.lang.String getDescriptionRaw()
          Returns the expression form of the description associated with the prompt action.
 int getLength()
          Returns the allowable length of the prompt data
 java.lang.String getLengthRaw()
          Returns the expression form of the allowable length of the prompt data
 java.lang.String getName()
          Returns the name for the prompt action.
 java.lang.String getNameRaw()
          Returns the expression form of the name for the prompt action.
 int getRow()
          Returns the row position for the prompt
 java.lang.String getRowRaw()
          Returns the expression form of the row position for the prompt
 java.lang.String getValue()
          Returns the prompted value for the prompt action.
 boolean isAssignToVar()
          Returns whether the prompt response is being assigned to a variable
 boolean isClearField()
          Returns whether the prompt action clears the host field before placing data on the screen.
 java.lang.String isClearFieldRaw()
          Returns the expression form of whether the prompt action clears the host field before placing data on the screen.
 boolean isEncrypted()
          Returns whether the prompt action data should be hidden, like with a password.
 java.lang.String isEncryptedRaw()
          Returns the expression form of whether the prompt action data should be hidden, like with a password.
 boolean isMoveCursor()
          Returns whether the cursor is moved by the input action or not.
 java.lang.String isMoveCursorRaw()
          Returns the expression form of whether the cursor is moved by the input action or not.
 boolean isSkip()
          Returns whether the prompt action should be skipped.
 boolean isTranslateHostKeys()
          Returns if the input text is literal or translated for host aid keys.
 java.lang.String isTranslateHostKeysRaw()
          Returns expression form of if the input text is literal or translated for host aid keys.
 boolean isVariableUpdateOnly()
          Returns whether the prompt action response is just for a variable update and will not be placed on the screen
 java.lang.String isVariableUpdateOnlyRaw()
          Returns the expression form of whether the prompt action response is just for a variable update and will not be placed on the screen
 void setAssignToVar(java.lang.String argAssign)
          Sets the variable to receive the prompt response
 void setClearField(boolean argClear)
          Sets whether the prompt action clears the host field before placing data on the screen.
 void setClearField(java.lang.String argClear)
          Sets whether the prompt action clears the host field before placing data on the screen.
 void setColumn(int argCol)
          Sets the column position for the prompt
 void setColumn(java.lang.String argC)
          Sets the column position for the prompt
 void setDefault(java.lang.String argDef)
          Sets the default value for the prompt action.
 void setDescription(java.lang.String argDesc)
          Sets the description associated with the prompt action.
 void setEncrypted(boolean argEncrypt)
          Sets whether the prompt action data should be hidden, as with a password.
 void setEncrypted(java.lang.String argEncrypt)
          Sets whether the prompt action data should be hidden, as with a password.
 void setLength(int argLen)
          Sets the allowable length of the prompt data.
 void setLength(java.lang.String argLen)
          Sets the allowable length of the prompt data.
 void setMoveCursor(boolean argMC)
          Sets whether the cursor is moved by the input action or not.
 void setMoveCursor(java.lang.String argMC)
          Sets whether the cursor is moved by the input action or not.
 void setName(java.lang.String argName)
          Sets the name for the prompt action.
 void setRow(int argRow)
          Sets the row position for the prompt.
 void setRow(java.lang.String argR)
          Sets the row position for the prompt.
 void setSkip(boolean argSkip)
          Sets whether the prompt action should be skipped.
 void setTranslateHostKeys(boolean argVal)
          Sets if the input text is literal or translated for host aid keys.
 void setTranslateHostKeys(java.lang.String argVal)
          Sets if the input text is literal or translated for host aid keys.
 void setValue(java.lang.String argVal)
          Sets the prompted value for the prompt action.
 void setVariableUpdateOnly(boolean argDontSend)
          Sets whether the prompt action response is placed on the screen
 void setVariableUpdateOnly(java.lang.String argDontSend)
          Sets whether the prompt action response is placed on the screen
 
Methods inherited from class com.ibm.eNetwork.beans.HOD.MacroAction
clone, equals, halt, setECLSession, setOwner, setRuntimeListeners
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.ibm.eNetwork.beans.HOD.macro.parser.MacroParsable
setAttributes, setError
 

Constructor Detail

MacroActionPrompt

public MacroActionPrompt()
Constructs an empty instance of a macro prompt.

If you use this constructor you must call all the set methods of this class to properly set up the action.


MacroActionPrompt

public MacroActionPrompt(int argRow,
                         int argCol,
                         int argLen,
                         java.lang.String argName,
                         java.lang.String argDesc,
                         java.lang.String argDef,
                         boolean argClear,
                         boolean argEncrypt,
                         boolean argMoveCursor,
                         boolean argXlateAid)
Constructs a functional instance of a macro prompt with the given parameters.

Note: if control character mnemonics are embedded in the argDef parameter, they will be converted to their appropriate value. For example, [Ctrl-Z] (case sensitive!) will be converted to (char)0x1A. Valid values are [Ctrl-A] through [Ctrl-Z].

Parameters:
argRow - row position for the prompt data to be placed
argCol - column position for the prompt data to be placed
argLen - length of the prompt data to be placed
argName - name of the prompt
argDesc - detailed description attached to the prompt
argDef - default value for the prompt
argClear - if true, host screen field is cleared before prompt data is placed
argEncrypt - if true, indicates that prompt data should not be displayed (example, passwords)
argMoveCursor - if true, cursor is moved to the end of the input
argXlateAid - if true, host aid keys are translated

MacroActionPrompt

public MacroActionPrompt(MacroActionInput argInputAction)
Constructs a functional instance of a macro prompt from the relevant parameters in the given MacroActionInput object.

Note: because the MacroActionInput class doesn't have a name parameter, the name parameter for the prompt will the XML syntax of the input action. You may change the name of the prompt action after you create it.

Note: if control character mnemonics are embedded in the text parameter of the input action, they will be converted to their appropriate value. For example, [Ctrl-Z] (case sensitive!) will be converted to (char)0x1A. Valid values are [Ctrl-A] through [Ctrl-Z].

Parameters:
argInputAction - input action to be used
Method Detail

execute

public void execute()
Executes the macro prompt action. Note: you must use the setECLSession and setOwner methods before calling execute, or the execute method will throw a NullPointerException.
Overrides:
execute in class MacroAction

getRow

public int getRow()
Returns the row position for the prompt
Returns:
row position

getRowRaw

public java.lang.String getRowRaw()
Returns the expression form of the row position for the prompt
Returns:
expression form of the row position

setRow

public void setRow(int argRow)
Sets the row position for the prompt.
Parameters:
argRow - row position for the prompt data to be placed

setRow

public void setRow(java.lang.String argR)
Sets the row position for the prompt.
Parameters:
expression - row position for the prompt data to be placed

getColumn

public int getColumn()
Returns the column position for the prompt.
Returns:
column position

getColumnRaw

public java.lang.String getColumnRaw()
Returns the expression form of the column position for the prompt.
Returns:
expression form of the column position

setColumn

public void setColumn(int argCol)
Sets the column position for the prompt
Parameters:
argCol - column position for the prompt data to be placed

setColumn

public void setColumn(java.lang.String argC)
Sets the column position for the prompt
Parameters:
expression - column position for the prompt data to be placed

getLength

public int getLength()
Returns the allowable length of the prompt data
Returns:
length for the prompt

getLengthRaw

public java.lang.String getLengthRaw()
Returns the expression form of the allowable length of the prompt data
Returns:
expression form of the length for the prompt

setLength

public void setLength(int argLen)
Sets the allowable length of the prompt data.
Parameters:
argLen - length of the prompt data to be placed

setLength

public void setLength(java.lang.String argLen)
Sets the allowable length of the prompt data.
Parameters:
expression - length of the prompt data to be placed

getName

public java.lang.String getName()
Returns the name for the prompt action.
Returns:
prompt name

getNameRaw

public java.lang.String getNameRaw()
Returns the expression form of the name for the prompt action.
Returns:
expression form of the prompt name

setName

public void setName(java.lang.String argName)
Sets the name for the prompt action.
Parameters:
argName - name of the prompt

getDescription

public java.lang.String getDescription()
Returns the description associated with the prompt action.
Returns:
prompt description

getDescriptionRaw

public java.lang.String getDescriptionRaw()
Returns the expression form of the description associated with the prompt action.
Returns:
expression form of the prompt description

setDescription

public void setDescription(java.lang.String argDesc)
Sets the description associated with the prompt action.
Parameters:
argDesc - detailed description attached to the prompt

getDefault

public java.lang.String getDefault()
Returns the default value for the prompt action.
Returns:
prompt default value

getDefaultRaw

public java.lang.String getDefaultRaw()
Returns the expression form of the default value for the prompt action.
Returns:
expression form of the prompt default value

setDefault

public void setDefault(java.lang.String argDef)
Sets the default value for the prompt action.

Note: if control character mnemonics are embedded in the argDef parameter, they will be converted to their appropriate value. For example, [Ctrl-Z] (case sensitive!) will be converted to (char)0x1A. Valid values are [Ctrl-A] through [Ctrl-Z].

Parameters:
argDef - default value for the prompt

getValue

public java.lang.String getValue()
Returns the prompted value for the prompt action. This is the value that is set when the Macro bean fires a prompt event.
Returns:
prompt default value

setValue

public void setValue(java.lang.String argVal)
Sets the prompted value for the prompt action. This is the value that should be set when the Macro bean fires a prompt event.
Parameters:
argVal - value for the prompt

isClearField

public boolean isClearField()
Returns whether the prompt action clears the host field before placing data on the screen.
Returns:
if true, host field at prompt row and column should be cleared

isClearFieldRaw

public java.lang.String isClearFieldRaw()
Returns the expression form of whether the prompt action clears the host field before placing data on the screen.
Returns:
if expression evaluates to true, host field at prompt row and column should be cleared

setClearField

public void setClearField(boolean argClear)
Sets whether the prompt action clears the host field before placing data on the screen.
Parameters:
argClear - if true, host screen field is cleared before prompt data is placed on the screen

setClearField

public void setClearField(java.lang.String argClear)
Sets whether the prompt action clears the host field before placing data on the screen.
Parameters:
expression - if true, host screen field is cleared before prompt data is placed on the screen

isVariableUpdateOnly

public boolean isVariableUpdateOnly()
Returns whether the prompt action response is just for a variable update and will not be placed on the screen
Returns:
if true, the prompt response will not be placed on the screen

isVariableUpdateOnlyRaw

public java.lang.String isVariableUpdateOnlyRaw()
Returns the expression form of whether the prompt action response is just for a variable update and will not be placed on the screen
Returns:
if expression evaluates to true, the prompt response will not be placed on the screen

setVariableUpdateOnly

public void setVariableUpdateOnly(boolean argDontSend)
Sets whether the prompt action response is placed on the screen
Parameters:
argUpdate - if true, the prompt response will not be placed on the screen

setVariableUpdateOnly

public void setVariableUpdateOnly(java.lang.String argDontSend)
Sets whether the prompt action response is placed on the screen
Parameters:
expression - if expression evalutes to true, the prompt response will not be placed on the screen

getAssignToVar

public java.lang.String getAssignToVar()
Returns the name of the variable to which prompt response is being assigned. If not assigning to a variable, this method returns an empty string.
Returns:
name of variable being updated with the prompt response

isAssignToVar

public boolean isAssignToVar()
Returns whether the prompt response is being assigned to a variable
Returns:
if true, the prompt response is being assigned to a variable

setAssignToVar

public void setAssignToVar(java.lang.String argAssign)
Sets the variable to receive the prompt response
Parameters:
argAssign - name of the variable

isEncrypted

public boolean isEncrypted()
Returns whether the prompt action data should be hidden, like with a password.
Returns:
if true, prompt action data should not be displayed

isEncryptedRaw

public java.lang.String isEncryptedRaw()
Returns the expression form of whether the prompt action data should be hidden, like with a password.
Returns:
if expression evaluates to true, prompt action data should not be displayed

setEncrypted

public void setEncrypted(boolean argEncrypt)
Sets whether the prompt action data should be hidden, as with a password.
Parameters:
argEncrypt - if true, indicates that prompt data should not be displayed (example, passwords)

setEncrypted

public void setEncrypted(java.lang.String argEncrypt)
Sets whether the prompt action data should be hidden, as with a password.
Parameters:
expression - if true, indicates that prompt data should not be displayed (example, passwords)

setSkip

public void setSkip(boolean argSkip)
Sets whether the prompt action should be skipped.
Parameters:
argSkip - if true, the execute method will not run the prompt

isSkip

public boolean isSkip()
Returns whether the prompt action should be skipped.
Returns:
if true, the execute method will not run the prompt

setTranslateHostKeys

public void setTranslateHostKeys(boolean argVal)
Sets if the input text is literal or translated for host aid keys. The prompt will not translate host aid keys by default.
Parameters:
argVal - if true, host aid key translation takes place, if false, all the characters in the text is placed on the PS.

setTranslateHostKeys

public void setTranslateHostKeys(java.lang.String argVal)
Sets if the input text is literal or translated for host aid keys. The prompt will not translate host aid keys by default.
Parameters:
expression - if expression evaluates to true, host aid key translation takes place, if false, all the characters in the text is placed on the PS.

isTranslateHostKeys

public boolean isTranslateHostKeys()
Returns if the input text is literal or translated for host aid keys.
Returns:
input type, literal or host aid key translation

isTranslateHostKeysRaw

public java.lang.String isTranslateHostKeysRaw()
Returns expression form of if the input text is literal or translated for host aid keys.
Returns:
expression form of the input type, literal or host aid key translation

isMoveCursor

public boolean isMoveCursor()
Returns whether the cursor is moved by the input action or not. This only applies when the inputType property is set to INPUT_LITERAL.
Returns:
if true, cursor is moved by the action

isMoveCursorRaw

public java.lang.String isMoveCursorRaw()
Returns the expression form of whether the cursor is moved by the input action or not. This only applies when the inputType property is set to INPUT_LITERAL.
Returns:
if expression evaluates to true, cursor is moved by the action

setMoveCursor

public void setMoveCursor(boolean argMC)
Sets whether the cursor is moved by the input action or not. This only applies when the inputType property is set to INPUT_LITERAL.
Parameters:
argMoveCursor - if true, cursor is moved to the end of the input

setMoveCursor

public void setMoveCursor(java.lang.String argMC)
Sets whether the cursor is moved by the input action or not. This only applies when the inputType property is set to INPUT_LITERAL.
Parameters:
expression - if true, cursor is moved to the end of the input

format

public java.lang.String format(int argType,
                               boolean displayAll)
Formats the action object's contents into a readable string. Intended for visual feedback, as with the MacroDebugActionEvent class.

Note: if control character are embedded in the default value text, they will be converted to their appropriate value. For example, (char)0x1A will be converted to [Ctrl-Z] (case sensitive!). Valid values are [Ctrl-A] through [Ctrl-Z].

Overrides:
format in class MacroAction
Parameters:
argType - reserved, currently only XML strings are supported
displayAll - if true, optional parameters are formatted also
Returns:
formatted string that reflects the contents of the action