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

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

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

Event fired to objects implementing MacroDebugListener interface (must call Macro.addMacroDebugListener). This event contains all the functionality for discovering how the Macro screen matching logic performed.

To use this class properly, follow these steps:

  1. Implement the MacroDebugListener and add it to Macro using Macro.addMacroDebugListener.
  2. In the screensCompared method, first determine if the screen matched by calling MacroRecoDebugEvent.isMatch().
  3. If the match was not successful, get the ECLScreenDesc object using MacroRecoDebugEvent.getDescription().
  4. Get the vector of descriptors for the description by call GetDescriptors on object you received from the previous step.
  5. From there, you can iterate through each descriptor in the vector, calling IsMatch() on each to determine which failed.
  6. If failure occurred, you can call MacroRecoDebugEvent.getActual to determine what is actually in the PS that caused the descriptor to fail.

See Also:
Serialized Form

Constructor Summary
MacroRecoDebugEvent(com.ibm.eNetwork.ECL.ECLScreenReco arg0, com.ibm.eNetwork.ECL.ECLPS arg1, com.ibm.eNetwork.ECL.ECLScreenDesc arg2)
          Constructs a working instance of a MacroRecoDebugEvent.
MacroRecoDebugEvent(Macro arg0, com.ibm.eNetwork.ECL.screenreco.event.ECLRecoDebugEvent arg1, MacroScreens arg2, MacroScreen arg3)
          Constructs a working instance of a MacroRecoDebugEvent.
 
Method Summary
 java.lang.String formatSDString(com.ibm.eNetwork.ECL.screenreco.ECLSDString sds)
          This method should be used in conjunction with the getActual method.
 com.ibm.eNetwork.ECL.screenreco.ECLScreenDescriptor getActual(com.ibm.eNetwork.ECL.screenreco.ECLScreenDescriptor arg)
          Returns the what is actually on the host screen based on the parameters passed in the descriptor.
 com.ibm.eNetwork.ECL.ECLPS getCurrentPS()
          Returns the current presentation space object in the Macro bean.
 com.ibm.eNetwork.ECL.ECLScreenDesc getDescription()
          Returns the ECLScreenDesc object that is in the MacroScreen compared.
 MacroScreen getScreen()
          Returns the MacroScreen object for the event
 int getScreenLineNum()
          Returns the line number of the MacroScreen object for the event
 MacroScreens getScreens()
          Returns MacroScreens object for the event.
 boolean isMatch()
          Returns true if all match.
 
Methods inherited from class java.util.EventObject
getSource, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MacroRecoDebugEvent

public MacroRecoDebugEvent(com.ibm.eNetwork.ECL.ECLScreenReco arg0,
                           com.ibm.eNetwork.ECL.ECLPS arg1,
                           com.ibm.eNetwork.ECL.ECLScreenDesc arg2)
Constructs a working instance of a MacroRecoDebugEvent. This constructor should only be used by classes in the HOD beans package.
Parameters:
arg0 - The screen recognition engine HACL-based ECLScreenReco
arg1 - The target Presentation Space HACL-based ECLPS
arg2 - The screen descriptors holder HACL-based ECLScreenDesc

MacroRecoDebugEvent

public MacroRecoDebugEvent(Macro arg0,
                           com.ibm.eNetwork.ECL.screenreco.event.ECLRecoDebugEvent arg1,
                           MacroScreens arg2,
                           MacroScreen arg3)
Constructs a working instance of a MacroRecoDebugEvent. This constructor should only be used by classes in the HOD beans package.
Parameters:
arg0 - The target Macro bean.
arg1 - The HACL-based ECLRecoDebugEvent
arg2 - The MacroScreensCollection.
arg3 - The particular MacroScreen.
Method Detail

getScreens

public MacroScreens getScreens()
Returns MacroScreens object for the event.
Returns:
MacroScreens collection object currently in the Macro bean
See Also:
MacroScreens

getScreen

public MacroScreen getScreen()
Returns the MacroScreen object for the event
Returns:
MacroActions collection object currently in the Macro bean
See Also:
MacroScreen

getScreenLineNum

public int getScreenLineNum()
Returns the line number of the MacroScreen object for the event
Returns:
line number for the screen

getDescription

public com.ibm.eNetwork.ECL.ECLScreenDesc getDescription()
Returns the ECLScreenDesc object that is in the MacroScreen compared.
Returns:
ECLScreenDesc object of the MacroScreen in the event

getCurrentPS

public com.ibm.eNetwork.ECL.ECLPS getCurrentPS()
Returns the current presentation space object in the Macro bean. Provided for developer convenience.
Returns:
ECLPS object contained in the Macro bean

isMatch

public boolean isMatch()
Returns true if all match. Provided for developer convenience.
Returns:
boolean true if all ECLScreenDescriptors match

getActual

public com.ibm.eNetwork.ECL.screenreco.ECLScreenDescriptor getActual(com.ibm.eNetwork.ECL.screenreco.ECLScreenDescriptor arg)
                                                              throws com.ibm.eNetwork.ECL.ECLErr
Returns the what is actually on the host screen based on the parameters passed in the descriptor. Useful to know what is actually on the screen if a descriptor failed.

Note: for ECLSDString objects that are set as strings in rectangular areas, the entire text of the rectangular area needs to be returned. To usefully display the actual contents of the screen, use the formatSDString method on this object.

Parameters:
arg - ECLScreenDescriptor the screen descriptor for which the actual current state in the session should be returned. e.g, if the screen descriptor is ECLSDCursor, a new ECLSDCursor is returned with the current row and column cursor values.
Returns:
ECLScreenDescriptor object that is currently on the screen
Throws:
com.ibm.eNetwork.ECL.ECLErr - Throws a HACL-based error event ECLErr.

formatSDString

public java.lang.String formatSDString(com.ibm.eNetwork.ECL.screenreco.ECLSDString sds)
This method should be used in conjunction with the getActual method. For ECLSDString objects that are set as strings in rectangular areas, the entire text of the rectangular area needs to be returned. To usefully display the actual contents of the screen, use the formatSDString method on this object. This will return an XML string with the contents of the screen rectangle properly formatted.