com.ibm.eNetwork.beans.HOD
Class Macro

java.lang.Object
  |
  +--com.ibm.eNetwork.beans.HOD.HODBean
        |
        +--com.ibm.eNetwork.beans.HOD.Macro
All Implemented Interfaces:
java.lang.Cloneable, CommListener, com.ibm.eNetwork.ECL.ECLConstants, java.util.EventListener, java.io.Externalizable, com.ibm.eNetwork.HOD.common.HODConstants, java.beans.PropertyChangeListener, ScreenMouseListener, SendKeyListener, java.io.Serializable, TraceProducer

public class Macro
extends HODBean
implements SendKeyListener, CommListener, com.ibm.eNetwork.ECL.ECLConstants, com.ibm.eNetwork.HOD.common.HODConstants, ScreenMouseListener

Macro bean contains functionality for playing and recording host terminal user actions when it is wired to either a Terminal bean or a Session bean.

Think of the Macro bean as a state machine engine within the host screen domain. That is, a macro that is played by the Macro bean should be thought of as a series of screens and the actions for those screens. When the macro "sees" a screen in the host presentation space, the actions will be executed for that screen. If there are "next" screens specified with the current screen, the Macro bean checks any further screens from the host against the next screens for the current screen. If there is a match, the cycle continues. If there isn't a match, the macro ends in error. If there are no next screens specified, any screen is valid. This cycle continues until a screen is encountered that is specified as a stop screen. Note: if a start screen is specified (and there can be only one) the macro will not start playing unless the start screen matches.

It follows then that a macro is a series of screen statements. These screen statements each have 3 main elements: the description, the actions, and the next screens. The description is used to describe how the screen looks. Keywords, host screen attributes, field count, OIA state, and cursor position are the main ways to describe a screen. The actions are the steps the Macro bean should take when it "sees" a screen that matches the description. Actions can be keystrokes, data extraction, prompts, and user messages, among others. Note that the Macro bean ignores any screen changes while actions are being executed. The next screens are optional and are basically just pointers to valid next screens after the actions take place. Next screens must correspond to existing screens in the macro and are the way to enforce control flow from screen to screen.

The preferred language for Macro bean is XML. The Macro bean generates and parses macros as XML. All the developer needs to do is call the Macro.setMacro method with the XML string and the Macro bean will parse the macro if it is syntactically correct. Refer to the macro XML syntax document for details on how to write XML macros.

The Macro bean also supports the deprecated Host On-Demand Version 3.0 language but further use of this language is not encouraged. You may not save recorded macros from the Macro bean using the Version 3.0 syntax.

You are not limited to XML or the Version 3.0 language. If you want, you can implement your own parser in conjunction with the Macro bean. The parser you implement must keep the concept of screens and their actions. This is the only restriction. This is possible because the internal storage representation of a macro is contained in the MacroScreens class, which has its own method called Macro.setParsedMacro. Macro can be initialized with a macroScreens object using the setParsedMacro method.

The exposure of the MacroScreens class offers another benefit. You can skip the parsing step if you already have a working macro that you want to use again (for example, server side Java). MacroScreens is serializable, so all you need to do is call Macro.getParsedMacro and serialize and save the MacroScreens object returned. By skipping the parsing step, you remove all the overhead from parsing in your application. See the MacroScreens description for more information on the use of this class.

There are three basic ways to get a working macro: let the Macro bean record it, load in a previously written XML file, or assemble a MacroScreens object correctly yourself.

If you use the record feature of the Macro bean, any host interaction by the user will be recorded automatically. This is limited to rudimentary screen descriptions and keystrokes. You must design your application to take advantage of the other features of the Macro bean such as screen data extraction, detailed screen descriptions, prompting and so forth. There are methods on the Macro bean that your application can call while the bean is in record mode (insertPrompt, insertDataExtract, etc).

Also, you can set up the Macro bean with an XML file and it will parse the file for you. This requires a syntactically correct file, which you can check at runtime using the MacroParseListener/MacroParseEvent model. If there are any errors in the file, the Macro bean will report it in the parse event.

Finally, if you assemble the MacroScreens object yourself, the Macro bean has virtually unlimited extensibility. You can create any action derived from the MacroAction class to suit your needs. You can also do custom screen recognition beyond what the ECLScreenDesc can do by using the ECLSDCustom class contained in the IBM Host Access Class Library.

The following describes a way you would use the Macro bean:

  1. Instantiate a Macro bean and a Terminal or Session bean.
  2. Wire CommEvents and SendKeys events from Terminal or Session to Macro.
  3. Set up the Terminal or Session bean (host name or IP address, etc.).
  4. Call startCommunication on Terminal or Session.
  5. A CommEvent is fired to the Macro bean when startCommunication is successful. You can assume that the Macro bean is ready to use when communications start successfully. To verify the state of the Macro bean, you can implement MacroRuntimeListener and monitor MacroStateEvents. When the Macro.STATE_EMPTY state is received, the macro is ready to start recording.
  6. Populate the Macro bean with a macro using one of the three methods explained above.
  7. After you have recorded or set a macro you will be free to play it.
  8. If you are having difficulties playing the macro (timing out, for example), it is likely that the screens you have described in the macro are not matching. Implement the MacroDebugListener interface to analyze the screen comparison results.

Macro States

The following illustrates which function calls are allowed in each state:

Disconnected Stopped Empty Playing Play Paused Play Error Recording Record Paused Record Error
clearXXX  X  X
setMacroXXX  X  X
getMacroXX   X  X
play X  XX  X
record XX  X XX
pause   X  X  
stop   XX XX 

Properties

The following table lists the properties of the Macro Bean:

* - Properties with type "enum" are String types that accept a specific set of string values. The valid values for an enum property can be obtained by calling the list <property name> method. The set method for enum properties validates the value before any changes are accepted, and a PropertyVetoException is thrown if an value is given that is not valid.

Note: All properties are bound and vetoable. A PropertyChangeEvent is fired to all PropertyChangeListeners after a property is changed. A vetoable PropertyChangeEvent is fired to all VetoableChangeListeners before a property is changed. Vetoable PropertyChangeListeners can veto a property change by throwing a PropertyVetoException.

Property Name Type Default Access
macroName String zero length string read/write
macroDescription String zero length string read/write
macroAuthor String zero length string read/write
macroDate String zero length string read/write
standardTimeout int 60000 (mSec) read/write
pauseTime int 300 (mSec) read/write
initialPrompt boolean true read/write
skipNullPrompts boolean false read/write
recordUI boolean false read/write
empty boolean true read
state int STATE_DISCONNECTED read

Events Fired

Event Type Fired To Event Handler Method
MacroPromptEvent - Fired when a macro contains prompt commands/ Any MacroRuntimeListener macroPromptEvent(MacroPromptEvent)
MacroExtractEvent - Fired when a macro contains extract commands/ Any MacroRuntimeListener macroExtractEvent(MacroExtractEvent)
MacroStateEvent - Fired when a macro changes state/ Any MacroRuntimeListener macroStateEvent(MacroStateEvent)
MacroErrorEvent - Fired when a macro error occurs/ Any MacroRuntimeListener macroErrorEvent(MacroErrorEvent)
MacroTraceEvent - Fired when Macro encounters a trace action during play/ Any MacroRuntimeListener macroTraceEvent(String)
MacroMessageEvent - Fired when Macro encounters a message action during play/ Any MacroRuntimeListener macroMessageEvent(String)
MacroCustomActionEvent - Fired when Macro encounters a custom action during play/ Any MacroCustomActionListener execute(MacroCustomActionEvent)
MacroDebugActionEvent - Fired when Macro is about to execute an action during play/ Any MacroDebugListener executeAction(MacroDebugActionEvent)
MacroDebugActionEvent - Fired when Macro has compared a screen during play/ Any MacroDebugListener screensCompared(MacroDebugActionEvent)
MacroParseEvent - Fired when Macro encounters a parse syntax error when setMacro is called/ Any MacroParseListener parseFailed(MacroParseEvent)
PropertyChangeEvent - Fired when a property of the Bean is changed. Any PropertyChangeListener propertyChange(PropertyChangeEvent)
Vetoable PropertyChangeEvent - Fired when a vetoable property of the Bean is changed. Any VetoableChangeListener vetoableChange(PropertyChangeEvent)
MacroExtractCoordEvent - Fired when Macro encounters an extract action during play/ Any MacroExtractCoordListener macroExtractCoordEvent(MacroExtractCoordEvent)
MacroLoopEvent - Fired once for each screen if the screen has a positive recognition limit value/ Any MacroLoopListener macroLoopEvent(MacroLoopEvent)
MacroTickTockEvent - Fired every second until a screen is recongized or the macro times out/ Any MacroTickTockListener macroTickTockEvent(MacroTickTockEvent)

Events Accepted

Event Type Fired From Event Handler Method
CommEvent Terminal, Session commEvent(commEvent)
SendKeyEvent Terminal, Session sendKeyEvent(SendKeyEvent)

See Also:
Serialized Form

Field Summary
static java.lang.String AUTHOR
          Author property keyword.
static int CAPTURE_BOTTOM
          Use with the insertScreenDesc method to capture the bottom row(s) of the current screen.
static int CAPTURE_TOP
          Use with the insertScreenDesc method to capture the top row(s) of the current screen.
static java.lang.String DATE
          Date property keyword.
static java.lang.String DESCRIPTION
          Description property keyword.
static int EID_INVALID_PARM
          User supplied an invalid parameter
static int EID_M_CONNECTION_DOWN
          macro experienced a dropped connected
static int EID_M_INTERNAL_ERR
          Macro has encountered an internal error
static int EID_M_INVALID_NS
          Invalid next screen
static int EID_M_MISSING_SD
          Missing screen descriptor
static int EID_M_RECO_LIMIT_GOTO_NOTFOUND
          reco limit reached and the goto screen not found
static int EID_M_RECO_LIMIT_NOGOTO
          reco limit reached without a next screen specified
static int EID_M_TIMED_OUT
          Macro timed out
static int EID_MACRO_COMMWAIT_FALSE
          macro COMMWAIT was false
static int EID_MACRO_PROMPT_ERR
          Macro has encountered an prompt error
static java.lang.String EMPTY
          Empty property keyword.
static java.lang.String FINAL_SCREEN_BOUNDARY
          FinalScreenBoundary property keyword.
static java.lang.String INITIAL_PROMPT
          InitialPrompt property keyword.
static java.lang.String INITIAL_SCREEN_BOUNDARY
          InitialScreenBoundary property keyword.
static java.lang.String NAME
          Name property keyword.
static java.lang.String PAUSE_TIME
          PauseTime property keyword.
static java.lang.String RECORD_UI
          RecordUI property keyword.
static java.lang.String STANDARD_TIMEOUT
          StandardTimeout property keyword.
static java.lang.String STATE
          State property keyword.
static int STATE_DISCONNECTED
          State property value.
static int STATE_EMPTY
          State property value.
static int STATE_INTERNAL_ERROR
          State property value.
static int STATE_PLAY_ERROR
          State property value.
static int STATE_PLAY_PAUSED
          State property value.
static int STATE_PLAYING
          State property value.
static int STATE_RECORD_ERROR
          State property value.
static int STATE_RECORD_PAUSED
          State property value.
static int STATE_RECORDING
          State property value.
static int STATE_STOPPED
          State property value.
static int STATE_USER_ERROR
          State property value.
 
Fields inherited from class com.ibm.eNetwork.beans.HOD.HODBean
BEAN_VERSION_STRING, TRACE_LEVEL, TRACE_MAXIMUM, TRACE_MINIMUM, TRACE_NONE, TRACE_NORMAL
 
Fields inherited from interface com.ibm.eNetwork.ECL.ECLConstants
ALL_FIELDS, ALL_PLANES, ALPHANUM_FIELD, ALTCUR_STR, ALTVIEW_STR, ATTN_STR, ATTR_5250_ALPHA_ONLY, ATTR_5250_ALPHANUM, ATTR_5250_ALPHANUM_MASK, ATTR_5250_BIDI_RTL, ATTR_5250_BRIGHT, ATTR_5250_DBCS_KATAKANA, ATTR_5250_DISPLAY, ATTR_5250_MAG_STRIPE, ATTR_5250_MODIFIED, ATTR_5250_NORMAL, ATTR_5250_NUM_ONLY, ATTR_5250_NUM_PLUS, ATTR_5250_NUM_SHIFT, ATTR_5250_NUM_SIGNED, ATTR_5250_PROTECTED, ATTR_ALPHANUM, ATTR_DISPLAY1, ATTR_DISPLAY2, ATTR_MDT, ATTR_PROTECTED, AUTOPUSH_STR, AUTOREV_STR, BACKSP_STR, BACKTAB_STR, BACKTABWORD_STR, BASE_STR, BEGINFLD_STR, BIDI_MODE_OFF_STR, BIDI_MODE_ON_STR, BIDIL_STR, BLUE_3270, CANCELPJOB_STR, CLEAR_STR, CLEARRECT_STR, CLOSE_STR, COLOR_ATTRIBUTES_PLANE, COLOR_PLANE, COLUMNHEAD_STR, CONTEXT_DISP_STR, CONTINUEPJOB_STR, COPY_STR, COPY_TABLE_STR, COPYALL_STR, COPYAPPEND_STR, CRSEL_STR, CSD_STR, CURDOWN_STR, CURLEFT_STR, CURRIGHT_STR, CURSOR_DIRECTION_STR, CURUP_STR, CUT_STR, DB_CA_EXIST, DB_CLEAR, DB_DB1, DB_DBCS, DB_DBHIGH, DB_DEAD, DB_MIX, DB_SI, DB_SO, DB_SOSI_EXIST, DBATTR_DEFAULT, DBATTR_EITHER, DBATTR_ONLY, DBATTR_OPEN, DBATTR_PURE, DBCS_PLANE, DBCSINP_STR, DBDEFALT, DEF_3270, DELCHAR_STR, DELWORD_STR, DISPLAYABLE_FIELD, DOCMODE_STR, DSPSOSI_STR, DUP_CHAR, DUP_STR, EBC_SI, EBC_SO, ENDLINE_STR, ENDPUSH_STR, ENTER_STR, ENTERRESET_STR, ERASEEOF_STR, ERASEFLD_STR, ERASEINPUT_STR, EXFIELD_PLANE, EXT_ATTR_3270_APL, EXT_ATTR_3270_BLINK, EXT_ATTR_3270_CHAR, EXT_ATTR_3270_DBCS, EXT_ATTR_3270_EBCDIC, EXT_ATTR_3270_REVERSE, EXT_ATTR_3270_UNDERLINE, EXT_ATTR_5250_BLINK, EXT_ATTR_5250_COLUMN_SEP, EXT_ATTR_5250_REVERSE, EXT_ATTR_5250_UNDERLINE, EXT_BLINK, EXT_COL_SEP, EXT_D_BOTH, EXT_D_LEFT, EXT_D_OVER, EXT_D_RIGHT, EXT_D_UNDER, EXT_DBCS, EXT_EFA_APL_SET, EXT_EFA_FG_SET, EXT_G_ALL, EXT_G_LEFT, EXT_G_OVER, EXT_G_RIGHT, EXT_G_UNDER, EXT_LINEATTR_CHECK, EXT_LINEATTR_DBLWID, EXT_LINEATTR_DBLWID_DBLHT_BOT, EXT_LINEATTR_DBLWID_DBLHT_TOP, EXT_LINEATTR_NORMAL, EXT_NON_ERASEABLE, EXT_NORMAL, EXT_OPAQUE, EXT_REVERSE, EXT_UNDERLN, F1_STR, F10_STR, F11_STR, F12_STR, F13_STR, F14_STR, F15_STR, F16_STR, F17_STR, F18_STR, F19_STR, F2_STR, F20_STR, F21_STR, F22_STR, F23_STR, F24_STR, F3_STR, F4_STR, F5_STR, F6_STR, F7_STR, F8_STR, F9_STR, FIELD_MARK, FIELD_PLANE, FINAL_STR, FLDBASE_STR, FLDEXT_STR, FLDMINUS_STR, FLDMRK_STR, FLDPLUS_STR, FLDREV_STR, FLDSHAPE_STR, FORMFEED_STR, FWDTAB_STR, GRCURSOR_STR, GREEN_3270, GRID_PLANE, HELP_STR, HILIGHT_FIELD, HINDIL_STR, HOME_STR, HOST_PLANE, HOSTPRT_STR, INITIAL_STR, INSERT_STR, ISOLATED_STR, JUMP_STR, KEYPAD0_STR, KEYPAD1_STR, KEYPAD2_STR, KEYPAD3_STR, KEYPAD4_STR, KEYPAD5_STR, KEYPAD6_STR, KEYPAD7_STR, KEYPAD8_STR, KEYPAD9_STR, KEYPADCOMMA_STR, KEYPADDOT_STR, KEYPADENTER_STR, KEYPADMINUS_STR, LATINL_STR, LOGICAL_DISP_STR, LOLIGHT_FIELD, MARKDOWN_STR, MARKLEFT_STR, MARKRIGHT_STR, MARKUP_STR, MIDDLE_STR, MODIFIED_FIELD, MOVEDOWN_STR, MOVELEFT_STR, MOVERIGHT_STR, MOVEUP_STR, MSR_STR, NATIONAL_DISP_STR, NEUT_3270, NEWLINE_STR, NEXTWORD_STR, NLS_PLANE, NO_TIMEOUT, NOMINAL_DISP_STR, NON_DISPLAYABLE_FIELD, NON_PENDETECTABLE_FIELD, NUMCONTEXT_STR, NUMERIC_FIELD, NUMNATIONAL_STR, NUMNOMINAL_STR, OICR_STR, PA1_STR, PA2_STR, PA3_STR, PAGEDWN_STR, PAGEUP_STR, PASTE_STR, PASTENEXT_STR, PENDETECTABLE_FIELD, PINK_3270, PREVIOUSWORD_STR, PRINT_STR, PROTECTED_FIELD, PRTESTPAGE_STR, PUSH_STR, RAWTEXT_PLANE, RED_3270, RESET_STR, RETRYPRT_STR, ROUNDTRIP_OFF_STR, ROUNDTRIP_ON_STR, RULE_STR, SCREENREV_STR, SEARCH_BACKWARD, SEARCH_FORWARD, SELECTALL_STR, SHIFT_F1_STR, SHIFT_F10_STR, SHIFT_F11_STR, SHIFT_F12_STR, SHIFT_F13_STR, SHIFT_F14_STR, SHIFT_F15_STR, SHIFT_F16_STR, SHIFT_F17_STR, SHIFT_F18_STR, SHIFT_F19_STR, SHIFT_F2_STR, SHIFT_F20_STR, SHIFT_F3_STR, SHIFT_F4_STR, SHIFT_F5_STR, SHIFT_F6_STR, SHIFT_F7_STR, SHIFT_F8_STR, SHIFT_F9_STR, SMARTORDERING_OFF_STR, SMARTORDERING_ON_STR, STARTMAC_STR, SYSREQ_STR, TABWORD_STR, TEST_STR, TEXT_PLANE, THAIL_STR, TOGGLEHEB_STR, TURQ_3270, TXTORL2R_STR, TXTORR2L_STR, TXTTYPEL_STR, TXTTYPEV_STR, UNMARK_STR, UNMODIFIED_FIELD, UNPROTECTED_FIELD, VISUAL_DISP_STR, VTPRINTCONVERT_STR, WORDLFT_STR, WORDRGT_STR, WORDWRAP_STR, YELLOW_3270
 
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
Macro()
          Macro Bean null constructor.
Macro(java.util.Properties p)
          Constructor which takes a Properties object containing the initial property settings.
 
Method Summary
 void addMacroCustomActionListener(MacroCustomActionListener listener)
          Adds the given MacroCustomActionListener to the macro.
 void addMacroDebugListener(MacroDebugListener listener)
          Adds the given MacroDebugListener to the macro.
 void addMacroExtractCoordListener(MacroExtractCoordListener listener)
          Adds the given MacroExtractCoordListener to the macro.
 void addMacroLoopListener(MacroLoopListener listener)
          Adds the given MacroLoopListener to the macro.
 void addMacroParseListener(MacroParseListener listener)
          Adds the given MacroParseListener to the macro.
 void addMacroRuntimeListener(MacroRuntimeListener listener)
          Adds the given MacroRuntimeListener to the macro.
 void addMacroTickTockListener(MacroTickTockListener listener)
          Adds the given MacroTickTockListener to the macro.
 void beginScreen(java.lang.String name, int recoLimit, boolean startScreen, boolean stopScreen)
          Deprecated.  
 void clear()
          Clears the current macro from the Macro bean.
 java.lang.Object clone()
          Returns a new instance of Macro with the same properties as the current Macro.
 void dispose()
          Cleans up Macro's base environment and working storage.
 void endScreen()
          Deprecated.  
 java.lang.String getMacro()
          Returns the current macro to a String.
 void getMacro(java.io.OutputStream strm)
          Returns the current macro to an output stream.
 void getMacro(java.io.PrintWriter wrtr)
          Returns the current macro to a PrintWriter.
 java.lang.String[] getMacroArray()
          Returns the current macro to a string array.
 java.lang.String getMacroAuthor()
          Returns the author of the macro.
 java.lang.String getMacroDate()
          Returns the date of the macro.
 java.lang.String getMacroDescription()
          Returns the description of the macro.
 MacroIOProvider getMacroIOProvider()
          returns MacroIOProvider associated with this macro
 java.lang.String getMacroName()
          Returns the name of the macro.
 MacroPrinterDriver getMacroPrinterDriver()
          Return a printer that can be used while playing the macro.
 MacroScreens getParsedMacro()
          Returns the current macro as a MacroScreens object.
 int getPauseTime()
          Returns the pause value for the macro.
 int getPSEventType()
          Returns the type of Presentation Space (PS) event that the Macro bean monitors for screen matching.
 int getStandardTimeout()
          Returns the standard timeout value for the macro.
 int getState()
          Returns current state of the currently playing/active Macro Bean.
 void insertConnectionWait(int waitType, int timeOut)
          Deprecated.  
 void insertCustomAction(java.lang.String argID, java.lang.String argsArgs)
          Inserts a custom action into the current macro screen during recording.
 void insertDataExtract(java.lang.String name, int srow, int scol, int erow, int ecol)
          Method that inserts a data extract sequence into the macro string.
 void insertDataExtract(java.lang.String name, int srow, int scol, int erow, int ecol, java.lang.String planes)
          Method that inserts a data extract sequence into the macro string.
 void insertInput(java.lang.String text, boolean xlateAid, boolean moveCursor)
          Inserts an input action into the current macro screen during recording.
 void insertInput(java.lang.String text, int row, int col, boolean xlateAid, boolean moveCursor)
          Inserts an input action into the current macro screen during recording.
 void insertMessage(java.lang.String msg, java.lang.String title)
          Inserts a message action into the current macro screen during recording.
 void insertOIAWait()
          Deprecated.  
 void insertPause(long argTimeout)
          Inserts a pause action into the current macro screen during recording.
 void insertPlayMacro(java.lang.String argMacName, java.lang.String argScrName, java.lang.String argXferVarType)
          Inserts a play macro action into the current macro screen during recording.
 void insertPrompt(int row, int col, int len, java.lang.String name, java.lang.String value, boolean clearField)
          Inserts a user prompt sequence into the current macro.
 void insertPrompt(int row, int col, int len, java.lang.String name, java.lang.String value, boolean clearField, boolean encrypted, boolean placeValue)
          Inserts a password user prompt sequence into the current macro.
 void insertPrompt(java.lang.String row, java.lang.String col, java.lang.String len, java.lang.String name, java.lang.String value, boolean clearField)
          Deprecated.  
 void insertPrompt(java.lang.String row, java.lang.String col, java.lang.String len, java.lang.String name, java.lang.String value, boolean clearField, java.lang.String echoChar)
          Deprecated.  
 void insertRunProgram(java.lang.String prog, java.lang.String param, boolean wait)
          Inserts a run program action into the current macro screen during recording.
 void insertScreenDesc(boolean useOIA, boolean useCursor, boolean useFields, boolean useInputFields)
          Inserts new screen description elements into the current macro screen.
 void insertScreenDesc(boolean useNumFields, boolean useNumInputFields, java.lang.String keyword, java.lang.String timeOut)
          Deprecated.  
 void insertScreenDesc(int textOrient, int inset)
          Inserts a new screen string description element into the current macro screen.
 void insertScreenDesc(int srow, int scol, int erow, int ecol)
          Inserts a screen string description element into the current macro screen.
 void insertSDAttrib(char attrib, int row, int col, int plane, boolean opt, boolean invertReco)
          Inserts an attribute description element into the current screen based on the given parameters.
 void insertSDBlock(java.lang.String[] text, int row, int col, boolean caseSense, boolean opt, boolean invertReco)
          Inserts a block description element into the current screen based on the given parameters.
 void insertSDBlock(java.lang.String[] text, int srow, int scol, int erow, int ecol, boolean caseSense, boolean opt, boolean invertReco)
          Inserts a block description element into the current screen based on the given parameters.
 void insertSDCursor(int row, int col, boolean opt, boolean invertReco)
          Inserts a cursor position description element into the current screen based on the given parameters.
 void insertSDCustom(com.ibm.eNetwork.ECL.screenreco.event.ECLCustomRecoListener listener, java.lang.String id, boolean opt)
          Inserts a custom description element into the current screen based on the given parameters.
 void insertSDFields(int num, boolean opt, boolean invertReco)
          Inserts a field count description element into the current screen based on the given parameters.
 void insertSDInputFields(int num, boolean opt, boolean invertReco)
          Inserts an input field count description element into the current screen based on the given parameters.
 void insertSDOIA(int oiatype, boolean opt, boolean invertReco)
          Inserts an OIA status description element into the current screen based on the given parameters.
 void insertSDString(java.lang.String text, int row, int col, boolean caseSense, boolean opt, boolean invertReco)
          Inserts a string description element into the current screen based on the given parameters.
 void insertSDString(java.lang.String text, int srow, int scol, int erow, int ecol, boolean caseSense, boolean opt, boolean invertReco)
          Inserts a string description element into the current screen based on the given parameters.
 void insertTrace(java.lang.String data, int type)
          Inserts a trace action into the current macro screen during recording.
 void insertXfer(int argDirection, java.lang.String argHostFile, java.lang.String argPCFile, java.lang.String argOptions, boolean argClear, int argTimeout, java.lang.String argPCCodePage, java.lang.String argHostOrient, java.lang.String argPCOrient, java.lang.String argPCFType, java.lang.String argLamAlefExpan, java.lang.String argLamAlefComp)
          Deprecated.  
 void insertXfer(int argDirection, java.lang.String argHostFile, java.lang.String argPCFile, java.lang.String argOptions, boolean argClear, int argTimeout, java.lang.String argPCCodePage, java.lang.String argHostOrient, java.lang.String argPCOrient, java.lang.String argPCFType, java.lang.String argLamAlefExpan, java.lang.String argLamAlefComp, java.lang.String argSymSwap, java.lang.String argNumerals, java.lang.String argRoundTrip)
          Inserts a file transfer action into the current macro screen during recording.
 void insertXfer(int argDirection, java.lang.String argHostFile, java.lang.String argPCFile, java.lang.String argOptions, boolean argClear, int argTimeout, java.lang.String argPCCodePage, java.lang.String argHostOrient, java.lang.String argPCOrient, java.lang.String argPCFType, java.lang.String argLamAlefExpan, java.lang.String argLamAlefComp, java.lang.String argSymSwap, java.lang.String argNumerals, java.lang.String argRoundTrip, int argMTUSize)
          Inserts a file transfer action into the current macro screen during recording.
 boolean isEmpty()
          Returns a flag that indicates if a macro is currently loaded.
 boolean isFinalScreenBoundary()
          Deprecated.  
 boolean isInitialPrompt()
          Returns the flag that controls whether Macro prescans for prompts.
 boolean isInitialScreenBoundary()
          Deprecated.  
 boolean isRecordUI()
          Returns whether the Macro will record user interface events on the Terminal bean.
 boolean isSkipNullPrompts()
          Returns whether the Macro will skip prompt action that don't have values instead of stopping and firing and error event.
 void linkScreens(java.lang.String screenName, java.lang.String nextScreenName)
          Links valid MacroNextScreens to a given Screen in the macro.
 void linkScreens(java.lang.String screenName, java.lang.String nextScreenName, int timeout)
          Links valid MacroNextScreens to a given Screen in the macro.
 void pause()
          Pauses recording or playing the macro.
 void play()
          Plays the current macro.
 void play(java.lang.String screenName)
          Plays the current macro starting with the given screen.
 void play(java.lang.String screenName, int actionIndex)
          Plays the current macro starting with the given screen and action.
 void record()
          Starts recording a macro, or resumes recording if the Macro is in STATE_RECORD_PAUSED.
 void record(boolean append)
          Starts recording a macro, or resumes recording if the Macro is in STATE_RECORD_PAUSED.
 void removeMacroCustomActionListener(MacroCustomActionListener listener)
          Removes the given MacroCustomActionListener from the macro.
 void removeMacroDebugListener(MacroDebugListener listener)
          Removes the given MacroDebugListener from the macro.
 void removeMacroExtractCoordListener(MacroExtractCoordListener listener)
          Removes the given MacroExtractCoordListener from the macro.
 void removeMacroLoopListener(MacroLoopListener listener)
          Removes the given MacroLoopListener from the macro.
 void removeMacroParseListener(MacroParseListener listener)
          Removes the given MacroParseListener from the macro.
 void removeMacroRuntimeListener(MacroRuntimeListener listener)
          Removes the given MacroRuntimeListener from the macro.
 void removeMacroTickTockListener(MacroTickTockListener listener)
          Removes the given MacroTickTockListener from the macro.
 void setCurrentScreenName(java.lang.String name)
          Sets the name of the current screen during recording.
 void setCurrentScreenTransient(boolean val)
          Sets the current screen in recording to transient.
 void setCurrentStartScreen(boolean val)
          Deprecated.  
 void setCurrentStopScreen(boolean val)
          Deprecated.  
 void setCustomRecoListener(com.ibm.eNetwork.ECL.screenreco.event.ECLCustomRecoListener listener, java.lang.String id)
          Registers a custom recognition listener with a given ID.
 void setFinalScreenBoundary(boolean flag)
          Deprecated.  
 void setInitialPrompt(boolean flag)
          Sets the flag that controls whether Macro prescans for prompts.
 void setInitialScreenBoundary(boolean flag)
          Deprecated.  
 void setMacro(java.io.BufferedReader macReader)
          Sets the current macro from a buffered reader.
 void setMacro(java.io.InputStream strm)
          Sets the current macro from an input stream.
 void setMacro(java.lang.String str)
          Sets the current macro from a string.
 void setMacroArray(java.lang.String[] strArray)
          Sets the current macro from a string array.
 void setMacroAuthor(java.lang.String author)
          Sets the author of the macro.
 void setMacroDate(java.lang.String date)
          Sets the creation date of the macro.
 void setMacroDescription(java.lang.String desc)
          Sets the description of the macro.
 void setMacroIOProvider(MacroIOProvider macIO)
          Sets MacroIOProvider.
 void setMacroName(java.lang.String name)
          Sets the name of the macro.
 void setMacroPrinterDriver(MacroPrinterDriver mpd)
          Sets a printer that can be used while playing the macro.
 void setParsedMacro(MacroScreens argMS)
          Sets the current macro from a MacroScreens object.
 void setPauseTime(int wt)
          Sets the pause value for the macro.
 void setPrompts(MacroPrompts p)
          Sets the prompts after a MacroPromptEvent has been handled.
 void setPSEventType(int val)
          Sets the type of Presentation Space (PS) event that the Macro bean monitors for screen matching.
 void setRecordUI(boolean newVal)
          Sets whether the Macro will record user interface events on the Terminal bean.
 void setScreenTimeout(int timeout)
          Sets the timeout value for any next screens specified in the current screen.
 void setScreenTimeout(java.lang.String name, int timeout)
          Sets the timeout value for any next screens specified in the screen with the given name.
 void setSkipNullPrompts(boolean argSkip)
          Sets whether the Macro will skip prompt action that don't have values instead of stopping and firing and error event.
 void setStandardTimeout(int wt)
          Sets the standard timeout value for the macro.
 void setUnrecordedText(java.lang.String text)
          Puts text into the presentation space during recording without recording the keystrokes.
 void setUnrecordedText(java.lang.String text, int row, int col)
          Puts text into the presentation space during recording without recording the keystrokes.
 void stop()
          Stops recording or playing the macro.
 java.lang.String toString()
          Returns the current macro as a string.
 
Methods inherited from class com.ibm.eNetwork.beans.HOD.HODBean
addPropertyChangeListener, addTraceListener, addVetoableChangeListener, getComponent, getFunction, getProperties, getTraceLevel, getTraceName, propertyChange, readExternal, removePropertyChangeListener, removeTraceListener, removeVetoableChangeListener, setProperties, setTraceLevel, writeExternal
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.ibm.eNetwork.beans.HOD.event.SendKeyListener
sendKeys
 
Methods inherited from interface com.ibm.eNetwork.beans.HOD.event.CommListener
CommEvent
 
Methods inherited from interface com.ibm.eNetwork.beans.HOD.event.ScreenMouseListener
mouseEvent
 

Field Detail

NAME

public static final java.lang.String NAME
Name property keyword.

DESCRIPTION

public static final java.lang.String DESCRIPTION
Description property keyword.

AUTHOR

public static final java.lang.String AUTHOR
Author property keyword.

DATE

public static final java.lang.String DATE
Date property keyword.

STANDARD_TIMEOUT

public static final java.lang.String STANDARD_TIMEOUT
StandardTimeout property keyword.

PAUSE_TIME

public static final java.lang.String PAUSE_TIME
PauseTime property keyword.

INITIAL_PROMPT

public static final java.lang.String INITIAL_PROMPT
InitialPrompt property keyword.

RECORD_UI

public static final java.lang.String RECORD_UI
RecordUI property keyword.

STATE

public static final java.lang.String STATE
State property keyword.

INITIAL_SCREEN_BOUNDARY

public static final java.lang.String INITIAL_SCREEN_BOUNDARY
InitialScreenBoundary property keyword.

FINAL_SCREEN_BOUNDARY

public static final java.lang.String FINAL_SCREEN_BOUNDARY
FinalScreenBoundary property keyword.

EMPTY

public static final java.lang.String EMPTY
Empty property keyword.

STATE_STOPPED

public static final int STATE_STOPPED
State property value. Macro is stopped. A macro is loaded and ready but is not playing or recording.

STATE_PLAYING

public static final int STATE_PLAYING
State property value. Macro is playing.

STATE_RECORDING

public static final int STATE_RECORDING
State property value. Macro is recording.

STATE_PLAY_PAUSED

public static final int STATE_PLAY_PAUSED
State property value. Macro is playing, but is currently paused.

STATE_RECORD_PAUSED

public static final int STATE_RECORD_PAUSED
State property value. Macro is recording, but currently paused. In this state keystrokes entered on the screen are not recorded or added to the macro.

STATE_EMPTY

public static final int STATE_EMPTY
State property value. Macro bean is initialized and connected to a session, but there is no macro source code loaded.

STATE_DISCONNECTED

public static final int STATE_DISCONNECTED
State property value. Macro is not currently connected to a session. Recording and playing cannot be done in this state.

STATE_PLAY_ERROR

public static final int STATE_PLAY_ERROR
State property value. Macro is stopped due to an error during playback. This is the same as STATE_STOPPED with the added information that the most recent play command failed to complete.

STATE_RECORD_ERROR

public static final int STATE_RECORD_ERROR
State property value. Macro is stopped due to an error during recording. This is the same as STATE_STOPPED with the added information that the most recent record command failed to complete.

STATE_INTERNAL_ERROR

public static final int STATE_INTERNAL_ERROR
State property value. Macro is stopped due to an internal error. This state is treated the same as STATE_STOPPED.

STATE_USER_ERROR

public static final int STATE_USER_ERROR
State property value. Macro has encountered a user error. Errors occur when invalid data is passed on a Macro method invocation. This state is treated the same as STATE_STOPPED.

CAPTURE_TOP

public static final int CAPTURE_TOP
Use with the insertScreenDesc method to capture the top row(s) of the current screen.
See Also:
insertScreenDesc(int, int)

CAPTURE_BOTTOM

public static final int CAPTURE_BOTTOM
Use with the insertScreenDesc method to capture the bottom row(s) of the current screen.
See Also:
insertScreenDesc(int, int)

EID_M_INTERNAL_ERR

public static final int EID_M_INTERNAL_ERR
Macro has encountered an internal error

EID_INVALID_PARM

public static final int EID_INVALID_PARM
User supplied an invalid parameter

EID_M_MISSING_SD

public static final int EID_M_MISSING_SD
Missing screen descriptor

EID_M_INVALID_NS

public static final int EID_M_INVALID_NS
Invalid next screen

EID_M_TIMED_OUT

public static final int EID_M_TIMED_OUT
Macro timed out

EID_M_RECO_LIMIT_NOGOTO

public static final int EID_M_RECO_LIMIT_NOGOTO
reco limit reached without a next screen specified

EID_M_RECO_LIMIT_GOTO_NOTFOUND

public static final int EID_M_RECO_LIMIT_GOTO_NOTFOUND
reco limit reached and the goto screen not found

EID_MACRO_COMMWAIT_FALSE

public static final int EID_MACRO_COMMWAIT_FALSE
macro COMMWAIT was false

EID_MACRO_PROMPT_ERR

public static final int EID_MACRO_PROMPT_ERR
Macro has encountered an prompt error

EID_M_CONNECTION_DOWN

public static final int EID_M_CONNECTION_DOWN
macro experienced a dropped connected
Constructor Detail

Macro

public Macro()
Macro Bean null constructor. This constructor uses the default values for all properties.

Macro

public Macro(java.util.Properties p)
      throws java.beans.PropertyVetoException
Constructor which takes a Properties object containing the initial property settings. Any properties which are not specified in the Properties object are initialized to their default values.
Parameters:
p - the new Properties for the Macro Bean.
Throws:
java.beans.PropertyVetoException - Fired if an invalid property value is given.
Method Detail

dispose

public void dispose()
Cleans up Macro's base environment and working storage.
Overrides:
dispose in class HODBean

setUnrecordedText

public void setUnrecordedText(java.lang.String text,
                              int row,
                              int col)
                       throws MacroException
Puts text into the presentation space during recording without recording the keystrokes. Host action keys ([enter], [clear], and so forth) are translated.

Virtual row/column positioning is legal with this method. That is, it is allowable to pass negative numbers in the row and col parameters. If values are negative, the text will be placed appropriately from the bottom of the screen (example, row = -2, places the text on the 2nd to the last row on the screen). Negative numbers greater than the screen size will wrap back to the bottom.

Parameters:
text - Text to be written to the PS
row - Row where text is to be written. Passing 0 will cause an exception.
col - Column where text is to be written. Passing 0 will cause an exception.
Throws:
MacroException - thrown if a parameter is passed that is not valid or if Macro experiences an internal error.

setUnrecordedText

public void setUnrecordedText(java.lang.String text)
                       throws MacroException
Puts text into the presentation space during recording without recording the keystrokes. Text is placed at the current cursor position. Host action keys ([enter], [clear], and so forth.) are translated.
Parameters:
text - Text to be written to the PS
Throws:
MacroException - thrown if a parameter is passed that is not valid or if Macro experiences an internal error.

setCustomRecoListener

public void setCustomRecoListener(com.ibm.eNetwork.ECL.screenreco.event.ECLCustomRecoListener listener,
                                  java.lang.String id)
                           throws MacroException
Registers a custom recognition listener with a given ID. Custom recognition listeners can extend the basic ECLScreenDesc recognition functionality. This is different from the AddCustom methods because it doesn't add a descriptor to the ECLScreenDesc object, it registers a listener.
Parameters:
listener - listener that is called for recognition
id - unique identifier for recognition
Throws:
MacroException - thrown if a parameter is passed that is not valid or if Macro experiences an internal error.
See Also:
ECLCustomRecoListener, ECLCustomRecoEvent

addMacroRuntimeListener

public void addMacroRuntimeListener(MacroRuntimeListener listener)
                             throws MacroException
Adds the given MacroRuntimeListener to the macro.
Parameters:
listener - The MacroRuntimeListener to be added
Throws:
MacroException - thrown if a parameter is passed that is not valid or if Macro experiences an internal error.
See Also:
removeMacroRuntimeListener(com.ibm.eNetwork.beans.HOD.event.MacroRuntimeListener)

removeMacroRuntimeListener

public void removeMacroRuntimeListener(MacroRuntimeListener listener)
                                throws MacroException
Removes the given MacroRuntimeListener from the macro.
Parameters:
listener - The MacroRuntimeListener to be removed
Throws:
MacroException - thrown if a parameter is passed that is not valid or if Macro experiences an internal error.
See Also:
addMacroRuntimeListener(com.ibm.eNetwork.beans.HOD.event.MacroRuntimeListener)

addMacroTickTockListener

public void addMacroTickTockListener(MacroTickTockListener listener)
                              throws MacroException
Adds the given MacroTickTockListener to the macro.
Parameters:
listener - The MacroTickTockListener to be added
Throws:
MacroException - thrown if a parameter is passed that is not valid or if Macro experiences an internal error.
See Also:
removeMacroTickTockListener(com.ibm.eNetwork.beans.HOD.event.MacroTickTockListener)

removeMacroTickTockListener

public void removeMacroTickTockListener(MacroTickTockListener listener)
                                 throws MacroException
Removes the given MacroTickTockListener from the macro.
Parameters:
listener - The MacroTickTockListener to be removed
Throws:
MacroException - thrown if a parameter is passed that is not valid or if Macro experiences an internal error.
See Also:
addMacroTickTockListener(com.ibm.eNetwork.beans.HOD.event.MacroTickTockListener)

addMacroExtractCoordListener

public void addMacroExtractCoordListener(MacroExtractCoordListener listener)
                                  throws MacroException
Adds the given MacroExtractCoordListener to the macro.
Parameters:
listener - The MacroExtractCoordListener to be added
Throws:
MacroException - thrown if a parameter is passed that is not valid or if Macro experiences an internal error.
See Also:
removeMacroExtractCoordListener(com.ibm.eNetwork.beans.HOD.event.MacroExtractCoordListener)

removeMacroExtractCoordListener

public void removeMacroExtractCoordListener(MacroExtractCoordListener listener)
                                     throws MacroException
Removes the given MacroExtractCoordListener from the macro.
Parameters:
listener - The MacroExtractCoordListener to be removed
Throws:
MacroException - thrown if a parameter is passed that is not valid or if Macro experiences an internal error.
See Also:
addMacroExtractCoordListener(com.ibm.eNetwork.beans.HOD.event.MacroExtractCoordListener)

addMacroLoopListener

public void addMacroLoopListener(MacroLoopListener listener)
                          throws MacroException
Adds the given MacroLoopListener to the macro.
Parameters:
listener - The MacroLoopListener to be added
Throws:
MacroException - thrown if a parameter is passed that is not valid or if Macro experiences an internal error.
See Also:
removeMacroLoopListener(com.ibm.eNetwork.beans.HOD.event.MacroLoopListener)

removeMacroLoopListener

public void removeMacroLoopListener(MacroLoopListener listener)
                             throws MacroException
Removes the given MacroLoopListener from the macro.
Parameters:
listener - The MacroLoopListener to be removed
Throws:
MacroException - thrown if a parameter is passed that is not valid or if Macro experiences an internal error.
See Also:
addMacroLoopListener(com.ibm.eNetwork.beans.HOD.event.MacroLoopListener)

addMacroParseListener

public void addMacroParseListener(MacroParseListener listener)
                           throws MacroException
Adds the given MacroParseListener to the macro.
Parameters:
listener - The MacroParseListener to be added
Throws:
MacroException - thrown if a parameter is passed that is not valid or if Macro experiences an internal error.
See Also:
removeMacroParseListener(com.ibm.eNetwork.beans.HOD.event.MacroParseListener)

removeMacroParseListener

public void removeMacroParseListener(MacroParseListener listener)
                              throws MacroException
Removes the given MacroParseListener from the macro.
Parameters:
listener - The MacroParseListener to be removed
Throws:
MacroException - thrown if a parameter is passed that is not valid or if Macro experiences an internal error.
See Also:
addMacroParseListener(com.ibm.eNetwork.beans.HOD.event.MacroParseListener)

addMacroCustomActionListener

public void addMacroCustomActionListener(MacroCustomActionListener listener)
                                  throws MacroException
Adds the given MacroCustomActionListener to the macro.
Parameters:
listener - The MacroCustomActionListener to be added
Throws:
MacroException - thrown if a parameter is passed that is not valid or if Macro experiences an internal error.
See Also:
removeMacroCustomActionListener(com.ibm.eNetwork.beans.HOD.event.MacroCustomActionListener)

removeMacroCustomActionListener

public void removeMacroCustomActionListener(MacroCustomActionListener listener)
                                     throws MacroException
Removes the given MacroCustomActionListener from the macro.
Parameters:
listener - The MacroCustomActionListener to be removed
Throws:
MacroException - thrown if a parameter is passed that is not valid or if Macro experiences an internal error.
See Also:
addMacroCustomActionListener(com.ibm.eNetwork.beans.HOD.event.MacroCustomActionListener)

addMacroDebugListener

public void addMacroDebugListener(MacroDebugListener listener)
                           throws MacroException
Adds the given MacroDebugListener to the macro.
Parameters:
listener - The MacroDebugListener to be added
Throws:
MacroException - thrown if a parameter is passed that is not valid or if Macro experiences an internal error.
See Also:
removeMacroDebugListener(com.ibm.eNetwork.beans.HOD.event.MacroDebugListener)

removeMacroDebugListener

public void removeMacroDebugListener(MacroDebugListener listener)
                              throws MacroException
Removes the given MacroDebugListener from the macro.
Parameters:
listener - The MacroDebugListener to be removed
Throws:
MacroException - thrown if a parameter is passed that is not valid or if Macro experiences an internal error.
See Also:
addMacroDebugListener(com.ibm.eNetwork.beans.HOD.event.MacroDebugListener)

setMacroName

public void setMacroName(java.lang.String name)
                  throws java.beans.PropertyVetoException
Sets the name of the macro.
Parameters:
Name - String containing the new name for the macro.
Throws:
java.beans.PropertyVetoException - Thrown if an invalid property value is given.

getMacroName

public java.lang.String getMacroName()
Returns the name of the macro.

setMacroDescription

public void setMacroDescription(java.lang.String desc)
                         throws java.beans.PropertyVetoException
Sets the description of the macro.
Parameters:
desc - String containing the new description of the macro.
Throws:
java.beans.PropertyVetoException - Thrown if an invalid property value is given.

getMacroDescription

public java.lang.String getMacroDescription()
Returns the description of the macro.

setMacroAuthor

public void setMacroAuthor(java.lang.String author)
                    throws java.beans.PropertyVetoException
Sets the author of the macro.
Parameters:
author - String containing the new author of the macro.
Throws:
java.beans.PropertyVetoException - Thrown if an invalid property value is given.

getMacroAuthor

public java.lang.String getMacroAuthor()
Returns the author of the macro.

setMacroDate

public void setMacroDate(java.lang.String date)
                  throws java.beans.PropertyVetoException
Sets the creation date of the macro.
Parameters:
date - String containing the new date of the macro.
Throws:
java.beans.PropertyVetoException - Thrown if an invalid property value is given.

getMacroDate

public java.lang.String getMacroDate()
Returns the date of the macro.

setInitialPrompt

public void setInitialPrompt(boolean flag)
                      throws java.beans.PropertyVetoException
Sets the flag that controls whether Macro prescans for prompts. When set to true, a single prompt event is generated when the macro starts and obtains the value for all prompts in the macro. When set to false, prompt events are generated for each prompt as they are encountered during macro playback.
Parameters:
Prompt - If true, generates one prompt event during prescan. If false, generates prompt events for each prompt in the macro.
Throws:
java.beans.PropertyVetoException - Thrown if an invalid property value is given.
See Also:
isInitialPrompt()

isInitialPrompt

public boolean isInitialPrompt()
Returns the flag that controls whether Macro prescans for prompts.
See Also:
setInitialPrompt(boolean)

setSkipNullPrompts

public void setSkipNullPrompts(boolean argSkip)
Sets whether the Macro will skip prompt action that don't have values instead of stopping and firing and error event.
Parameters:
argSkip - if true, the null prompt values will be ignored

isSkipNullPrompts

public boolean isSkipNullPrompts()
Returns whether the Macro will skip prompt action that don't have values instead of stopping and firing and error event.
Returns:
if true, the null prompt values will be ignored

setPSEventType

public void setPSEventType(int val)
Sets the type of Presentation Space (PS) event that the Macro bean monitors for screen matching. The valid values come from the ECLPS object and are ECLPS.USER_EVENTS, ECLPS.HOST_EVENTS, and ECLPS.ALL_EVENTS.

User events are generated by user actions like typing or moving the mouse. Host events are generated by the host system sending data to the Terminal or Session bean.

The default is ECLPS.HOST_EVENTS

See Also:
getPSEventType()

getPSEventType

public int getPSEventType()
Returns the type of Presentation Space (PS) event that the Macro bean monitors for screen matching.
See Also:
setPSEventType(int)

setRecordUI

public void setRecordUI(boolean newVal)
                 throws java.beans.PropertyVetoException
Sets whether the Macro will record user interface events on the Terminal bean. These are events like mouse clicks and box selection. The default is for Macro to not record UI events.

Note: if this property is set to true, cursor position will not be automatically recorded in the screen descriptions. This happens because the Macro bean is unable to reliably determine the place of the cursor when mouse clicks move the cursor.

Parameters:
newVal - if true, UI events will be recorded.
Throws:
java.beans.PropertyVetoException - Thrown if one of the VetoableChangeListeners rejects the change.

isRecordUI

public boolean isRecordUI()
Returns whether the Macro will record user interface events on the Terminal bean. These are events like mouse clicks and box selection. The default is for Macro to not record UI events.
Returns:
if true, UI events will be recorded.

isEmpty

public boolean isEmpty()
Returns a flag that indicates if a macro is currently loaded. This can usually be derived from the state, but some states can occur with or without a macro loaded (for example, STATE_DISCONNECTED).
See Also:
getState()

setStandardTimeout

public void setStandardTimeout(int wt)
                        throws java.beans.PropertyVetoException
Sets the standard timeout value for the macro. Given in milliseconds.
Parameters:
Timeout - Timeout value in milliseconds.
Throws:
java.beans.PropertyVetoException - Thrown if an invalid property value is given.
See Also:
getStandardTimeout()

getStandardTimeout

public int getStandardTimeout()
Returns the standard timeout value for the macro. Return time is in milliseconds.
See Also:
setStandardTimeout(int)

setPauseTime

public void setPauseTime(int wt)
                  throws java.beans.PropertyVetoException
Sets the pause value for the macro. This value can be used to adjust the time it takes for a new screen to appear in the Presentation Space.
Parameters:
Time - Delay time in milliseconds.
Throws:
java.beans.PropertyVetoException - Thrown if an invalid property value is given.
See Also:
getPauseTime()

getPauseTime

public int getPauseTime()
Returns the pause value for the macro. This value can be used to adjust the time it takes for a new screen to appear in the Presentation Space.
See Also:
setPauseTime(int)

getState

public int getState()
Returns current state of the currently playing/active Macro Bean. If the macro is not playing or paused from playing, the currently playing Macro Bean is this macro itself.

isInitialScreenBoundary

public boolean isInitialScreenBoundary()
Deprecated.  

Returns whether a screen boundary is inserted at the start of the macro source code. In HOD Version 4.0 and later, this property is ignored because of the screen state model that Version 4.0 has adopted.
See Also:
setInitialScreenBoundary(boolean)

setInitialScreenBoundary

public void setInitialScreenBoundary(boolean flag)
                              throws java.beans.PropertyVetoException
Deprecated.  

Sets whether a screen boundary is inserted at the start of the macro source code. In HOD Version 4.0 and later, this property is ignored because of the screen state model that Version 4.0 has adopted.
Throws:
java.beans.PropertyVetoException - Thrown if an invalid property value is given.
See Also:
isInitialScreenBoundary()

isFinalScreenBoundary

public boolean isFinalScreenBoundary()
Deprecated.  

Returns whether a screen boundary is inserted at the end of the macro source code. In HOD Version 4.0 and later, this property is ignored because of the screen state model that Version 4.0 has adopted.
See Also:
setFinalScreenBoundary(boolean)

setFinalScreenBoundary

public void setFinalScreenBoundary(boolean flag)
                            throws java.beans.PropertyVetoException
Deprecated.  

Sets whether a screen boundary is inserted at the end of the macro source code. In HOD Version 4.0 and later, this property is ignored because of the screen state model that Version 4.0 has adopted.
Throws:
java.beans.PropertyVetoException - Thrown if an invalid property value is given.
See Also:
isFinalScreenBoundary()

toString

public java.lang.String toString()
Returns the current macro as a string.
Overrides:
toString in class HODBean
Returns:
XML string representation of the macro contained in the Macro bean

clone

public java.lang.Object clone()
Returns a new instance of Macro with the same properties as the current Macro.
Overrides:
clone in class HODBean
Returns:
copy of the current Macro bean object

clear

public void clear()
Clears the current macro from the Macro bean. If successful, a STATE_EMPTY event will be generated.

stop

public void stop()
Stops recording or playing the macro. If not playing or recording, the method does nothing.

record

public void record()
Starts recording a macro, or resumes recording if the Macro is in STATE_RECORD_PAUSED. This method will always append a new screen to the macro. If not stopped or record paused, the method does nothing.

Note: when record is called, a new screen will be created automatically. The name for this screen will be generated automatically also. If you wish to change the name of the screen, just call beginScreen with the new name and the automatically generated screen will be discarded.

See Also:
record()

record

public void record(boolean append)
Starts recording a macro, or resumes recording if the Macro is in STATE_RECORD_PAUSED. If not stopped or record paused, the method does nothing.

Note: when record is called, a new screen will be created automatically. The name for this screen will be generated automatically also. If you wish to change the name of the screen, just call beginScreen with the new name and the automatically generated screen will be discarded.

Parameters:
append - if true, macro will not be cleared
See Also:
record()

pause

public void pause()
Pauses recording or playing the macro. If not playing or recording, this method does nothing. If the macro is being played, it executes any actions for the current screen before pausing. The call itself returns immediately and does not wait for the macro to pause.

play

public void play(java.lang.String screenName)
          throws MacroException
Plays the current macro starting with the given screen. If the screen is not in the macro a MacroException will be thrown.
Parameters:
java.lang.String - screenName name of MacroScreen object to start playing with
Throws:
MacroException - thrown if a parameter is passed that is not valid or if Macro experiences an internal error.

play

public void play(java.lang.String screenName,
                 int actionIndex)
          throws MacroException
Plays the current macro starting with the given screen and action. If the screen is not in the macro or the action is not in the screen a MacroException will be thrown.
Parameters:
java.lang.String - screenName name of MacroScreen object to start playing with
MacroAction - actionIndex index of MacroAction object to start playing with
Throws:
MacroException - thrown if a parameter is passed that is not valid or if Macro experiences an internal error.

play

public void play()
Plays the current macro. If not stopped or play paused, this method does nothing.

insertScreenDesc

public void insertScreenDesc(boolean useNumFields,
                             boolean useNumInputFields,
                             java.lang.String keyword,
                             java.lang.String timeOut)
                      throws MacroException
Deprecated.  

Inserts a new Smart Wait sequence into the current macro. Must be in STATE_RECORDING to perform this. When this method is called, the Macro bean will retrieve the necessary data from the Presentation Space.

Warning: this will clear all the descriptors in the current screen added by any Macro.insertSD* calls.

Parameters:
useNumFields - Use the number of fields in the PS to describe the screen.
useNumInputFields - Use the number of input fields in the PS to describe the screen.
keyword - Use a keyword to describe the screen. Pass null if you don't want to use a keyword.
timeOut - Time out value for wait. Pass 0 for indefinite wait.
Throws:
MacroException - thrown if a parameter is passed that is not valid or if Macro experiences an internal error.
See Also:
insertScreenDesc(boolean, boolean, boolean, boolean), insertScreenDesc(int, int), insertScreenDesc(int, int, int, int)

insertOIAWait

public void insertOIAWait()
Deprecated.  

Inserts a standard OIA wait into the current macro. The macro will wait for the OIA to be "input not inhibited" when it encounters the line during runtime. In HOD Version 4.0 and later, this function is non-operational. OIA waits are no longer an individual action. OIA is observed as part of the screen description.

insertConnectionWait

public void insertConnectionWait(int waitType,
                                 int timeOut)
Deprecated.  

Inserts a waitForConnection statement into the current macro. In HOD version 4.0 and later, this function is non-operational. Connection waiting is not needed in the screen state model that Version 4.0 has adopted.
Parameters:
waitType - type of connection event to wait for. These types are defined in ECLConnection (example, ECLConnection.CONNECTION_INIT), and are mutually exclusive for the method. That is, you may not OR values together.
timeOut - Time out value for wait. Pass 0 for indefinite wait.
See Also:
ECLConnection

beginScreen

public void beginScreen(java.lang.String name,
                        int recoLimit,
                        boolean startScreen,
                        boolean stopScreen)
                 throws MacroException
Deprecated.  

Starts a new screen element in the currently recording macro. Note: you must call endScreen if there is a screen pending. If you don't, the current screen will be lost.
Parameters:
name - name for the screen to add
recolimit - recognition limit for the screen (0 if no limit). See macro syntax guide for details.
startScreen - if true, this screen is the initial screen for the macro.
stopScreen - if true, this screen is one of the final screens for the macro.
Throws:
MacroException - thrown if a parameter is passed that is not valid or if Macro experiences an internal error.
See Also:
endScreen()

setCurrentScreenTransient

public void setCurrentScreenTransient(boolean val)
                               throws MacroException
Sets the current screen in recording to transient. Transient screens exist outside the normal macro flow and are registered at all times. Use transient screens for unexpected, "throw away" screens.
Parameters:
val - if true, screen will be set to transient
Throws:
MacroException - thrown if a parameter is passed that is not valid or if Macro experiences an internal error.

setCurrentStartScreen

public void setCurrentStartScreen(boolean val)
                           throws MacroException
Deprecated.  

Sets the startscreen attribute of the currently recording screen to the given value. See Macro syntax document for description of the start screen attribute.
Parameters:
val - if true, screen will be a start screen.
Throws:
MacroException - thrown if a parameter is passed that is not valid or if Macro experiences an internal error.

setCurrentStopScreen

public void setCurrentStopScreen(boolean val)
                          throws MacroException
Deprecated.  

Sets the stopscreen attribute of the currently recording screen to the given value. See Macro syntax document for description of the stop screen attribute.
Parameters:
val - if true, screen will be a stop screen.
Throws:
MacroException - thrown if a parameter is passed that is not valid or if Macro experiences an internal error.

setCurrentScreenName

public void setCurrentScreenName(java.lang.String name)
                          throws MacroException
Sets the name of the current screen during recording.
Parameters:
name - new name for the screen within the macro.
Throws:
MacroException - thrown if a parameter is passed that is not valid or if Macro experiences an internal error.

endScreen

public void endScreen()
Deprecated.  

Wraps up and saves the current macro screen in recording. Call this after you have called beginScreen and added all the actions, descriptions, and next screens to the screen that you want.
See Also:
beginScreen(java.lang.String, int, boolean, boolean)

insertScreenDesc

public void insertScreenDesc(boolean useOIA,
                             boolean useCursor,
                             boolean useFields,
                             boolean useInputFields)
Inserts new screen description elements into the current macro screen. Must be in STATE_RECORDING to perform this. When this method is called, the Macro bean will retrieve the necessary data from the Presentation Space.

Warning: this will clear all the descriptors in the current screen added by any Macro.insertSD* calls.

Parameters:
useOIA - If true, OIA state must be uninhibited for screen to match
useCursor - If true, current cursor position will be captured
useNumFields - If true, current total field count will be captured
useNumInputFields - If true, current input field count will be captured

insertScreenDesc

public void insertScreenDesc(int textOrient,
                             int inset)
Inserts a new screen string description element into the current macro screen. Must be in STATE_RECORDING to perform this. When this method is called, the Macro bean will retrieve the necessary data from the Presentation Space.

Warning: this will clear all the descriptors in the current screen added by any Macro.insertSD* calls.

Parameters:
textOrient - orientation to capture the screen text
inset - number of rows from top or bottom to capture
See Also:
CAPTURE_TOP, CAPTURE_BOTTOM

insertScreenDesc

public void insertScreenDesc(int srow,
                             int scol,
                             int erow,
                             int ecol)
                      throws MacroException
Inserts a screen string description element into the current macro screen. Must be in STATE_RECORDING to perform this. When this method is called, the Macro bean will retrieve the necessary data from the Presentation Space. Macro will retrieve the text from a rectangular area as specified by the input parameters.
Parameters:
srow - upper left row
scol - upper left column
erow - lower right row
ecol - lower right column
Throws:
MacroException - thrown if a parameter is passed that is not valid or if Macro experiences an internal error.

insertSDString

public void insertSDString(java.lang.String text,
                           int row,
                           int col,
                           boolean caseSense,
                           boolean opt,
                           boolean invertReco)
                    throws MacroException
Inserts a string description element into the current screen based on the given parameters. The description element must appear on the host screen for the macro screen to match.

This version of insertSDString inserts a string description element that must appear at the exact row/column position given.

Note: if macro is not recording, this method will not insert a description element.

Parameters:
text - string that must appear on the screen
row - starting row position
col - ending column position
caseSense - if true, string comparison is case sensitive
opt - if true, element is optional. Optional elements introduce a pseudo-boolean OR capability. The recognition system will first compare all non-optional elements, which must all match. If the non-optional matches are successful, optional elements don't need to be considered. If there are no non-optional elements in a screen, at least one optional element must match.
invertReco - if true, recognition of the element will be inverted. This introduced a pseudo-boolean NOT capability. The match will be successful if the description element is not on the host screen.
Throws:
MacroException - thrown if a parameter is passed that is not valid or if Macro experiences an internal error.
See Also:
insertSDString(java.lang.String, int, int, int, int, boolean, boolean, boolean)

insertSDString

public void insertSDString(java.lang.String text,
                           int srow,
                           int scol,
                           int erow,
                           int ecol,
                           boolean caseSense,
                           boolean opt,
                           boolean invertReco)
                    throws MacroException
Inserts a string description element into the current screen based on the given parameters. The description element must appear on the host screen for the macro screen to match and its actions execute during playing.

This version of insertSDString inserts a string description element that must appear in the rectangle specified by the given parameters. Wrapping is not allowed.

Note: if macro is not recording, this method will not insert a description element.

Parameters:
text - string that must appear on the screen
srow - upper left row
scol - upper left column
erow - lower right row
ecol - lower right column
caseSense - if true, string comparison is case sensitive
opt - if true, element is optional. Optional elements introduce a pseudo-boolean OR capability. The recognition system will first compare all non-optional elements, which must all match. If the non-optional matches are successful, optional elements don't need to be considered. If there are no non-optional elements in a screen, at least one optional element must match.
invertReco - if true, recognition of the element will be inverted. This introduced a pseudo-boolean NOT capability. The match will be successful if the description element is not on the host screen.
Throws:
MacroException - thrown if a parameter is passed that is not valid or if Macro experiences an internal error.
See Also:
insertSDString(java.lang.String, int, int, boolean, boolean, boolean)

insertSDBlock

public void insertSDBlock(java.lang.String[] text,
                          int row,
                          int col,
                          boolean caseSense,
                          boolean opt,
                          boolean invertReco)
                   throws MacroException
Inserts a block description element into the current screen based on the given parameters. The description element must appear on the host screen for the macro screen to match.

This version of insertSDBlock inserts a string description element that must appear at the exact row/column position given.

Note: if macro is not recording, this method will not insert a description element.

Parameters:
text - strings that must appear on the screen
row - starting row position
col - ending column position
caseSense - if true, string comparison is case sensitive
opt - if true, element is optional. Optional elements introduce a pseudo-boolean OR capability. The recognition system will first compare all non-optional elements, which must all match. If the non-optional matches are successful, optional elements don't need to be considered. If there are no non-optional elements in a screen, at least one optional element must match.
invertReco - if true, recognition of the element will be inverted. This introduced a pseudo-boolean NOT capability. The match will be successful if the description element is not on the host screen.
Throws:
MacroException - thrown if a parameter is passed that is not valid or if Macro experiences an internal error.
See Also:
insertSDBlock(java.lang.String[], int, int, boolean, boolean, boolean)

insertSDBlock

public void insertSDBlock(java.lang.String[] text,
                          int srow,
                          int scol,
                          int erow,
                          int ecol,
                          boolean caseSense,
                          boolean opt,
                          boolean invertReco)
                   throws MacroException
Inserts a block description element into the current screen based on the given parameters. The description element must appear on the host screen for the macro screen to match and its actions execute during playing.

This version of insertSDBlock inserts a string description element that must appear in the rectangle specified by the given parameters. Wrapping is not allowed.

Note: if macro is not recording, this method will not insert a description element.

Parameters:
text - string that must appear on the screen
srow - upper left row
scol - upper left column
erow - lower right row
ecol - lower right column
caseSesnse - if true, string comparison is case sensitive
opt - if true, element is optional. Optional elements introduce a pseudo-boolean OR capability. The recognition system will first compare all non-optional elements, which must all match. If the non-optional matches are successful, optional elements don't need to be considered. If there are no non-optional elements in a screen, at least one optional element must match.
invertReco - if true, recognition of the element will be inverted. This introduced a pseudo-boolean NOT capability. The match will be successful if the description element is not on the host screen.
Throws:
MacroException - thrown if a parameter is passed that is not valid or if Macro experiences an internal error.
See Also:
insertSDBlock(java.lang.String[], int, int, boolean, boolean, boolean)

insertSDOIA

public void insertSDOIA(int oiatype,
                        boolean opt,
                        boolean invertReco)
                 throws MacroException
Inserts an OIA status description element into the current screen based on the given parameters. The description element must appear on the host screen for the macro screen to match and its actions execute during playing.

Using this method will cause the screen recognition system to monitor the host Operator Information Area (OIA) for the given status. Currently, the only two valid options are ECLSDOIA.OIA_INPUTINHIBITED, which will match only if it is possible to type on the host screen, and ECLSDOIA.OIA_DONTCARE, which ignores the OIA altogether. The default is to monitor for input not inhibited. To turn OIA monitoring off, call this method with the don't care setting.

Note: if macro is not recording, this method will not insert a description element.

Parameters:
oiatype - type of OIA status to wait for, must be ECLSDOIA.OIA_INPUTINHIBITED or ECLSDOIA.OIA_DONTCARE.
opt - if true, element is optional. Optional elements introduce a pseudo-boolean OR capability. The recognition system will first compare all non-optional elements, which must all match. If the non-optional matches are successful, optional elements don't need to be considered. If there are no non-optional elements in a screen, at least one optional element must match.
invertReco - if true, recognition of the element will be inverted. This introduced a pseudo-boolean NOT capability. The match will be successful if the description element is not on the host screen.
Throws:
MacroException - thrown if a parameter is passed that is not valid or if Macro experiences an internal error.

insertSDCursor

public void insertSDCursor(int row,
                           int col,
                           boolean opt,
                           boolean invertReco)
Inserts a cursor position description element into the current screen based on the given parameters. The description element must appear on the host screen for the macro screen to match and its actions execute during playing.

Using this method will cause the screen recognition system to match the cursor position on the host screen to the given parameters.

Note: if macro is not recording, this method will not insert a description element.

Parameters:
row - cursor row position
col - cursor column position
opt - if true, element is optional. Optional elements introduce a pseudo-boolean OR capability. The recognition system will first compare all non-optional elements, which must all match. If the non-optional matches are successful, optional elements don't need to be considered. If there are no non-optional elements in a screen, at least one optional element must match.
invertReco - if true, recognition of the element will be inverted. This introduced a pseudo-boolean NOT capability. The match will be successful if the description element is not on the host screen.

insertSDAttrib

public void insertSDAttrib(char attrib,
                           int row,
                           int col,
                           int plane,
                           boolean opt,
                           boolean invertReco)
                    throws MacroException
Inserts an attribute description element into the current screen based on the given parameters. The description element must appear on the host screen for the macro screen to match and its actions execute during playing.

Using this method will cause the screen recognition system to match the given attribute value against the attribute on the host screen. This is an advanced feature and should only be used if you are having trouble making a screen description truly unique. The attribute value must be one of the values specified in the IBM WebSphere Host Access Class Library (HACL) field attribute table in the reference appendix.

Note: if macro is not recording, this method will not insert a description element.

Parameters:
attrib - attribute value that must appear on the screen
row - starting row position
col - ending column position
plane - plane to search in, must be ECLConstants.FIELD_PLANE, ECLConstants.EXFIELD_PLANE, or ECLConstants.COLOR_PLANE
opt - if true, element is optional. Optional elements introduce a pseudo-boolean OR capability. The recognition system will first compare all non-optional elements, which must all match. If the non-optional matches are successful, optional elements don't need to be considered. If there are no non-optional elements in a screen, at least one optional element must match.
invertReco - if true, recognition of the element will be inverted. This introduced a pseudo-boolean NOT capability. The match will be successful if the description element is not on the host screen.
Throws:
MacroException - thrown if a parameter is passed that is not valid or if Macro experiences an internal error.

insertSDFields

public void insertSDFields(int num,
                           boolean opt,
                           boolean invertReco)
Inserts a field count description element into the current screen based on the given parameters. The description element must appear on the host screen for the macro screen to match and its actions execute during playing.

Using this method will cause the screen recognition system to match the total number of host screen fields to the value given.

Note: if macro is not recording, this method will not insert a description element.

Parameters:
num - field count to match
opt - if true, element is optional. Optional elements introduce a pseudo-boolean OR capability. The recognition system will first compare all non-optional elements, which must all match. If the non-optional matches are successful, optional elements don't need to be considered. If there are no non-optional elements in a screen, at least one optional element must match.
invertReco - if true, recognition of the element will be inverted. This introduced a pseudo-boolean NOT capability. The match will be successful if the description element is not on the host screen.

insertSDInputFields

public void insertSDInputFields(int num,
                                boolean opt,
                                boolean invertReco)
Inserts an input field count description element into the current screen based on the given parameters. The description element must appear on the host screen for the macro screen to match and its actions execute during playing.

Using this method will cause the screen recognition system to match the number of host screen input fields to the value given.

Note: if macro is not recording, this method will not insert a description element.

Parameters:
num - field count to match
opt - if true, element is optional. Optional elements introduce a pseudo-boolean OR capability. The recognition system will first compare all non-optional elements, which must all match. If the non-optional matches are successful, optional elements don't need to be considered. If there are no non-optional elements in a screen, at least one optional element must match.
invertReco - if true, recognition of the element will be inverted. This introduced a pseudo-boolean NOT capability. The match will be successful if the description element is not on the host screen.

insertSDCustom

public void insertSDCustom(com.ibm.eNetwork.ECL.screenreco.event.ECLCustomRecoListener listener,
                           java.lang.String id,
                           boolean opt)
                    throws MacroException
Inserts a custom description element into the current screen based on the given parameters. This is a special element where user code is called. It is up to the user code to examine the host screen and determine if it is a match. This gives the screen recognition system extensibility beyond its normal behavior. This is intended for advanced users only.

Note: if macro is not recording, this method will not insert a description element.

Parameters:
listener - object that implements the ECLCustomRecoListener interface. this object will be called with the ID parameter, whereby it should look at the host screen and determine a match by its own criteria. If there is a match, the object should return true.
id - identifier string used to differentiate between multiple custom recognition elements in a screen(s).
opt - if true, element is optional. Optional elements introduce a pseudo-boolean OR capability. The recognition system will first compare all non-optional elements, which must all match. If the non-optional matches are successful, optional elements don't need to be considered. If there are no non-optional elements in a screen, at least one optional element must match.
Throws:
MacroException - thrown if a parameter is passed that is not valid or if Macro experiences an internal error.
See Also:
ECLCustomRecoListener,

insertInput

public void insertInput(java.lang.String text,
                        boolean xlateAid,
                        boolean moveCursor)
                 throws MacroException
Inserts an input action into the current macro screen during recording. Input actions just place text on the screen and send host action keys like Enter or PF1. Refer to the HACL ECLConstants class for all the possible host action keys.

This version of insertInput places the text at the current cursor position.

Note: if macro is not recording, this method will not insert an action.

Parameters:
text - text to place on the host screen.
xlateAid - if true, host action keys embedded in the text parameter will be translated. See ECLConstants class for host action key values. For example, if xlateAid is False, the string "logon[enter]", is sent directly to the host session without being translated.
moveCursor - if true, cursor will move past the last character of the text placed on the screen.
Throws:
MacroException - thrown if a parameter is passed that is not valid or if Macro experiences an internal error.

insertInput

public void insertInput(java.lang.String text,
                        int row,
                        int col,
                        boolean xlateAid,
                        boolean moveCursor)
                 throws MacroException
Inserts an input action into the current macro screen during recording. Input actions just place text on the screen and send host action keys like enter or pf1. Refer to the HACL ECLConstants class for all the possible host action keys.

This version of insertInput places the text at the given cursor position.

Note: if macro is not recording, this method will not insert an action.

Parameters:
text - text to place on the host screen.
row - row position to place the text
col - column position to place the text
xlateAid - if true, host action keys embedded in the text parameter will be translated. See ECLConstants class for host action key values. Example, "logon[enter]", where [enter] is the host action key.
moveCursor - if true, cursor will move past the last character of the text placed on the screen.
Throws:
MacroException - thrown if a parameter is passed that is not valid or if Macro experiences an internal error.

insertMessage

public void insertMessage(java.lang.String msg,
                          java.lang.String title)
                   throws MacroException
Inserts a message action into the current macro screen during recording. Message actions cause the Macro bean to fire the message data to any MacroRuntimeListeners in a MacroMessageEvent. The listeners should then display this message to their users as they see fit. For example, the MacroManager bean will put up a message box. At runtime, the message events are handled synchronously.

Note: if macro is not recording, this method will not insert an action.

Parameters:
msg - actual text of the message to send to the user
title - title of the message
Throws:
MacroException - thrown if a parameter is passed that is not valid or if Macro experiences an internal error.

insertTrace

public void insertTrace(java.lang.String data,
                        int type)
                 throws MacroException
Inserts a trace action into the current macro screen during recording. Trace actions cause the trace data to go to one of three places: the trace facility of the bean, a user trace facility via the MacroRuntimeListener interface, or the command line.

Note: if macro is not recording, this method will not insert an action.

Parameters:
data - text of the trace
type - sets where the trace data will go. Must be MacroActionTrace.TRACE_BEANS, MacroActionTrace.TRACE_USER, or MacroActionTrace.TRACE_SYSOUT.
Throws:
MacroException - thrown if a parameter is passed that is not valid or if Macro experiences an internal error.

insertCustomAction

public void insertCustomAction(java.lang.String argID,
                               java.lang.String argsArgs)
                        throws MacroException
Inserts a custom action into the current macro screen during recording. Custom actions extend the action functionality of the Macro bean. When the Macro bean encounters a custom action during playback, it calls the MacroCustomActionListeners with the data for the actions. It is up to the custom listener to parse the arguments, if any, and run whatever the action may be.

Note: if macro is not recording, this method will not insert an action.

Parameters:
argID - identifier string used to differentiate between multiple custom action elements in a screen(s).
argArgs - arguments to pass to the custom action listener.
Throws:
MacroException - thrown if a parameter is passed that is not valid or if Macro experiences an internal error.

insertPrompt

public void insertPrompt(java.lang.String row,
                         java.lang.String col,
                         java.lang.String len,
                         java.lang.String name,
                         java.lang.String value,
                         boolean clearField)
                  throws MacroException
Deprecated.  

Inserts a user prompt sequence into the current macro. When the macro runs it will be scanned for all prompt lines. Each new prompt identifier will be loaded into an object of the MacroPrompts class. This object will then be fired in a MacroPromptEvent, whereby a listener should set all values in the MacroPrompts object. After the object is set, the listener should call setPrompts on Macro to play the macro after prescan. If a value was not set, and there is a value specified on the prompt line, that value will be used. If there is no value on the prompt line, another event will be fired to try to retrieve the prompt data. If still no data is returned, the macro will end in an error.

Note: if macro is not recording, this method will not insert an action.

Parameters:
row - Row in Presentation Space to place prompt
col - Column in Presentation Space to place prompt
len - Length of prompt. Use this to guard against skip fields.
name - Identifier of prompt. Multiple instances of the same identifier may appear in a macro.
value - Default value to use for this prompt line only. This value will be overridden by the value returned in the setPrompts call.
clearField - Clears the field that the prompt is placed in if true.
Throws:
MacroException - thrown if a parameter is passed that is not valid or if Macro experiences an internal error.
See Also:
MacroPrompts MacroPromptEvent
See Also:
insertPrompt(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, boolean, java.lang.String), setPrompts(com.ibm.eNetwork.beans.HOD.MacroPrompts)

insertPrompt

public void insertPrompt(java.lang.String row,
                         java.lang.String col,
                         java.lang.String len,
                         java.lang.String name,
                         java.lang.String value,
                         boolean clearField,
                         java.lang.String echoChar)
                  throws MacroException
Deprecated.  

Inserts a password user prompt sequence into the current macro. When the macro runs it will be scanned for all prompt lines. Each new prompt identifier will be loaded into an object of the MacroPrompts class. This object will then be fired in a MacroPromptEvent, whereby a listener should set all values in the MacroPrompts object. After the object is set, the listener should call setPrompts on Macro to play the macro after prescan. If a value was not set, and there is a value specified on the prompt line, that value will be used. If there is no value on the prompt line, another event will be fired to try to retrieve the prompt data. If still no data is returned, the macro will end in an error.

Note: if macro is not recording, this method will not insert an action.

Parameters:
row - Row in Presentation Space to place prompt
col - Column in Presentation Space to place prompt
len - Length of prompt. Use this to guard against skip fields.
name - Identifier of prompt. Multiple instances of the same identifier may appear in a macro.
value - Default value to use for this prompt line only. This value will be overridden by the value returned in the setPrompts call.
clearField - Clears the field that the prompt is placed in if true.
echoChar - Echo character for password. Currently, only '*' is used.
Throws:
MacroException - thrown if a parameter is passed that is not valid or if Macro experiences an internal error.
See Also:
MacroPrompts MacroPromptEvent
See Also:
insertPrompt(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, boolean), setPrompts(com.ibm.eNetwork.beans.HOD.MacroPrompts)

insertPrompt

public void insertPrompt(int row,
                         int col,
                         int len,
                         java.lang.String name,
                         java.lang.String value,
                         boolean clearField)
                  throws MacroException
Inserts a user prompt sequence into the current macro. When the macro runs it will be scanned for all prompt lines. Each new prompt identifier will be loaded into an object of the MacroPrompts class. This object will then be fired in a MacroPromptEvent, whereby a listener should set all values in the MacroPrompts object. After the object is set, the listener should call setPrompts on Macro to play the macro after prescan. If a value was not set, and there is a value specified on the prompt line, that value will be used. If there is no value on the prompt line, another event will be fired to try to retrieve the prompt data. If still no data is returned, the macro will end in an error.

Note: if macro is not recording, this method will not insert an action.

Parameters:
row - Row in Presentation Space to place prompt
col - Column in Presentation Space to place prompt
len - Length of prompt. Use this to guard against skip fields.
name - Identifier of prompt. Multiple instances of the same identifier may appear in a macro.
value - Default value to use for this prompt line only. This value will be overridden by the value returned in the setPrompts call.
clearField - Clears the field that the prompt is placed in if true.
See Also:
MacroPrompts MacroPromptEvent
Throws:
MacroException - thrown if a parameter is passed that is not valid or if Macro experiences an internal error.
See Also:
insertPrompt(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, boolean, java.lang.String), setPrompts(com.ibm.eNetwork.beans.HOD.MacroPrompts)

insertPrompt

public void insertPrompt(int row,
                         int col,
                         int len,
                         java.lang.String name,
                         java.lang.String value,
                         boolean clearField,
                         boolean encrypted,
                         boolean placeValue)
                  throws MacroException
Inserts a password user prompt sequence into the current macro. When the macro runs it will be scanned for all prompt lines. Each new prompt identifier will be loaded into an object of the MacroPrompts class. This object will then be fired in a MacroPromptEvent, whereby a listener should set all values in the MacroPrompts object. After the object is set, the listener should call setPrompts on Macro to play the macro after prescan. If a value was not set, and there is a value specified on the prompt line, that value will be used. If there is no value on the prompt line, another event will be fired to try to retrieve the prompt data. If still no data is returned, the macro will end in an error.

Note: if macro is not recording, this method will not insert an action.

Parameters:
row - Row in Presentation Space to place prompt
col - Column in Presentation Space to place prompt
len - Length of prompt. Use this to guard against skip fields.
name - Identifier of prompt. Multiple instances of the same identifier may appear in a macro.
value - Default value to use for this prompt line only. This value will be overridden by the value returned in the setPrompts call.
clearField - Clears the field that the prompt is placed in if true.
encrypted - Indicates that text for the prompt should be non-displayable.
placeValue - If true, the text in the value parameter will be placed in the Screen without the text being recorded.
See Also:
MacroPrompts MacroPromptEvent
Throws:
MacroException - thrown if a parameter is passed that is not valid or if Macro experiences an internal error.
See Also:
insertPrompt(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, boolean), setPrompts(com.ibm.eNetwork.beans.HOD.MacroPrompts)

setPrompts

public void setPrompts(MacroPrompts p)
                throws MacroException
Sets the prompts after a MacroPromptEvent has been handled. Use this method to return the prompt data to the Macro bean and continue playing the macro. See insertPrompt for a full discussion of Macro prompting.
See Also:
MacroPrompts MacroPromptEvent
Throws:
MacroException - thrown if a parameter is passed that is not valid or if Macro experiences an internal error.
See Also:
insertPrompt(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, boolean)

insertRunProgram

public void insertRunProgram(java.lang.String prog,
                             java.lang.String param,
                             boolean wait)
                      throws MacroException
Inserts a run program action into the current macro screen during recording. Run program actions tell the macro bean to launch the specified application.

Note: if macro is not recording, this method will not insert an action.

Parameters:
argProgram - program to execute
argParam - parameters with which to execute the program
argWait - if true, the macro will wait for the program to return before continuing to the next action

insertPause

public void insertPause(long argTimeout)
Inserts a pause action into the current macro screen during recording. Pause actions simply specify that the Macro bean should pause, or sleep, for the given milliseconds.

Note: if macro is not recording, this method will not insert an action.

Parameters:
argTimeout - time to pause in milliseconds, if less than or equal to 0, no pause will take place.

insertPlayMacro

public void insertPlayMacro(java.lang.String argMacName,
                            java.lang.String argScrName,
                            java.lang.String argXferVarType)
                     throws MacroException
Inserts a play macro action into the current macro screen during recording. Play Macro actions specifies a macro to chain. Using this method sets ID attribute to macro name by default

Note: if macro is not recording, this method will not insert an action.

Parameters:
argMacName - Name of Macro to chain
argScrName - Start screen name
argXferVarType - Whether to transfer variable from current macro to the next

insertXfer

public void insertXfer(int argDirection,
                       java.lang.String argHostFile,
                       java.lang.String argPCFile,
                       java.lang.String argOptions,
                       boolean argClear,
                       int argTimeout,
                       java.lang.String argPCCodePage,
                       java.lang.String argHostOrient,
                       java.lang.String argPCOrient,
                       java.lang.String argPCFType,
                       java.lang.String argLamAlefExpan,
                       java.lang.String argLamAlefComp)
                throws MacroException
Deprecated.  

Inserts a file transfer action into the current macro screen during recording. You must adhere to your host system's file transfer options for this action to be performed correctly.

Note: if macro is not recording, this method will not insert an action.

Parameters:
argDirection - direction to transfer, must be either MacroActionXfer.DIRECTION_SEND or MacroActionXfer.DIRECTION_RECEIVE
argHostFile - name of the host file to transfer
argPCFile - name of the PC file to transfer
argOptions - host transfer options (contact your host system administrator for valid file transfer options).
argClear - if true, clears the host screen before the transfer
argTimeout - timeout value for the file transfer to go into error.
argPCCodePage - PC code page to use in the transfer, the default is "037" (English).
argHostOrient - host system orientation used for BiDi systems only. It is OK for this parameter to be null.
argPCOrient - PC system orientation used for BiDi systems only. It is OK for this parameter to be null.
argPCFType - PC file type used for BiDi systems only. It is OK for this parameter to be null.
argLamAlefExpan - Lam Alef expansion option used for Arabic systems only. It is OK for this parameter to be null.
argLamAlefComp - Lam Alef compression option used for Arabic systems only. It is OK for this parameter to be null.
Throws:
MacroException - thrown if a parameter is passed that is not valid or if Macro experiences an internal error.
See Also:
insertXfer(int, java.lang.String, java.lang.String, java.lang.String, boolean, int, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String)

insertXfer

public void insertXfer(int argDirection,
                       java.lang.String argHostFile,
                       java.lang.String argPCFile,
                       java.lang.String argOptions,
                       boolean argClear,
                       int argTimeout,
                       java.lang.String argPCCodePage,
                       java.lang.String argHostOrient,
                       java.lang.String argPCOrient,
                       java.lang.String argPCFType,
                       java.lang.String argLamAlefExpan,
                       java.lang.String argLamAlefComp,
                       java.lang.String argSymSwap,
                       java.lang.String argNumerals,
                       java.lang.String argRoundTrip)
                throws MacroException
Inserts a file transfer action into the current macro screen during recording. You must adhere to your host system's file transfer options for this action to be performed correctly.

Note: if macro is not recording, this method will not insert an action.

Parameters:
argDirection - direction to transfer, must be either MacroActionXfer.DIRECTION_SEND or MacroActionXfer.DIRECTION_RECEIVE
argHostFile - name of the host file to transfer
argPCFile - name of the PC file to transfer
argOptions - host transfer options (contact your host system administrator for valid file transfer options).
argClear - if true, clears the host screen before the transfer
argTimeout - timeout value for the file transfer to go into error.
argPCCodePage - PC code page to use in the transfer, the default is "037" (English).
argHostOrient - host system orientation used for BiDi systems only. It is OK for this parameter to be null.
argPCOrient - PC system orientation used for BiDi systems only. It is OK for this parameter to be null.
argPCFType - PC file type used for BiDi systems only. It is OK for this parameter to be null.
argLamAlefExpan - Lam Alef expansion option used for Arabic systems only. It is OK for this parameter to be null.
argLamAlefComp - Lam Alef compression option used for Arabic systems only. It is OK for this parameter to be null.
argSymSwap - Symmetric Swapping used for BiDi systems only. It is OK for this parameter to be null.
argNumerals - Numerals Shaping option used for Arabic systems only. It is OK for this parameter to be null.
argRoundTrip - Round Trip option used for Arabic systems only. It is OK for this parameter to be null.
Throws:
MacroException - thrown if a parameter is passed that is not valid or if Macro experiences an internal error.
See Also:
insertXfer(int, java.lang.String, java.lang.String, java.lang.String, boolean, int, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String)

insertXfer

public void insertXfer(int argDirection,
                       java.lang.String argHostFile,
                       java.lang.String argPCFile,
                       java.lang.String argOptions,
                       boolean argClear,
                       int argTimeout,
                       java.lang.String argPCCodePage,
                       java.lang.String argHostOrient,
                       java.lang.String argPCOrient,
                       java.lang.String argPCFType,
                       java.lang.String argLamAlefExpan,
                       java.lang.String argLamAlefComp,
                       java.lang.String argSymSwap,
                       java.lang.String argNumerals,
                       java.lang.String argRoundTrip,
                       int argMTUSize)
                throws MacroException
Inserts a file transfer action into the current macro screen during recording. You must adhere to your host system's file transfer options for this action to be performed correctly.

Note: if macro is not recording, this method will not insert an action.

Parameters:
argDirection - direction to transfer, must be either MacroActionXfer.DIRECTION_SEND or MacroActionXfer.DIRECTION_RECEIVE
argHostFile - name of the host file to transfer
argPCFile - name of the PC file to transfer
argOptions - host transfer options (contact your host system administrator for valid file transfer options).
argClear - if true, clears the host screen before the transfer
argTimeout - timeout value for the file transfer to go into error.
argPCCodePage - PC code page to use in the transfer, the default is "037" (English).
argHostOrient - host system orientation used for BiDi systems only. It is OK for this parameter to be null.
argPCOrient - PC system orientation used for BiDi systems only. It is OK for this parameter to be null.
argPCFType - PC file type used for BiDi systems only. It is OK for this parameter to be null.
argLamAlefExpan - Lam Alef expansion option used for Arabic systems only. It is OK for this parameter to be null.
argLamAlefComp - Lam Alef compression option used for Arabic systems only. It is OK for this parameter to be null.
argSymSwap - Symmetric Swapping used for BiDi systems only. It is OK for this parameter to be null.
argNumerals - Numerals Shaping option used for Arabic systems only. It is OK for this parameter to be null.
argRoundTrip - Round Trip option used for Arabic systems only. It is OK for this parameter to be null.
argMTUSize - Value used to specify Maximum Transmission Unit. It is OK for this parameter to be null. ?????check on this statement rjwmtu
Throws:
MacroException - thrown if a parameter is passed that is not valid or if Macro experiences an internal error.
See Also:
insertXfer(int, java.lang.String, java.lang.String, java.lang.String, boolean, int, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String)

insertDataExtract

public void insertDataExtract(java.lang.String name,
                              int srow,
                              int scol,
                              int erow,
                              int ecol)
                       throws MacroException
Method that inserts a data extract sequence into the macro string. When the macro runs, any extract lines will retrieve the text in the bounding rectangle. This text will be loaded into an array of strings (String []), where each row will be a string element in the array. This array will be fired in a MacroExtractEvent to the MacroRuntimeListeners. This event is synchronous and will not return until the listener handles it.

Note: if macro is not recording, this method will not insert an action. ECLPS must not be null.

Parameters:
name - Name of the data extract.
srow - Upper left row of text rectangle to extract from PS.
scol - Upper right column of text rectangle to extract from PS.
erow - Lower left row of text rectangle to extract from PS.
ecol - Lower right column of text rectangle to extract from PS.
Throws:
MacroException - thrown if a parameter is passed that is not valid or if Macro experiences an internal error.
See Also:
MacroExtractEvent

insertDataExtract

public void insertDataExtract(java.lang.String name,
                              int srow,
                              int scol,
                              int erow,
                              int ecol,
                              java.lang.String planes)
                       throws MacroException
Method that inserts a data extract sequence into the macro string. When the macro runs, any extract lines will retrieve the specified plane(s) in the bounding rectangle. Extracted text will be loaded into an array of strings (String []), where each row will be a string element in the array. All other plane data will be loaded into an array of char arrays (char[][]), where each row will be a char[] element in the array. This data will be fired in a MacroExtractEvent to the MacroRuntimeListeners. This event is synchronous and will not return until the listener handles it.

Note: if macro is not recording, this method will not insert an action. ECLPS must not be null.

Parameters:
name - Name of the data extract.
srow - Upper left row of text rectangle to extract from PS.
scol - Upper right column of text rectangle to extract from PS.
erow - Lower left row of text rectangle to extract from PS.
ecol - Lower right column of text rectangle to extract from PS.
planes - Planes to extract from the PS
Throws:
MacroException - thrown if a parameter is passed that is not valid or if Macro experiences an internal error.
See Also:
MacroExtractEvent

linkScreens

public void linkScreens(java.lang.String screenName,
                        java.lang.String nextScreenName)
                 throws MacroException
Links valid MacroNextScreens to a given Screen in the macro. The screen names in each parameter must be in the macro or an exception will be thrown. The first parameter is the screen that will contain the link to the next screen in the second parameter.

During playback, if a screen is recognized and its actions are executed, any MacroNextScreens specified must appear after the actions of the current screen are executed. If another screen in the macro appears, and it is not linked to the current screen, an error will occur.

Parameters:
screenName - name of the screen that contains the link
nextScreenName - name of the screen to link to
Throws:
MacroException - thrown if a parameter is passed that is not valid or if Macro experiences an internal error.

linkScreens

public void linkScreens(java.lang.String screenName,
                        java.lang.String nextScreenName,
                        int timeout)
                 throws MacroException
Links valid MacroNextScreens to a given Screen in the macro. The screen names in each parameter must be in the macro or an exception will be thrown. The first parameter is the screen that contains the link to the next screen in the second parameter.

During playback, if a screen is recognized and its actions are executed, any next screens specified must appear after the current screens actions are executed. If another screen in the macro appears, and it is not linked to the current screen, an error will occur.

Parameters:
screenName - name of the screen that contains the link
nextScreenName - name of the screen to link to
timeout - timeout value for the Macro bean to wait for any next screens. If time expires, an error will occur.
Throws:
MacroException - thrown if a parameter is passed that is not valid or if Macro experiences an internal error.

setScreenTimeout

public void setScreenTimeout(java.lang.String name,
                             int timeout)
                      throws MacroException
Sets the timeout value for any next screens specified in the screen with the given name. If the name is not in the macro, an exception will be thrown.
Parameters:
name - name of screen to set the next screens timeout
timeout - timeout value for the Macro bean to wait for any next screens. If time expires, an error will occur.
Throws:
MacroException - thrown if a parameter is passed that is not valid or if Macro experiences an internal error.

setScreenTimeout

public void setScreenTimeout(int timeout)
Sets the timeout value for any next screens specified in the current screen.
Parameters:
timeout - timeout value for the Macro bean to wait for any next screens. If time expires, an error will occur.

getParsedMacro

public MacroScreens getParsedMacro()
Returns the current macro as a MacroScreens object. By using a MacroScreens object, which is serializable, you can save an already parsed macro.
Returns:
MacroScreens object that represents a valid macro
See Also:
setMacro(java.lang.String), setMacro(java.io.InputStream), setMacro(java.io.BufferedReader)

setParsedMacro

public void setParsedMacro(MacroScreens argMS)
                    throws MacroException
Sets the current macro from a MacroScreens object. By using a MacroScreens object, which is serializable, the parsing step is skipped. You can not set the macro if you are recording or playing. The method returns without setting the macro if this is the case.
Parameters:
argMS - MacroScreens object that represents a valid macro.
Throws:
MacroException - thrown if a parameter is passed that is not valid or if Macro experiences an internal error.
See Also:
setMacro(java.lang.String), setMacro(java.io.InputStream), setMacro(java.io.BufferedReader)

getMacro

public java.lang.String getMacro()
Returns the current macro to a String. The macro string is newline delimited.
Returns:
String that represents a valid macro.
See Also:
getMacro(java.io.OutputStream), getMacro(java.io.PrintWriter)

getMacro

public void getMacro(java.io.OutputStream strm)
              throws MacroException
Returns the current macro to an output stream.
Parameters:
strm - OutputStream that the Macro should be written to.
Throws:
MacroException - thrown if a parameter is passed that is not valid or if Macro experiences an internal error
See Also:
getMacro(), getMacro(java.io.PrintWriter)

getMacroArray

public java.lang.String[] getMacroArray()
Returns the current macro to a string array. Each element in the array is a line in the macro.
See Also:
setMacro(java.io.InputStream), setMacro(java.io.BufferedReader)

getMacro

public void getMacro(java.io.PrintWriter wrtr)
              throws MacroException
Returns the current macro to a PrintWriter. A PrintWriter is used because a macro is line-delimited and the PrintWriter class has functionality for easily writing lines.
Parameters:
wrtr - PrintWriter where the Macro is to be written.
Throws:
MacroException - thrown if a parameter is passed that is not valid or if Macro experiences an internal error.
See Also:
getMacro(), getMacro(java.io.OutputStream)

setMacro

public void setMacro(java.lang.String str)
              throws MacroException
Sets the current macro from a string. This string must be in XML format.
Parameters:
str - String that represents a valid macro.
Throws:
MacroException - thrown if a parameter is passed that is not valid or if Macro experiences an internal error.
See Also:
setMacro(java.io.InputStream), setMacro(java.io.BufferedReader), setMacroArray(java.lang.String[]), setParsedMacro(com.ibm.eNetwork.beans.HOD.MacroScreens)

setMacroArray

public void setMacroArray(java.lang.String[] strArray)
                   throws MacroException
Sets the current macro from a string array. This string array must contain the correct XML format. Each element in the string array will be treated as a separate line in the macro. This method still accepts macros which use the old macro syntax, however, XML is the preferred format.
Parameters:
strArray - String array that represents a valid macro.
Throws:
MacroException - thrown if a parameter is passed that is not valid or if Macro experiences an internal error.
See Also:
setMacro(java.lang.String), setMacro(java.io.InputStream), setMacro(java.io.BufferedReader), setParsedMacro(com.ibm.eNetwork.beans.HOD.MacroScreens)

setMacro

public void setMacro(java.io.InputStream strm)
              throws MacroException
Sets the current macro from an input stream. This stream must contain a string in the correct XML format. This method still accepts macros which use the old macro syntax, however, XML is the preferred format.
Parameters:
strm - InputStream where the Macro resides.
Throws:
MacroException - thrown if a parameter is passed that is not valid or if Macro experiences an internal error.
See Also:
setMacro(java.lang.String), setMacro(java.io.BufferedReader), setMacroArray(java.lang.String[]), setParsedMacro(com.ibm.eNetwork.beans.HOD.MacroScreens)

setMacro

public void setMacro(java.io.BufferedReader macReader)
              throws MacroException
Sets the current macro from a buffered reader. This reader must contain a string the in the correct XML format.This method still accepts macros which use the old macro syntax, however, XML is the preferred format.
Parameters:
macReader - BufferedReader where the Macro resides.
Throws:
MacroException - thrown if a parameter is passed that is not valid or if Macro experiences an internal error.
See Also:
setMacro(java.lang.String), setMacro(java.io.InputStream), setMacroArray(java.lang.String[]), setParsedMacro(com.ibm.eNetwork.beans.HOD.MacroScreens)

setMacroIOProvider

public void setMacroIOProvider(MacroIOProvider macIO)
Sets MacroIOProvider. This is needed if a user writes own MacroIOProvider for macro chaining. The first/initial macro must be set with a MacroIOProvider for macro Chaining.
Parameters:
macIO - MacroIOProvider used for loading chained macros

getMacroIOProvider

public MacroIOProvider getMacroIOProvider()
returns MacroIOProvider associated with this macro

getMacroPrinterDriver

public MacroPrinterDriver getMacroPrinterDriver()
Return a printer that can be used while playing the macro. The MacroPrinterDriver interfaces to the local printer. If there is a PrinterDriver defined and available, it will be returned in accordance with the type of session the macro is running in and the platform.
Returns:
MacroPrinterDriver

setMacroPrinterDriver

public void setMacroPrinterDriver(MacroPrinterDriver mpd)
Sets a printer that can be used while playing the macro. The MacroPrinterDriver interfaces to the local printer.
See Also:
getMacroPrinterDriver()