All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.ibm.eNetwork.beans.HOD.MacroScreens

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

public class MacroScreens
extends Object
implements Serializable, MacroParsable, HODConstants
This class is the collection class for the MacroScreen objects associated with a particular macro. All the screens to be recognized by the Macro bean are contained here.

Generally, this class would be instantiated and the MacroScreen objects would be added. The MacroScreens object 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 or records user interaction when linked to a Terminal bean. 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:ECLScreenDesc

See Also:
MacroActions, MacroAction, MacroScreen, Macro

Constructor Index

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

Method Index

 o add(int, MacroScreen)
Inserts the macro screen at the given index.
 o add(MacroScreen)
Appends the macro screen to the end of the collection.
 o clear()
Removes all macro screens from the collection
 o clone()
Returns a new instance of MacroScreens with the same state as the current MacroScreens object.
 o contains(MacroScreen)
Tests to see if the given macro screen is in the collection.
 o contains(String)
Tests to see if the given macro screen with given Name is in the collection.
 o containsStartScreen()
Returns whether the macro screens collection contains at least one start screen.
 o containsStopScreen()
Returns whether the macro screens collection contains at least one stop screen.
 o format(int, boolean)
Formats the object's contents into a readable string.
 o get(int)
Returns the macro screen at the given index
 o getAuthor()
Returns the author of the macro.
 o getByName(String)
Convenience method that returns a macro screen that has the given Name.
 o getDate()
Returns the date the macro was created or changed.
 o getDescription()
Returns the description of the macro.
 o getName()
Returns the name of the macro.
 o getPauseTime()
Returns the pause time for the macro.
 o getTimeout()
Returns the default next screens timeout value for the macro.
 o getUniqueName()
Returns a unique screen Name string for a possible MacroScreen object to be added to the collection.
 o indexOf(MacroScreen)
Returns the index of the given macro screen.
 o isEmpty()
Tests to see if the macro screen collection is empty.
 o isInitialPrompt()
Returns whether the Macro bean should scan this macro for prompts at the beginning of play and fire them all at once to prompt listeners.
 o isSuppressClearEvent()
Returns whether the system should ignore screen events when a host application sends a clear screen command immediately followed by an end of record indicator in the data stream.
 o remove(int)
Removes the macro screen at the given index from the collection.
 o remove(MacroScreen)
Removes the given macro screen from the collection.
 o screens()
Returns an enumeration of the macro screens in the collection.
 o set(MacroScreen, int)
Replaces the macro screen object at the given index in the collection.
 o setAttributes(Hashtable)
Sets all the basic attributes for the Macro object from the String contents in the given hash table.
 o setAuthor(String)
Sets the author of the macro.
 o setDate(String)
Sets the date the macro was created or changed.
 o setDescription(String)
Sets the description of the macro.
 o setInitialPrompt(boolean)
Sets whether the Macro bean should scan this macro for prompts at the beginning of play and fire them all at once to prompt listeners.
 o setName(String)
Sets the name of the macro.
 o setOwner(Macro)
Sets the owner of the action.
 o setPauseTime(int)
Sets the pause time for the macro.
 o setSuppressClearEvent(boolean)
Sets whether the system should ignore screen events when a host application sends a clear screen command immediately followed by an end of record indicator in the data stream.
 o setTimeout(int)
Sets the default next screens timeout value for the macro.
 o size()
Returns the number of screens in the macro screen collection.

Constructors

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

 o MacroScreens
 public MacroScreens(Vector argScreens)
Constructs a MacroScreens object using the given vector.

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

Methods

 o get
 public MacroScreen get(int argIndex)
Returns the macro screen at the given index

Parameters:
argIndex - index for the MacroScreen object
Returns:
MacroScreen object at the given index
 o set
 public void set(MacroScreen argMS,
                 int argIndex)
Replaces the macro screen object at the given index in the collection.

Parameters:
argMS - MacroScreen object to place in collection
argIndex - index for the MacroScreen object
 o add
 public void add(MacroScreen argMS)
Appends the macro screen to the end of the collection.

Parameters:
argMS - MacroScreen object to place in collection
 o add
 public void add(int argIndex,
                 MacroScreen argMS)
Inserts the macro screen at the given index. All succeeding macro actions will be shifted down in the collection.

Parameters:
argMS - MacroScreen object to place in collection
argIndex - index for the MacroScreen object
 o contains
 public boolean contains(MacroScreen argMS)
Tests to see if the given macro screen is in the collection.

Parameters:
argMS - MacroScreen object to search for
Returns:
true if MacroScreen object is in the collection, false otherwise
 o contains
 public boolean contains(String argName)
Tests to see if the given macro screen with given Name is in the collection.

Parameters:
argName - MacroScreen object Name
Returns:
true if MacroScreen object is in the collection, false otherwise
 o getUniqueName
 public String getUniqueName()
Returns a unique screen Name string for a possible MacroScreen object to be added to the collection.

Returns:
Name string that is unique for a new MacroScreen object
 o isEmpty
 public boolean isEmpty()
Tests to see if the macro screen collection is empty.

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

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

 o remove
 public void remove(MacroScreen argMS)
Removes the given macro screen from the collection.

Parameters:
argMS - MacroScreen object to remove from the collection
 o remove
 public void remove(int argIndex)
Removes the macro screen at the given index from the collection.

Parameters:
argIndex - index for the MacroScreen object to remove
 o indexOf
 public int indexOf(MacroScreen argMS)
Returns the index of the given macro screen.

Parameters:
argMS - MacroScreen object to find index of
Returns:
index of the MacroScreen object, -1 if object is not in collection
 o screens
 public Enumeration screens()
Returns an enumeration of the macro screens in the collection.

Returns:
macro screens enumeration
 o getByName
 public MacroScreen getByName(String argName)
Convenience method that returns a macro screen that has the given Name. Note that this Name string should be unique in the macro.

Parameters:
argName - string Name to search for
Returns:
macro screen witht the given description
 o containsStartScreen
 public boolean containsStartScreen()
Returns whether the macro screens collection contains at least one start screen. If there is a start screen in the MacroScreens collection, all non-start screens will be ignored until the start screen is recognized.

Returns:
if true, a start screen exists in the collection
 o containsStopScreen
 public boolean containsStopScreen()
Returns whether the macro screens collection contains at least one stop screen. If there is a stop screen in the MacroScreens collection, the Macro bean will halt playing after a stop screen is recognized and its actions have been executed.

Returns:
if true, a stop screen exists in the collection
 o getName
 public String getName()
Returns the name of the macro.

Returns:
macro name
 o setName
 public void setName(String argName)
Sets the name of the macro.

Parameters:
argName - new name for the macro
 o getDescription
 public String getDescription()
Returns the description of the macro.

Returns:
macro description
 o setDescription
 public void setDescription(String argDesc)
Sets the description of the macro.

Parameters:
argDesc - new macro description
 o getAuthor
 public String getAuthor()
Returns the author of the macro.

Returns:
macro author
 o setAuthor
 public void setAuthor(String argAuthor)
Sets the author of the macro.

Parameters:
argAuthor - new macro author
 o getDate
 public String getDate()
Returns the date the macro was created or changed. This is not automatically set by the Macro bean. The user must call this method.

Returns:
macro date
 o setDate
 public void setDate(String argDate)
Sets the date the macro was created or changed. This is not automatically set by the Macro bean. The user must call this method.

Parameters:
new - macro date
 o isInitialPrompt
 public boolean isInitialPrompt()
Returns whether the Macro bean should scan this macro for prompts at the beginning of play and fire them all at once to prompt listeners.

Returns:
true if Macro bean should prescan for prompts
 o setInitialPrompt
 public void setInitialPrompt(boolean argVal)
Sets whether the Macro bean should scan this macro for prompts at the beginning of play and fire them all at once to prompt listeners.

Parameters:
argVal - if true, Macro bean will prescan for prompts
 o isSuppressClearEvent
 public boolean isSuppressClearEvent()
Returns whether the system should ignore screen events when a host application sends a clear screen command immediately followed by an end of record indicator in the data stream.

This is an advanced feature and the default is false. You may want to set this value to true if you have screens in your application flow that have all blanks in them. If there is a valid blank screen in the macro and clear events are not ignored, it is possible that an ill-behaved host application can send a clear then end of record, a screen recognition event is processed, and the valid blank screen matches when it shouldn't have.

Returns:
true if system ignores clear screen commands followed by end of record indicators
 o setSuppressClearEvent
 public void setSuppressClearEvent(boolean argVal)
Sets whether the system should ignore screen events when a host application sends a clear screen command immediately followed by an end of record indicator in the data stream.

This is an advanced feature and the default is false. You may want to set this value to true if you have screens in your application flow that have all blanks in them. If there is a valid blank screen in the macro and clear events are not ignored, it is possible that an ill-behaved host application can send a clear then end of record, a screen recognition event is processed, and the valid blank screen matches when it shouldn't have.

Parameters:
argVal - if true, system ignores clear screen commands followed by end of record indicators
 o getTimeout
 public int getTimeout()
Returns the default next screens timeout value for the macro. This value can be overridden in each MacroScreen's MacroNextScreens object.

Returns:
default timeout value.
 o setTimeout
 public void setTimeout(int argTimeout)
Sets the default next screens timeout value for the macro. This value can be overridden in each MacroScreen's MacroNextScreens object.

Parameters:
argTimeout - new timeout value
 o getPauseTime
 public int getPauseTime()
Returns the pause time for the macro. This pause is performed in between each screen and in between each action to ensure that the host system has quieted down. If your host system is slow, this value should be increased past the default of 300 milliseconds.

Returns:
pause time for the macro.
 o setPauseTime
 public void setPauseTime(int argPause)
Sets the pause time for the macro. This pause is performed in between each screen and in between each action to ensure that the host system has quieted down. If your host system is slow, this value should be increased past the default of 300 milliseconds.

Parameters:
argPause - new pause time
 o clone
 public Object clone()
Returns a new instance of MacroScreens with the same state as the current MacroScreens object.

Returns:
copy of current MacroScreens object
Overrides:
clone in class Object
 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 representatino 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 setAttributes
 public MacroParseEvent setAttributes(Hashtable ht) throws MacroException
Sets all the basic attributes for the Macro object from the String contents in the given hash table.

Parameters:
ht - hash table that contains string values of each attribute. Numeric and boolean values are converted from strings.
 o setOwner
 public void setOwner(Macro mac)
Sets the owner of the action.

Parameters:
mac - new Macro bean owner of the action

All Packages  Class Hierarchy  This Package  Previous  Next  Index