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
-
MacroActionPrompt()
- Constructs an empty instance of a macro prompt.
-
MacroActionPrompt(int, int, int, String, String, String, boolean, boolean, boolean, boolean)
- Constructs a functional instance of a macro prompt with the given
parameters.
-
MacroActionPrompt(MacroActionInput)
- Constructs a functional instance of a macro prompt from the relevant
parameters in the given MacroActionInput object.
-
execute()
- Executes the macro prompt action.
-
format(int, boolean)
- Formats the action object's contents into a readable string.
-
getColumn()
- Returns the column position for the prompt.
-
getDefault()
- Returns the default value for the prompt action.
-
getDescription()
- Returns the description associated with the prompt action.
-
getLength()
- Returns the allowable length of the prompt data
-
getName()
- Returns the name for the prompt action.
-
getRow()
- Returns the row position for the prompt
-
getValue()
- Returns the prompted value for the prompt action.
-
isClearField()
- Returns whether the prompt action clears the host field before
placing data on the screen.
-
isEncrypted()
- Returns whether the prompt action data should be hidden, like with
a password.
-
isMoveCursor()
- Returns whether the cursor is moved by the input action or not.
-
isSkip()
- Returns whether the prompt action should be skipped.
-
isTranslateHostKeys()
- Returns if the input text is literal or translated for host aid keys.
-
setClearField(boolean)
- Sets whether the prompt action clears the host field before
placing data on the screen.
-
setColumn(int)
- Sets the column position for the prompt
-
setDefault(String)
- Sets the default value for the prompt action.
-
setDescription(String)
- Sets the description associated with the prompt action.
-
setEncrypted(boolean)
- Sets whether the prompt action data should be hidden, as with
a password.
-
setLength(int)
- Sets the allowable length of the prompt data.
-
setMoveCursor(boolean)
- Sets whether the cursor is moved by the input action or not.
-
setName(String)
- Sets the name for the prompt action.
-
setRow(int)
- Sets the row position for the prompt.
-
setSkip(boolean)
- Sets whether the prompt action should be skipped.
-
setTranslateHostKeys(boolean)
- Sets if the input text is literal or translated for host aid keys.
-
setValue(String)
- Sets the prompted value for the prompt action.
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,
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
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
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
setRow
public void setRow(int argRow)
- Sets the row position for the prompt.
- Parameters:
- argRow - row position for the prompt data to be placed
getColumn
public int getColumn()
- Returns the column position for the prompt.
- Returns:
- 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
getLength
public int getLength()
- Returns the allowable length of the prompt data
- Returns:
- 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
getName
public String getName()
- Returns the name for the prompt action.
- Returns:
- prompt name
setName
public void setName(String argName)
- Sets the name for the prompt action.
- Parameters:
- argName - name of the prompt
getDescription
public String getDescription()
- Returns the description associated with the prompt action.
- Returns:
- prompt description
setDescription
public void setDescription(String argDesc)
- Sets the description associated with the prompt action.
- Parameters:
- argDesc - detailed description attached to the prompt
getDefault
public String getDefault()
- Returns the default value for the prompt action.
- Returns:
- prompt default value
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
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
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
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
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
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
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)
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.
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
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
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
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