|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.eNetwork.beans.HOD.MacroAction | +--com.ibm.eNetwork.beans.HOD.MacroActionCustom
This class represents one custom action associated with a MacroScreen object. The custom action gives the developer using the Macro bean the ability to exit to his or her own Java code.
After the Macro bean is instantiated, the developer can call addMacroCustomActionListener. addMacroCustomActionListener takes the custom action listener interface object that the developer implements and the MacroActionCustom object's ID. Once addMacroCustomActionListener is called and the Macro bean play method is called, the Macro bean will call the "execute" method of the custom action listener if it sees a custom action line in the macro with the appropriate ID. Note that the arguments are normally coded in the macro file.
For example, the developer codes this in Java (assume the class containing this code snippet implements MacroCustomActionListener):
Macro mac = new Macro();
The macString object is just the string representation of a macro that
contains the custom action line like this:
MyCustomActionListner l = new MyCustomActionListener();
mac.addMacroCustomActionListener(l);
mac.setMacro(macString); //assume macString is from a macro file (see below)
mac.play();
custom id="ID1" args="these are the args"
When the Macro bean play method is called, the Macro bean encounters the
custom action line. It compares the ID and finds a match because it was registered
in the Java code. Then, the Macro bean calls the "execute" method of the MacroCustomActionListener,
and the macro play exits to the developer's Java code.
Note: this is and advanced feature that gives developers the ability to fully customize macro actions associated with a screen. Once the Macro exits to the developer's code, it is up to the developer to write reliable code that will not interfere with the normal behavior of the Macro bean.
Macro
,
MacroCustomActionListener
,
MacroCustomActionEvent
, Serialized FormFields 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 | |
---|---|
MacroActionCustom()
Constructs an empty instance of a MacroCustomAction. |
|
MacroActionCustom(java.lang.String argID,
java.lang.String argsArgs)
Constructs a functional instance of a MacroCustomAction with the given parameters. |
Method Summary | |
---|---|
java.lang.Object |
clone()
Classes derived from this action must override this method for the action to be functional in the Macro bean. |
void |
execute()
Executes the macro action action. |
java.lang.String |
format(int argType,
boolean formatAll)
Formats the action object's contents into a readable string. |
java.lang.String |
getArgs()
Returns the custom action arguments. |
java.lang.String |
getArgsRaw()
Returns the expression form of the custom action arguments. |
java.lang.String |
getID()
Returns the custom action identifier. |
java.lang.String |
getIDRaw()
Returns the expression form of the custom action identifier. |
void |
halt()
Halts the macro custom action. |
void |
setArgs(java.lang.String argArgs)
Sets the custom action arguments. |
void |
setID(java.lang.String argID)
Sets the custom action identifier. |
Methods inherited from class com.ibm.eNetwork.beans.HOD.MacroAction |
---|
equals, setECLSession, setOwner, setRuntimeListeners |
Methods inherited from class java.lang.Object |
---|
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.ibm.eNetwork.beans.HOD.macro.parser.MacroParsable |
---|
setAttributes, setError |
Constructor Detail |
public MacroActionCustom()
If you use this constructor you must call all the set methods of this class to properly set up the action.
public MacroActionCustom(java.lang.String argID, java.lang.String argsArgs)
argID
- custom action identifier that is registered with the Macro beanargArgs
- arguments to pass the MacroCustomActionListenersMethod Detail |
public void execute()
execute
in class MacroAction
public void halt()
halt
in class MacroAction
public java.lang.String getID()
public java.lang.String getIDRaw()
public void setID(java.lang.String argID)
argID
- custom action identifier that is registered with the Macro beanpublic java.lang.String getArgs()
public java.lang.String getArgsRaw()
public void setArgs(java.lang.String argArgs)
argArgs
- arguments to pass the MacroCustomActionListenerspublic java.lang.String format(int argType, boolean formatAll)
format
in class MacroAction
type
- reserved, currently only XML strings are supportedformatAll
- if true, optional parameters will be formatted alsopublic java.lang.Object clone()
clone
in class MacroAction
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |