SalesPoint v3.3 API

data.events
Interface StockChangeListener<T extends StockItem,CT extends CatalogItem>

All Superinterfaces:
EventListener
All Known Implementing Classes:
AbstractStockFilter, CountingStockFilter, CountingStockTableModel, MoneyBagFilter, StockChangeAdapter, StoringStockFilter, StoringStockTableModel

public interface StockChangeListener<T extends StockItem,CT extends CatalogItem>
extends EventListener

Listener listening for StockChangeEvents.

Since:
v2.0
Author:
Steffen Zschaler

Method Summary
 void addedStockItems(StockChangeEvent<T,CT> e)
          Called whenever StockItems were added to the Stock.
 void canEditStockItems(StockChangeEvent<T,CT> e)
          Called to ask whether certain StockItems may be edited.
 void canRemoveStockItems(StockChangeEvent<T,CT> e)
          Called to ask whether certain StockItems may be removed.
 void commitAddStockItems(StockChangeEvent<T,CT> e)
          Called whenever the adding of StockItems was commited.
 void commitEditStockItems(StockChangeEvent<T,CT> e)
          Called whenever the editing of StockItems was commited.
 void commitRemoveStockItems(StockChangeEvent<T,CT> e)
          Called whenever the removal of StockItems was commited.
 void editingStockItems(StockChangeEvent<T,CT> e)
          Called whenever the Stock began editing StockItems.
 void noEditStockItems(StockChangeEvent<T,CT> e)
          Called for each listener that already agreed with an editing that was then rejected by another listener.
 void noRemoveStockItems(StockChangeEvent<T,CT> e)
          Called for each listener that already agreed with a removal that was then rejected by another listener.
 void removedStockItems(StockChangeEvent<T,CT> e)
          Called whenever StockItems were removed from the Stock.
 void rollbackAddStockItems(StockChangeEvent<T,CT> e)
          Called whenever the adding of StockItems was rolled back.
 void rollbackEditStockItems(StockChangeEvent<T,CT> e)
          Called whenever the editing of StockItems was rolled back.
 void rollbackRemoveStockItems(StockChangeEvent<T,CT> e)
          Called whenever the removal of StockItems was rolled back.
 

Method Detail

addedStockItems

void addedStockItems(StockChangeEvent<T,CT> e)
Called whenever StockItems were added to the Stock.

Parameters:
e - an event object describing the event.
Override:
Always

commitAddStockItems

void commitAddStockItems(StockChangeEvent<T,CT> e)
Called whenever the adding of StockItems was commited.

Parameters:
e - an event object describing the event.
Override:
Always

rollbackAddStockItems

void rollbackAddStockItems(StockChangeEvent<T,CT> e)
Called whenever the adding of StockItems was rolled back.

Parameters:
e - an event object describing the event.
Override:
Always

canRemoveStockItems

void canRemoveStockItems(StockChangeEvent<T,CT> e)
                         throws VetoException
Called to ask whether certain StockItems may be removed. If one of the listeners vetos the removal, all listeners that had already been asked will receive a noRemoveStockItems event.

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

noRemoveStockItems

void noRemoveStockItems(StockChangeEvent<T,CT> 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.
Override:
Always

removedStockItems

void removedStockItems(StockChangeEvent<T,CT> e)
Called whenever StockItems were removed from the Stock.

Parameters:
e - an event object describing the event.
Override:
Always

commitRemoveStockItems

void commitRemoveStockItems(StockChangeEvent<T,CT> e)
Called whenever the removal of StockItems was commited.

Parameters:
e - an event object describing the event.
Override:
Always

rollbackRemoveStockItems

void rollbackRemoveStockItems(StockChangeEvent<T,CT> e)
Called whenever the removal of StockItems was rolled back.

Parameters:
e - an event object describing the event.
Override:
Always

canEditStockItems

void canEditStockItems(StockChangeEvent<T,CT> e)
                       throws VetoException
Called to ask whether certain StockItems may be edited. If one of the listeners vetos the editing, all listeners that had already been asked will receive a noEditStockItems event.

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

noEditStockItems

void noEditStockItems(StockChangeEvent<T,CT> e)
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.
Override:
Always

editingStockItems

void editingStockItems(StockChangeEvent<T,CT> e)
Called whenever the Stock began editing StockItems. This event may be accompanied by a removedStockItems and a addedStockItems event, but this is implementation specific.

Parameters:
e - an event object describing the event.
Override:
Always

commitEditStockItems

void commitEditStockItems(StockChangeEvent<T,CT> e)
Called whenever the editing of StockItems was commited.

Parameters:
e - an event object describing the event.
Override:
Always

rollbackEditStockItems

void rollbackEditStockItems(StockChangeEvent<T,CT> e)
Called whenever the editing of StockItems was rolled back.

Parameters:
e - an event object describing the event.
Override:
Always

SalesPoint v3.3 API