com.ibm.eNetwork.beans.HOD
Class MacroActions

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

public class MacroActions
extends java.lang.Object
implements java.io.Serializable, com.ibm.eNetwork.beans.HOD.macro.parser.MacroParsable, com.ibm.eNetwork.HOD.common.HODConstants

This class is the collection class for the MacroAction objects associated with a particular instance of a MacroScreen object. All the actions that will be executed for a particular screen are contained here. These actions are an ordered sequence, so the functionality of this class is oriented around indexing.

Generally, this class would be instantiated, the MacroAction objects would be added, and the MacroActions collection would be added to a MacroScreen object (assume an ECLScreenDesc object is also added to the MacroScreen object). The MacroScreen object(s) could then be added to the Macro bean and the macro played. When the screen appears in the presentation space that matches the MacroScreen object, the MacroAction objects in the MacroActions collection will be executed in sequence.

Note that the Macro bean does this all automatically when it parses a macro file. However, if you want to control the contents of a macro at the internal object representation level of the macro, you would use the MacroScreens object and its contained objects.

See Also:
MacroAction, MacroScreen, Macro, 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
MacroActions()
          Constructs an empty instance of a MacroActions object.
MacroActions(java.util.Vector argActions)
          Constructs a MacroActions object using the given vector.
 
Method Summary
 java.util.Enumeration actions()
          Returns an enumeration of the macro actions in the collection.
 void add(int argIndex, MacroAction argMA)
          Inserts the macro action at the given index.
 void add(MacroAction argMA)
          Appends the macro action to the end of the collection.
 void clear()
          Removes all macro actions from the collection
 java.lang.Object clone()
           
 boolean contains(MacroAction argMA)
          Tests to see if given macro action is in the collection.
 java.lang.String format(int argType, boolean displayAll)
          Formats the object's contents into a readable string.
 MacroAction get(int argIndex)
          Returns the macro action at the given index
 int indexOf(MacroAction argMA)
          Returns the index of the given macro action.
 boolean isEmpty()
          Tests to see if the macro action collection is empty.
 boolean isPromptAll()
          Returns whether any prompt elements in the collection will be gathered together and fired in one prompt event.
 java.lang.String isPromptAllRaw()
          Returns the expression form of whether any prompt elements in the collection will be gathered together and fired in one prompt event.
 void remove(int argIndex)
          Removes the macro action at the given index from the collection.
 void remove(MacroAction argMA)
          Removes the given macro action from the collection.
 void set(MacroAction argMA, int argIndex)
          Replaces the macro action object at the given index in the collection.
 void setOwner(Macro mac)
          Sets the owner of the action.
 void setPromptAll(boolean argPromptAll)
          Sets whether any prompt elements in the collection will be gathered together and fired in one prompt event.
 void setPromptAll(java.lang.String argPromptAll)
          Sets whether any prompt elements in the collection will be gathered together and fired in one prompt event.
 int size()
          Returns the number of actions in the macro action collection.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.ibm.eNetwork.beans.HOD.macro.parser.MacroParsable
setAttributes, setError
 

Constructor Detail

MacroActions

public MacroActions()
Constructs an empty instance of a MacroActions object.

MacroActions

public MacroActions(java.util.Vector argActions)
Constructs a MacroActions object using the given vector.
Parameters:
argActions - vector to use in creating the MacroActions object
Method Detail

get

public MacroAction get(int argIndex)
Returns the macro action at the given index
Parameters:
argIndex - index for the MacroAction object
Returns:
MacroAction object at the given index

set

public void set(MacroAction argMA,
                int argIndex)
Replaces the macro action object at the given index in the collection.
Parameters:
argMA - MacroAction object to place in collection
argIndex - index for the MacroAction object

add

public void add(MacroAction argMA)
Appends the macro action to the end of the collection.
Parameters:
argMA - MacroAction object to place in collection

add

public void add(int argIndex,
                MacroAction argMA)
Inserts the macro action at the given index. All succeeding macro actions will be shifted down in the collection.
Parameters:
argMA - MacroAction object to place in collection
argIndex - index for the MacroAction object

contains

public boolean contains(MacroAction argMA)
Tests to see if given macro action is in the collection.
Parameters:
argMA - MacroAction object to look for in collection
Returns:
true if MacroAction object is in the collection, false otherwise

isEmpty

public boolean isEmpty()
Tests to see if the macro action collection is empty.
Returns:
true if collection is empty, false otherwise

size

public int size()
Returns the number of actions in the macro action collection.
Returns:
number of actions in the collection

clear

public void clear()
Removes all macro actions from the collection

remove

public void remove(MacroAction argMA)
Removes the given macro action from the collection.
Parameters:
argMA - MacroAction object to remove from the collection

remove

public void remove(int argIndex)
Removes the macro action at the given index from the collection.
Parameters:
argIndex - index for the MacroAction object to remove

indexOf

public int indexOf(MacroAction argMA)
Returns the index of the given macro action.
Parameters:
argMA - MacroAction object to find index of
Returns:
index of the MacroAction object, -1 if object is not in collection

actions

public java.util.Enumeration actions()
Returns an enumeration of the macro actions in the collection.
Returns:
macro actions enumeration

setPromptAll

public void setPromptAll(boolean argPromptAll)
Sets whether any prompt elements in the collection will be gathered together and fired in one prompt event. If set to true, the Macro bean will fire all prompts for the currently executing action together. The default is handle each prompt individually. If prompts are gathered together and any prompts are unresolved after the event is fired, the macro bean will fire each unresolved prompts in an individual event. Unresolved prompts are prompts that don't have a value set for them.
Parameters:
argPromptAll - if true all prompts for the current action will be fired in a single event.

setPromptAll

public void setPromptAll(java.lang.String argPromptAll)
Sets whether any prompt elements in the collection will be gathered together and fired in one prompt event. If set to true, the Macro bean will fire all prompts for the currently executing action together. The default is handle each prompt individually. If prompts are gathered together and any prompts are unresolved after the event is fired, the macro bean will fire each unresolved prompts in an individual event. Unresolved prompts are prompts that don't have a value set for them.
Parameters:
expression - if expression evaluates to true all prompts for the current action will be fired in a single event.

isPromptAll

public boolean isPromptAll()
Returns whether any prompt elements in the collection will be gathered together and fired in one prompt event. If true, the Macro bean will fire all prompts for the currently executing action together. The default is handle each prompt individually. If prompts are gathered together and any prompts are unresolved after the event is fired, the macro bean will fire each unresolved prompts in an individual event. Unresolved prompts are prompts that don't have a value set for them.
Returns:
if true all prompts for the current action will be fired in a single event.

isPromptAllRaw

public java.lang.String isPromptAllRaw()
Returns the expression form of whether any prompt elements in the collection will be gathered together and fired in one prompt event. If the expression evaluates to true, the Macro bean will fire all prompts for the currently executing action together. The default is handle each prompt individually. If prompts are gathered together and any prompts are unresolved after the event is fired, the macro bean will fire each unresolved prompts in an individual event. Unresolved prompts are prompts that don't have a value set for them.
Returns:
if expression evaluates to true all prompts for the current action will be fired in a single event.

format

public java.lang.String format(int argType,
                               boolean displayAll)
Formats the object's contents into a readable string. Intended for visual feedback, as with the MacroDebugActionEvent class. Note: this method will result in a complete string representation of the Macro. That is, it calls all the format methods for the screens, descriptions, nextscreens, actions, etc.
Specified by:
format in interface com.ibm.eNetwork.beans.HOD.macro.parser.MacroParsable
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

setOwner

public void setOwner(Macro mac)
Sets the owner of the action.
Parameters:
mac - new Macro bean owner of the action

clone

public java.lang.Object clone()