SalesPoint Framework v3.0

data.events
Class CatalogChangeAdapter

java.lang.Object
  |
  +--data.events.CatalogChangeAdapter

public abstract class CatalogChangeAdapter
extends Object
implements CatalogChangeListener, SerializableListener

An abstract adapter class for receiving catalog change events. The methods in this class are empty. This class exists as convenience for creating listener objects.

Extend this class to create a CatalogChangeEvent listener and override the methods for the events of interest. (If you implement the CatalogChangeListener interface, you have to define all of the methods in it. This abstract class defines empty method bodies for them all, so you can concentrate on defining methods only for events you care about.)

Create a listener object using the extended class and then register it with a ListenableCatalog using the Catalog's ListenableCatalog.addCatalogChangeListener(data.events.CatalogChangeListener) method. When the Catalog's contents change, the relevant method in the listener object is invoked, and a CatalogChangeEvent is passed to it.

Since:
v2.0
Version:
2.0 19/08/1999
Author:
Steffen Zschaler
See Also:
Serialized Form

Constructor Summary
CatalogChangeAdapter()
           
 
Method Summary
 void addedCatalogItem(CatalogChangeEvent e)
          Called whenever a CatalogItem was added to the Catalog.
 void canEditCatalogItem(CatalogChangeEvent e)
          Called to ask whether a CatalogItem may be edited.
 void canRemoveCatalogItem(CatalogChangeEvent e)
          Called to ask whether a CatalogItem may be removed.
 void commitedAddCatalogItem(CatalogChangeEvent e)
          Called whenever the adding of a CatalogItem was commited.
 void commitEditCatalogItem(CatalogChangeEvent e)
          Called whenever editing a CatalogItem was commited.
 void commitedRemoveCatalogItem(CatalogChangeEvent e)
          Called whenever the removal of a CatalogItem was commited.
 void editingCatalogItem(CatalogChangeEvent e)
          Called whenever editing a CatalogItem was started.
 void noEditCatalogItem(CatalogChangeEvent e)
          Called for each listener that already agreed with an editing that was then rejected by another listener.
 void noRemoveCatalogItem(CatalogChangeEvent e)
          Called for each listener that already agreed with a removal that was then rejected by another listener.
 void removedCatalogItem(CatalogChangeEvent e)
          Called whenever a CatalogItem was removed from the Catalog.
 void rollbackEditCatalogItem(CatalogChangeEvent e)
          Called whenever editing a CatalogItem was rolled back.
 void rolledbackAddCatalogItem(CatalogChangeEvent e)
          Called whenever the adding of a CatalogItem was rolled back.
 void rolledbackRemoveCatalogItem(CatalogChangeEvent e)
          Called whenever the removal of a CatalogItem was rolled back.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CatalogChangeAdapter

public CatalogChangeAdapter()
Method Detail

addedCatalogItem

public void addedCatalogItem(CatalogChangeEvent e)
Called whenever a CatalogItem was added to the Catalog.
Override:
Sometimes.
Specified by:
addedCatalogItem in interface CatalogChangeListener
Parameters:
e - an event object describing the event.

commitedAddCatalogItem

public void commitedAddCatalogItem(CatalogChangeEvent e)
Called whenever the adding of a CatalogItem was commited.
Override:
Sometimes.
Specified by:
commitedAddCatalogItem in interface CatalogChangeListener
Parameters:
e - an event object describing the event.

rolledbackAddCatalogItem

public void rolledbackAddCatalogItem(CatalogChangeEvent e)
Called whenever the adding of a CatalogItem was rolled back.
Override:
Sometimes.
Specified by:
rolledbackAddCatalogItem in interface CatalogChangeListener
Parameters:
e - an event object describing the event.

canRemoveCatalogItem

public void canRemoveCatalogItem(CatalogChangeEvent e)
                          throws VetoException
Called to ask whether a CatalogItem may be removed. If one of the listeners vetos the removal, all listeners that had already been asked will receive a noRemoveCatalogItem event.
Override:
Sometimes.
Specified by:
canRemoveCatalogItem in interface CatalogChangeListener
Parameters:
e - an event object describing the event.
Throws:
VetoException - if the listener wants to veto the removal.

noRemoveCatalogItem

public void noRemoveCatalogItem(CatalogChangeEvent e)
Called for each listener that already agreed with a removal that was then rejected by another listener.
Override:
Sometimes.
Specified by:
noRemoveCatalogItem in interface CatalogChangeListener
Parameters:
e - an event object describing the event.

removedCatalogItem

public void removedCatalogItem(CatalogChangeEvent e)
Called whenever a CatalogItem was removed from the Catalog.
Override:
Sometimes.
Specified by:
removedCatalogItem in interface CatalogChangeListener
Parameters:
e - an event object describing the event.

commitedRemoveCatalogItem

public void commitedRemoveCatalogItem(CatalogChangeEvent e)
Called whenever the removal of a CatalogItem was commited.
Override:
Sometimes.
Specified by:
commitedRemoveCatalogItem in interface CatalogChangeListener
Parameters:
e - an event object describing the event.

rolledbackRemoveCatalogItem

public void rolledbackRemoveCatalogItem(CatalogChangeEvent e)
Called whenever the removal of a CatalogItem was rolled back.
Override:
Sometimes.
Specified by:
rolledbackRemoveCatalogItem in interface CatalogChangeListener
Parameters:
e - an event object describing the event.

canEditCatalogItem

public void canEditCatalogItem(CatalogChangeEvent e)
                        throws VetoException
Called to ask whether a CatalogItem may be edited. If one of the listeners vetos the editing, all steners that had already been asked will receive a noEditCatalogItem event.
Override:
Sometimes.
Specified by:
canEditCatalogItem in interface CatalogChangeListener
Parameters:
e - an event object describing the event.
Throws:
VetoException - if the listener wants to veto the editing.

noEditCatalogItem

public void noEditCatalogItem(CatalogChangeEvent e)
Called for each listener that already agreed with an editing that was then rejected by another listener.
Override:
Sometimes.
Specified by:
noEditCatalogItem in interface CatalogChangeListener
Parameters:
e - an event object describing the event.

editingCatalogItem

public void editingCatalogItem(CatalogChangeEvent e)
Called whenever editing a CatalogItem was started. This event may be accompanied by a removedCatalogItem and a addedCatalogItem event, but this is implementation specific.
Override:
Sometimes.
Specified by:
editingCatalogItem in interface CatalogChangeListener
Parameters:
e - an event object describing the event.

commitEditCatalogItem

public void commitEditCatalogItem(CatalogChangeEvent e)
Called whenever editing a CatalogItem was commited.
Override:
Sometimes.
Specified by:
commitEditCatalogItem in interface CatalogChangeListener
Parameters:
e - an event object describing the event.

rollbackEditCatalogItem

public void rollbackEditCatalogItem(CatalogChangeEvent e)
Called whenever editing a CatalogItem was rolled back.
Override:
Sometimes.
Specified by:
rollbackEditCatalogItem in interface CatalogChangeListener
Parameters:
e - an event object describing the event.

SalesPoint Framework v3.0