All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.ibm.eNetwork.beans.HOD.MacroActionPrompt

java.lang.Object
   |
   +----com.ibm.eNetwork.beans.HOD.MacroAction
           |
           +----com.ibm.eNetwork.beans.HOD.MacroActionPrompt

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

Constructor Index

 o MacroActionPrompt()
Constructs an empty instance of a macro prompt.
 o MacroActionPrompt(int, int, int, String, String, String, boolean, boolean, boolean, boolean)
Constructs a functional instance of a macro prompt with the given parameters.
 o MacroActionPrompt(MacroActionInput)
Constructs a functional instance of a macro prompt from the relevant parameters in the given MacroActionInput object.

Method Index

 o execute()
Executes the macro prompt action.
 o format(int, boolean)
Formats the action object's contents into a readable string.
 o getColumn()
Returns the column position for the prompt.
 o getDefault()
Returns the default value for the prompt action.
 o getDescription()
Returns the description associated with the prompt action.
 o getLength()
Returns the allowable length of the prompt data
 o getName()
Returns the name for the prompt action.
 o getRow()
Returns the row position for the prompt
 o getValue()
Returns the prompted value for the prompt action.
 o isClearField()
Returns whether the prompt action clears the host field before placing data on the screen.
 o isEncrypted()
Returns whether the prompt action data should be hidden, like with a password.
 o isMoveCursor()
Returns whether the cursor is moved by the input action or not.
 o isSkip()
Returns whether the prompt action should be skipped.
 o isTranslateHostKeys()
Returns if the input text is literal or translated for host aid keys.
 o setClearField(boolean)
Sets whether the prompt action clears the host field before placing data on the screen.
 o setColumn(int)
Sets the column position for the prompt
 o setDefault(String)
Sets the default value for the prompt action.
 o setDescription(String)
Sets the description associated with the prompt action.
 o setEncrypted(boolean)
Sets whether the prompt action data should be hidden, as with a password.
 o setLength(int)
Sets the allowable length of the prompt data.
 o setMoveCursor(boolean)
Sets whether the cursor is moved by the input action or not.
 o setName(String)
Sets the name for the prompt action.
 o setRow(int)
Sets the row position for the prompt.
 o setSkip(boolean)
Sets whether the prompt action should be skipped.
 o setTranslateHostKeys(boolean)
Sets if the input text is literal or translated for host aid keys.
 o setValue(String)
Sets the prompted value for the prompt action.

Constructors

 o 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.

 o MacroActionPrompt
 public MacroActionPrompt(int argRow,
                          int argCol,
                          int argLen,
                          String argName,
                          String argDesc,
                          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
 o 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

Methods

 o 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
 o getRow
 public int getRow()
Returns the row position for the prompt

Returns:
row position
 o setRow
 public void setRow(int argRow)
Sets the row position for the prompt.

Parameters:
argRow - row position for the prompt data to be placed
 o getColumn
 public int getColumn()
Returns the column position for the prompt.

Returns:
column position
 o setColumn
 public void setColumn(int argCol)
Sets the column position for the prompt

Parameters:
argCol - column position for the prompt data to be placed
 o getLength
 public int getLength()
Returns the allowable length of the prompt data

Returns:
length for the prompt
 o setLength
 public void setLength(int argLen)
Sets the allowable length of the prompt data.

Parameters:
argLen - length of the prompt data to be placed
 o getName
 public String getName()
Returns the name for the prompt action.

Returns:
prompt name
 o setName
 public void setName(String argName)
Sets the name for the prompt action.

Parameters:
argName - name of the prompt
 o getDescription
 public String getDescription()
Returns the description associated with the prompt action.

Returns:
prompt description
 o setDescription
 public void setDescription(String argDesc)
Sets the description associated with the prompt action.

Parameters:
argDesc - detailed description attached to the prompt
 o getDefault
 public String getDefault()
Returns the default value for the prompt action.

Returns:
prompt default value
 o setDefault
 public void setDefault(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
 o getValue
 public 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
 o setValue
 public void setValue(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
 o 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
 o 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
 o 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
 o 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)
 o 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
 o isSkip
 public boolean isSkip()
Returns whether the prompt action should be skipped.

Returns:
if true, the execute method will not run the prompt
 o 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.
 o 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
 o 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
 o 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
 o format
 public 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].

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
Overrides:
format in class MacroAction

All Packages  Class Hierarchy  This Package  Previous  Next  Index