All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.ibm.eNetwork.beans.HOD.MacroActions

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

public class MacroActions
extends Object
implements Serializable, MacroParsable, 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

Constructor Index

 o MacroActions()
Constructs an empty instance of a MacroActions object.
 o MacroActions(Vector)
Constructs a MacroActions object using the given vector.

Method Index

 o actions()
Returns an enumeration of the macro actions in the collection.
 o add(int, MacroAction)
Inserts the macro action at the given index.
 o add(MacroAction)
Appends the macro action to the end of the collection.
 o clear()
Removes all macro actions from the collection
 o clone()
 o contains(MacroAction)
Tests to see if given macro action is in the collection.
 o format(int, boolean)
Formats the object's contents into a readable string.
 o get(int)
Returns the macro action at the given index
 o indexOf(MacroAction)
Returns the index of the given macro action.
 o isEmpty()
Tests to see if the macro action collection is empty.
 o isPromptAll()
Returns whether any prompt elements in the collection will be gathered together and fired in one prompt event.
 o remove(int)
Removes the macro action at the given index from the collection.
 o remove(MacroAction)
Removes the given macro action from the collection.
 o set(MacroAction, int)
Replaces the macro action object at the given index in the collection.
 o setOwner(Macro)
Sets the owner of the action.
 o setPromptAll(boolean)
Sets whether any prompt elements in the collection will be gathered together and fired in one prompt event.
 o size()
Returns the number of actions in the macro action collection.

Constructors

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

 o MacroActions
 public MacroActions(Vector argActions)
Constructs a MacroActions object using the given vector.

Parameters:
argActions - vector to use in creating the MacroActions object

Methods

 o 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
 o 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
 o add
 public void add(MacroAction argMA)
Appends the macro action to the end of the collection.

Parameters:
argMA - MacroAction object to place in collection
 o 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
 o 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
 o isEmpty
 public boolean isEmpty()
Tests to see if the macro action collection is empty.

Returns:
true if collection is empty, false otherwise
 o size
 public int size()
Returns the number of actions in the macro action collection.

Returns:
number of actions in the collection
 o clear
 public void clear()
Removes all macro actions from the collection

 o remove
 public void remove(MacroAction argMA)
Removes the given macro action from the collection.

Parameters:
argMA - MacroAction object to remove from the collection
 o 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
 o 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
 o actions
 public Enumeration actions()
Returns an enumeration of the macro actions in the collection.

Returns:
macro actions enumeration
 o 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.
 o 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.
 o format
 public 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.

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
 o setOwner
 public void setOwner(Macro mac)
Sets the owner of the action.

Parameters:
mac - new Macro bean owner of the action
 o clone
 public Object clone()
Overrides:
clone

All Packages  Class Hierarchy  This Package  Previous  Next  Index