market
Class SSListenable
java.lang.Object
|
+--data.AbstractNameable
|
+--data.ooimpl.StockItemImpl
|
+--data.ooimpl.StockImpl
|
+--data.ooimpl.StoringStockImpl
|
+--market.SSListenable
- All Implemented Interfaces:
- Cloneable, Comparable, DataBasketEntryDestination, DataBasketEntrySource, DataBasketKeys, ListenableStock, Nameable, NameContext, SelfManagingDBEDestination, SelfManagingDBESource, Serializable, Stock, StockItem, StoringStock
- public class SSListenable
- extends StoringStockImpl
A StoringStock that can be used as a queue for tills and warehouse,
uses SICustomers as StockItems and handles offer-events on it.
- See Also:
- Serialized Form
| Methods inherited from class data.ooimpl.StoringStockImpl |
commitAdd, countItems, createPeer, fillShallowClone, get, internalSetCatalog, remove, remove, rollbackAdd, rollbackRemove, setStock |
| Methods inherited from class data.ooimpl.StockImpl |
addStock, addStockChangeListener, checkNameChange, clone, compareTo, contains, contains, containsStock, fillStockWithValue, fireCanEditStockItems, fireCanRemoveStockItems, fireEditingStockItems, fireStockItemsAddCommit, fireStockItemsAdded, fireStockItemsAddRollback, fireStockItemsEditCommit, fireStockItemsEditRollback, fireStockItemsRemoveCommit, fireStockItemsRemoved, fireStockItemsRemoveRollback, getCatalog, getEditingItemsContainer, getItemsContainer, getItemsLock, getNCMonitor, getRefIntegrEditContainer, getRefIntegrItemsContainer, getShallowClone, getTemporaryAddedItemsContainer, getTemporaryRemovedItemsContainer, iterator, keySet, nameHasChanged, prepareReferentialIntegrity, removeStockChangeListener, setEditingItemsContainer, setItemsContainer, setRefIntegrEditContainer, setRefIntegrItemsContainer, setTemporaryAddedItemsContainer, setTemporaryRemovedItemsContainer, size, sumStock |
SSListenable
public SSListenable(String sName,
CatalogImpl ciRef)
- Parameters:
sName - the name of the new Stock.ciRef - the Catalog that is being referenced by the Stock.
addEventListener
public void addEventListener(OfferEventListener e)
- Adds an OfferEventListener to the array of listeners.
- Parameters:
e - the OfferEventListener that will be added.
removeEventListener
public void removeEventListener(OfferEventListener e)
- Removes an OfferEventListener from the array of listeners.
- Parameters:
e - the OfferEventListener that will be removed.
fireOfferIsEmpty
public void fireOfferIsEmpty(String articleKey)
- Fires an event to all listeners: this article is empty.
- Parameters:
articleKey - the key of the unavaible article.
fireWakeUpOrders
public void fireWakeUpOrders()
- Fires an event to all listeners: a delivery arrived at the market.
fireCountArticles
public void fireCountArticles(String articleKey,
SProcessWorker spw)
- Fires an event to all listeners: count this article.
- Parameters:
articleKey - the key of the article to count.spw - the SProcessWorker which has sended the request.
add
public void add(StockItem si,
DataBasket db)
- Adds a StockItem to this Stock, and adds it to the array of listeners,
if it`s a SICustomer.
- Specified by:
add in interface Stock- Overrides:
add in class StoringStockImpl
- Parameters:
si - the item to be added.db - the DataBasket relative to which the item will be added.
commitRemove
public void commitRemove(DataBasket db,
DataBasketEntry dbe)
- Commit the removal of a StockItem, removes it from the array of listeners.
- Specified by:
commitRemove in interface SelfManagingDBESource- Overrides:
commitRemove in class StoringStockImpl