All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.ibm.eNetwork.beans.HOD.MacroActionExtract

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

public class MacroActionExtract
extends MacroAction
implements ECLConstants
This class represents one extract action associated with a MacroScreen object. The extract action is used for retrieving text 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

Constructor Index

 o MacroActionExtract()
Constructs an empty instance of a macro extract.
 o MacroActionExtract(int, int, int, int, String)
Constructs a functional instance of a macro extract with the given parameters.

Method Index

 o execute()
Executes the macro extract action.
 o format(int, boolean)
Formats the action object's contents into a readable string.
 o getECol()
Returns the lower right column for the extract area.
 o getERow()
Returns the lower right row for the extract area.
 o getName()
Returns the identifying name for the extract.
 o getSCol()
Returns the upper left column for the extract area.
 o getSRow()
Returns the upper left row for the extract area.
 o isUnwrap()
Returns whether the extract action will assemble extract data based on the fields on the screen.
 o setECol(int)
Sets the lower right column for the extract area.
 o setERow(int)
Sets the lower right row for the extract area.
 o setName(String)
Sets the identifying name for the extract.
 o setSCol(int)
Sets the upper left column for the extract area.
 o setSRow(int)
Sets the upper left row for the extract area.
 o setUnwrap(boolean)
If set to true, the extract action will assemble extract data based on the fields on the screen.

Constructors

 o 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.

 o MacroActionExtract
 public MacroActionExtract(int argSRow,
                           int argSCol,
                           int argERow,
                           int argECol,
                           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

Methods

 o 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
 o getSRow
 public int getSRow()
Returns the upper left row for the extract area.

Returns:
upper left row
 o setSRow
 public void setSRow(int argSRow)
Sets the upper left row for the extract area.

Parameters:
argSRow - upper left row for the extract area
 o getSCol
 public int getSCol()
Returns the upper left column for the extract area.

Returns:
upper left column
 o setSCol
 public void setSCol(int argSCol)
Sets the upper left column for the extract area.

Parameters:
argSCol - upper left column for the extract area
 o getERow
 public int getERow()
Returns the lower right row for the extract area.

Returns:
lower right row
 o setERow
 public void setERow(int argERow)
Sets the lower right row for the extract area.

Parameters:
argERow - lower right row for the extract area
 o getECol
 public int getECol()
Returns the lower right column for the extract area.

Returns:
lower right column
 o setECol
 public void setECol(int argECol)
Sets the lower right column for the extract area.

Parameters:
argECol - lower right column for the extract area
 o getName
 public String getName()
Returns the identifying name for the extract.

Returns:
name of the extract
 o setName
 public void setName(String argName)
Sets the identifying name for the extract.

Parameters:
argName - name of the extract used for identification
 o 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
 o 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
 o format
 public 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.

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
Overrides:
format in class MacroAction

All Packages  Class Hierarchy  This Package  Previous  Next  Index