com.ibm.eNetwork.beans.HOD
Class MacroActionExtract

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

public class MacroActionExtract
extends MacroAction
implements com.ibm.eNetwork.ECL.ECLConstants

This class represents one extract action associated with a MacroScreen object. The extract action is used for retrieving text data or other plane data from the host screen during a macro play.

If the Macro bean encounters an extract action during playing, the Macro bean will "scrape" the data from the rectangular area specified by the extract action and fire it to any extract listeners (in MacroRuntimeListener). If there are no runtime listeners, the Macro bean does nothing for extract actions.

The extract action can also assemble extract data based on the fields on the screen. This makes it possible to assemble the screen data into "rows" even though some fields might wrap around to the next line. If a field wraps, all it's data will be added to the extract data as if it were on the same line. The data will not be split amongst two lines like a normal extract would. Call the setUnwrap method with a true value to turn on this behavior.

See Also:
Macro, MacroRuntimeListener, Serialized Form

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, 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, YELLOW_3270
 
Fields inherited from interface com.ibm.eNetwork.HOD.common.HODConstants
DEFAULT_WIN_FONT, HOD_ICON_EVENT, HOD_MSG_FILE, 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_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_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
MacroActionExtract()
          Constructs an empty instance of a macro extract.
MacroActionExtract(int argSRow, int argSCol, int argERow, int argECol, java.lang.String argName)
          Constructs a functional instance of a macro extract with the given parameters.
MacroActionExtract(int argSRow, int argSCol, int argERow, int argECol, java.lang.String argName, java.lang.String argPlaneType)
          Constructs a functional instance of a macro extract with the given parameters.
 
Method Summary
 void execute()
          Executes the macro extract action.
 java.lang.String format(int argType, boolean displayAll)
          Formats the action object's contents into a readable string.
 java.lang.String getAssignToVar()
          Returns the name of the variable to which the text extract is being assigned.
 int getECol()
          Returns the lower right column for the extract area.
 java.lang.String getEColRaw()
          Returns the expression form of the lower right column for the extract area.
 int getERow()
          Returns the lower right row for the extract area.
 java.lang.String getERowRaw()
          Returns the expression form of the lower right row for the extract area.
 java.lang.String getName()
          Returns the identifying name for the extract.
 java.lang.String getNameRaw()
          Returns the expression form of the identifying name for the extract.
 java.lang.String getPlaneType()
          Returns the planes that will be extracted during the extract action
 java.lang.String getPlaneTypeRaw()
          Returns the expression form of the planes that will be extracted during the extract action
 int getSCol()
          Returns the upper left column for the extract area.
 java.lang.String getSColRaw()
          Returns the expression form of the upper left column for the extract area.
 int getSRow()
          Returns the upper left row for the extract area.
 java.lang.String getSRowRaw()
          Returns the expression form of the upper left row for the extract area.
 boolean isAssignToVar()
          Returns whether the extract is being assigned to a variable
 boolean isUnwrap()
          Returns whether the extract action will assemble extract data based on the fields on the screen.
 java.lang.String isUnwrapRaw()
          Returns the expression form of whether the extract action will assemble extract data based on the fields on the screen.
 void setAssignToVar(java.lang.String argAssign)
          Sets the variable to receive the extracted text
 void setECol(int argC)
          Sets the lower right column for the extract area.
 void setECol(java.lang.String argC)
          Sets the lower right column for the extract area.
 void setERow(int argR)
          Sets the lower right row for the extract area.
 void setERow(java.lang.String argR)
          Sets the lower right row for the extract area.
 void setName(java.lang.String argName)
          Sets the identifying name for the extract.
 void setPlaneType(java.lang.String[] argPlaneType)
          Sets the planes that will be extracted during the extract action
 void setSCol(int argC)
          Sets the upper left column for the extract area.
 void setSCol(java.lang.String argC)
          Sets the upper left column for the extract area.
 void setSRow(int argR)
          Sets the upper left row for the extract area.
 void setSRow(java.lang.String argR)
          Sets the upper left row for the extract area.
 void setUnwrap(boolean argVal)
          If set to true, the extract action will assemble extract data based on the fields on the screen.
 void setUnwrap(java.lang.String argVal)
          If set to true, the extract action will assemble extract data based on the fields on the screen.
 
Methods inherited from class com.ibm.eNetwork.beans.HOD.MacroAction
clone, halt, setECLSession, setOwner, setRuntimeListeners
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.ibm.eNetwork.beans.HOD.macro.parser.MacroParsable
setAttributes, setError
 

Constructor Detail

MacroActionExtract

public MacroActionExtract()
Constructs an empty instance of a macro extract.

If you use this constructor you must call all the set methods of this class to properly set up the action.


MacroActionExtract

public MacroActionExtract(int argSRow,
                          int argSCol,
                          int argERow,
                          int argECol,
                          java.lang.String argName)
Constructs a functional instance of a macro extract with the given parameters.
Parameters:
argSRow - upper left row for the extract area
argSCol - upper left column for the extract area
argERow - lower right row for the extract area
argECol - lower right column for the extract area
argName - name of the extract, used for identification

MacroActionExtract

public MacroActionExtract(int argSRow,
                          int argSCol,
                          int argERow,
                          int argECol,
                          java.lang.String argName,
                          java.lang.String argPlaneType)
Constructs a functional instance of a macro extract with the given parameters.
Parameters:
argSRow - upper left row for the extract area
argSCol - upper left column for the extract area
argERow - lower right row for the extract area
argECol - lower right column for the extract area
argName - name of the extract, used for identification
argPlaneType - plane(s) to extract
Method Detail

execute

public void execute()
Executes the macro extract action. Note: you must use the setECLSession, setRuntimeListeners and setOwner methods before calling execute, or the execute method will throw a NullPointerException.
Overrides:
execute in class MacroAction
See Also:
MacroAction

getSRow

public int getSRow()
Returns the upper left row for the extract area.
Returns:
upper left row

getSRowRaw

public java.lang.String getSRowRaw()
Returns the expression form of the upper left row for the extract area.
Returns:
expression form of the upper left row

setSRow

public void setSRow(int argR)
Sets the upper left row for the extract area.
Parameters:
argSRow - upper left row for the extract area

setSRow

public void setSRow(java.lang.String argR)
Sets the upper left row for the extract area.
Parameters:
expression - upper left row for the extract area

getSCol

public int getSCol()
Returns the upper left column for the extract area.
Returns:
upper left column

getSColRaw

public java.lang.String getSColRaw()
Returns the expression form of the upper left column for the extract area.
Returns:
expression form of the upper left column

setSCol

public void setSCol(int argC)
Sets the upper left column for the extract area.
Parameters:
argSCol - upper left column for the extract area

setSCol

public void setSCol(java.lang.String argC)
Sets the upper left column for the extract area.
Parameters:
expression - upper left column for the extract area

getERow

public int getERow()
Returns the lower right row for the extract area.
Returns:
lower right row

getERowRaw

public java.lang.String getERowRaw()
Returns the expression form of the lower right row for the extract area.
Returns:
expression form of the lower right row

setERow

public void setERow(int argR)
Sets the lower right row for the extract area.
Parameters:
argERow - lower right row for the extract area

setERow

public void setERow(java.lang.String argR)
Sets the lower right row for the extract area.
Parameters:
expression - lower right row for the extract area

getECol

public int getECol()
Returns the lower right column for the extract area.
Returns:
lower right column

getEColRaw

public java.lang.String getEColRaw()
Returns the expression form of the lower right column for the extract area.
Returns:
expression form of the lower right column

setECol

public void setECol(int argC)
Sets the lower right column for the extract area.
Parameters:
argECol - lower right column for the extract area

setECol

public void setECol(java.lang.String argC)
Sets the lower right column for the extract area.
Parameters:
expression - lower right column for the extract area

getName

public java.lang.String getName()
Returns the identifying name for the extract.
Returns:
name of the extract

getNameRaw

public java.lang.String getNameRaw()
Returns the expression form of the identifying name for the extract.
Returns:
expression form of the name of the extract

setName

public void setName(java.lang.String argName)
Sets the identifying name for the extract.
Parameters:
argName - name of the extract used for identification

setUnwrap

public void setUnwrap(boolean argVal)
If set to true, the extract action will assemble extract data based on the fields on the screen. This makes it possible to assemble the screen data into "rows" even though some fields might wrap around to the next line. If a field wraps, all it's text will be put into a single String in the data array. The data will not be split amongst two lines like a normal extract would.
Parameters:
argVal - if true, fields will be unwrapped

setUnwrap

public void setUnwrap(java.lang.String argVal)
If set to true, the extract action will assemble extract data based on the fields on the screen. This makes it possible to assemble the screen data into "rows" even though some fields might wrap around to the next line. If a field wraps, all it's text will be put into a single String in the data array. The data will not be split amongst two lines like a normal extract would.
Parameters:
expression - if expression evaluates to true, fields will be unwrapped

isUnwrap

public boolean isUnwrap()
Returns whether the extract action will assemble extract data based on the fields on the screen. This makes it possible to assemble the screen data into "rows" even though some fields might wrap around to the next line. If a field wraps, all it's text will be put into a single String in the data array. The data will not be split amongst two lines like a normal extract would.
Returns:
if true, fields will be unwrapped

isUnwrapRaw

public java.lang.String isUnwrapRaw()
Returns the expression form of whether the extract action will assemble extract data based on the fields on the screen. This makes it possible to assemble the screen data into "rows" even though some fields might wrap around to the next line. If a field wraps, all it's text will be put into a single String in the data array. The data will not be split amongst two lines like a normal extract would.
Returns:
if expression evaluates to true, fields will be unwrapped

getAssignToVar

public java.lang.String getAssignToVar()
Returns the name of the variable to which the text extract is being assigned. If not assigning to a variable, this method returns an empty string.
Returns:
name of variable being updated with the extract

isAssignToVar

public boolean isAssignToVar()
Returns whether the extract is being assigned to a variable
Returns:
if true, the extract is being assigned to a variable

setAssignToVar

public void setAssignToVar(java.lang.String argAssign)
Sets the variable to receive the extracted text
Parameters:
argAssign - name of the variable

setPlaneType

public void setPlaneType(java.lang.String[] argPlaneType)
Sets the planes that will be extracted during the extract action
Parameters:
argPlaneType - Array of planes to be extracted

getPlaneType

public java.lang.String getPlaneType()
Returns the planes that will be extracted during the extract action
Returns:
planes to be extracted

getPlaneTypeRaw

public java.lang.String getPlaneTypeRaw()
Returns the expression form of the planes that will be extracted during the extract action
Returns:
expression form of the planes to be extracted

format

public java.lang.String format(int argType,
                               boolean displayAll)
Formats the action object's contents into a readable string. Intended for visual feedback, as with the MacroDebugActionEvent class.
Overrides:
format in class MacroAction
Parameters:
argType - reserved, currently only XML strings are supported
formatAll - if true, optional parameters will be formatted also
Returns:
formatted string that reflects the contents of the action