org.apache.torque.betwixt
Class XMLEventNotifier

java.lang.Object
  extended by org.apache.torque.betwixt.XMLEventNotifier
Direct Known Subclasses:
Exporter, Importer

public class XMLEventNotifier
extends java.lang.Object

A Base class with methods that manage event notifications.

Author:
Greg Monroe

Field Summary
static java.lang.String ACTION_ADD
          Tag for record added (Inserted) notifications
static java.lang.String ACTION_DELETE
          Tag for record delete notifications
static java.lang.String ACTION_ERROR
          Tag for error notifications
static java.lang.String ACTION_INFO
          Tag for general Info notifications
static java.lang.String ACTION_TYPE
          Tag for record type notifications
static java.lang.String ACTION_UPDATE
          Tag for record update notifications
static java.lang.String EXPORT_END
          Tag for general Export End notifications
static java.lang.String EXPORT_RECORD
          Tag for general Export Record notifications
static java.lang.String EXPORT_START
          Tag for general Export Start notifications
static java.lang.String IMPORT_END
          Tag for import end notifications
static java.lang.String IMPORT_START
          Tag for import start notifications
 
Constructor Summary
XMLEventNotifier()
           
 
Method Summary
 void deregisterListener(XMLEventListener listener)
          Remove a listener.
protected  java.util.List getListeners()
          Gets the registered listeners.
 void notifyListeners(int recordNum, java.lang.String action, java.lang.String info)
          Calls all registered listeners to let them know an action occured.
 void registerListener(XMLEventListener listener)
          Register a listener that will be notified of export actions.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ACTION_ERROR

public static final java.lang.String ACTION_ERROR
Tag for error notifications

See Also:
Constant Field Values

ACTION_INFO

public static final java.lang.String ACTION_INFO
Tag for general Info notifications

See Also:
Constant Field Values

EXPORT_START

public static java.lang.String EXPORT_START
Tag for general Export Start notifications


EXPORT_RECORD

public static java.lang.String EXPORT_RECORD
Tag for general Export Record notifications


EXPORT_END

public static java.lang.String EXPORT_END
Tag for general Export End notifications


IMPORT_START

public static final java.lang.String IMPORT_START
Tag for import start notifications

See Also:
Constant Field Values

IMPORT_END

public static final java.lang.String IMPORT_END
Tag for import end notifications

See Also:
Constant Field Values

ACTION_TYPE

public static final java.lang.String ACTION_TYPE
Tag for record type notifications

See Also:
Constant Field Values

ACTION_UPDATE

public static final java.lang.String ACTION_UPDATE
Tag for record update notifications

See Also:
Constant Field Values

ACTION_ADD

public static final java.lang.String ACTION_ADD
Tag for record added (Inserted) notifications

See Also:
Constant Field Values

ACTION_DELETE

public static final java.lang.String ACTION_DELETE
Tag for record delete notifications

See Also:
Constant Field Values
Constructor Detail

XMLEventNotifier

public XMLEventNotifier()
Method Detail

notifyListeners

public void notifyListeners(int recordNum,
                            java.lang.String action,
                            java.lang.String info)
                     throws java.lang.Exception
Calls all registered listeners to let them know an action occured. Notification will occure in the order they were registered.

Parameters:
recordNum - the (1 based) index of the record object being processed.
action - The action type of this info.
info - The message with information about this event.
Throws:
java.lang.Exception

registerListener

public void registerListener(XMLEventListener listener)
Register a listener that will be notified of export actions.

Parameters:
listener - The listener to add.

deregisterListener

public void deregisterListener(XMLEventListener listener)
Remove a listener.

Parameters:
listener - The listener to remove.

getListeners

protected java.util.List getListeners()
Gets the registered listeners.

Returns:
A list of listeners.


Copyright © 2006 Torque Add-ons Project. All Rights Reserved.