com.ibm.eNetwork.beans.HOD.event
Class MacroPromptEvent

java.lang.Object
  |
  +--java.util.EventObject
        |
        +--com.ibm.eNetwork.beans.HOD.event.HODEvent
              |
              +--com.ibm.eNetwork.beans.HOD.event.MacroPromptEvent
All Implemented Interfaces:
java.io.Serializable

public class MacroPromptEvent
extends com.ibm.eNetwork.beans.HOD.event.HODEvent

MacroPromptEvent is fired to MacroRuntimeListeners by Macro when it encounters a prompt line in the macro and needs data for that prompt. Use the getPrompts() method to obtain the data that Macro needs. Fill in this data by calling the appropriate methods on the MacroPrompts object. Once you have filled in the prompt data, you may call setPrompts() from this class or you may call it from the Macro class.

See Also:
MacroRuntimeListener, MacroPrompts, Macro, Serialized Form

Constructor Summary
MacroPromptEvent(Macro src, MacroPrompts p)
          Constructs a new MacroPromptEvent object.
 
Method Summary
 boolean getCancel()
          Returns the Cancel flag which halts the macro upon return from the event handler.
 MacroPrompts getPrompts()
          Retrieve the MacroPrompts object from the event.
 void setCancel(boolean cancel)
          Set the Cancel flag to halt the macro upon return from the event handler.
 void setPrompts(MacroPrompts p)
          Set the MacroPrompts object on the Macro object that initially fired the MacroPromptEvent.
 
Methods inherited from class java.util.EventObject
getSource, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MacroPromptEvent

public MacroPromptEvent(Macro src,
                        MacroPrompts p)
Constructs a new MacroPromptEvent object.
Method Detail

getPrompts

public MacroPrompts getPrompts()
Retrieve the MacroPrompts object from the event.
Returns:
MacroPrompts object that needs to be filled in for Macro to finish running.
See Also:
MacroPrompts

setPrompts

public void setPrompts(MacroPrompts p)
                throws MacroException
Set the MacroPrompts object on the Macro object that initially fired the MacroPromptEvent. This will starting running the macro again. This does not set MacroPrompts in this object. The user can set prompts value for any prompt id using setPromptValue in the MacroPrompts object. This value, if non-null, will be used during when the prompt is encountered during play.
Parameters:
p - MacroPrompts object that has been filled in with the appropriate responses.
Throws:
MacroException - Thrown if a parameter is passed that is not valid or if Macro experiences an internal error.
See Also:
MacroPrompts

setCancel

public void setCancel(boolean cancel)
Set the Cancel flag to halt the macro upon return from the event handler.
Parameters:
cancel - If true, the macro stops playing upon return from the prompt event handler. If false (default) the macro continues.
See Also:
getCancel(), MacroPrompts

getCancel

public boolean getCancel()
Returns the Cancel flag which halts the macro upon return from the event handler.
See Also:
setCancel(boolean), MacroPrompts