org.salespointframework.core.data.events
Interface CatalogChangeListener<T extends CatalogItem>

All Superinterfaces:
DatasourceChangeListener, java.util.EventListener
All Known Implementing Classes:
CatalogChangeAdapter, CatalogFilter, CatalogListModel, CatalogTableModel, CountingStockListModel, CountingStockTableModel, CurrencyFilter

public interface CatalogChangeListener<T extends CatalogItem>
extends java.util.EventListener, DatasourceChangeListener

A listener listening for CatalogChangeEvents.

Since:
v2.0
Version:
2.0 19/08/1999
Author:
Steffen Zschaler

Method Summary
 void addedCatalogItem(CatalogChangeEvent<T> e)
          Called whenever a CatalogItem was added to the Catalog.
 void canEditCatalogItem(CatalogChangeEvent<T> e)
          Called to ask whether a CatalogItem may be edited.
 void canRemoveCatalogItem(CatalogChangeEvent<T> e)
          Called to ask whether a CatalogItem may be removed.
 void commitedAddCatalogItem(CatalogChangeEvent<T> e)
          Called whenever the adding of a CatalogItem was commited.
 void commitEditCatalogItem(CatalogChangeEvent<T> e)
          Called whenever editing a CatalogItem was commited.
 void commitedRemoveCatalogItem(CatalogChangeEvent<T> e)
          Called whenever the removal of a CatalogItem was commited.
 void editingCatalogItem(CatalogChangeEvent<T> e)
          Called whenever editing a CatalogItem was started.
 void noEditCatalogItem(CatalogChangeEvent<T> e)
          z Called for each listener that already agreed with an editing that was then rejected by another listener.
 void noRemoveCatalogItem(CatalogChangeEvent<T> e)
          Called for each listener that already agreed with a removal that was then rejected by another listener.
 void removedCatalogItem(CatalogChangeEvent<T> e)
          Called whenever a CatalogItem was removed from the Catalog.
 void rollbackEditCatalogItem(CatalogChangeEvent<T> e)
          Called whenever editing a CatalogItem was rolled back.
 void rolledbackAddCatalogItem(CatalogChangeEvent<T> e)
          Called whenever the adding of a CatalogItem was rolled back.
 void rolledbackRemoveCatalogItem(CatalogChangeEvent<T> e)
          Called whenever the removal of a CatalogItem was rolled back.
 
Methods inherited from interface org.salespointframework.core.data.events.DatasourceChangeListener
DatasourceChanged
 

Method Detail

addedCatalogItem

void addedCatalogItem(CatalogChangeEvent<T> e)
Called whenever a CatalogItem was added to the Catalog.

Parameters:
e - an event object describing the event.

commitedAddCatalogItem

void commitedAddCatalogItem(CatalogChangeEvent<T> e)
Called whenever the adding of a CatalogItem was commited.

Parameters:
e - an event object describing the event.

rolledbackAddCatalogItem

void rolledbackAddCatalogItem(CatalogChangeEvent<T> e)
Called whenever the adding of a CatalogItem was rolled back.

Parameters:
e - an event object describing the event.

canRemoveCatalogItem

void canRemoveCatalogItem(CatalogChangeEvent<T> 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.

Parameters:
e - an event object describing the event.
Throws:
VetoException - if the listener wants to veto the removal.

noRemoveCatalogItem

void noRemoveCatalogItem(CatalogChangeEvent<T> e)
Called for each listener that already agreed with a removal that was then rejected by another listener.

Parameters:
e - an event object describing the event.

removedCatalogItem

void removedCatalogItem(CatalogChangeEvent<T> e)
Called whenever a CatalogItem was removed from the Catalog.

Parameters:
e - an event object describing the event.

commitedRemoveCatalogItem

void commitedRemoveCatalogItem(CatalogChangeEvent<T> e)
Called whenever the removal of a CatalogItem was commited.

Parameters:
e - an event object describing the event.

rolledbackRemoveCatalogItem

void rolledbackRemoveCatalogItem(CatalogChangeEvent<T> e)
Called whenever the removal of a CatalogItem was rolled back.

Parameters:
e - an event object describing the event.

canEditCatalogItem

void canEditCatalogItem(CatalogChangeEvent<T> 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.

Parameters:
e - an event object describing the event.
Throws:
VetoException - if the listener wants to veto the editing.

noEditCatalogItem

void noEditCatalogItem(CatalogChangeEvent<T> e)
z Called for each listener that already agreed with an editing that was then rejected by another listener.

Parameters:
e - an event object describing the event.

editingCatalogItem

void editingCatalogItem(CatalogChangeEvent<T> 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.

Parameters:
e - an event object describing the event.

commitEditCatalogItem

void commitEditCatalogItem(CatalogChangeEvent<T> e)
Called whenever editing a CatalogItem was commited.

Parameters:
e - an event object describing the event.

rollbackEditCatalogItem

void rollbackEditCatalogItem(CatalogChangeEvent<T> e)
Called whenever editing a CatalogItem was rolled back.

Parameters:
e - an event object describing the event.