Videoautomat

videoautomat
Class StockChangeLogger

java.lang.Object
  extended by StockChangeAdapter
      extended by videoautomat.StockChangeLogger

public class StockChangeLogger
extends StockChangeAdapter

This class implements a StockChangeListener, which reacts to changes on AutomatUser.getVideoStock(). It writes such events as rent or give back event to the global logfile.


Constructor Summary
StockChangeLogger(String user_ID)
          Constructs a new StockChangeLogger
 
Method Summary
 void commitAddStockItems(StockChangeEvent event)
          Called whenever the adding of StockItems was commited.
 void commitRemoveStockItems(StockChangeEvent event)
          Called whenever the removing of StockItems was commited.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StockChangeLogger

public StockChangeLogger(String user_ID)
Constructs a new StockChangeLogger

Parameters:
user_ID - the ID of the owner of the stock this listener should be add to
Method Detail

commitAddStockItems

public void commitAddStockItems(StockChangeEvent event)
Called whenever the adding of StockItems was commited. Logs it as a rent-event.

See Also:
data.events.StockChangeListener#commitAddStockItems(data.events.StockChangeEvent)

commitRemoveStockItems

public void commitRemoveStockItems(StockChangeEvent event)
Called whenever the removing of StockItems was commited. Logs it as a hand back-event.

See Also:
data.events.StockChangeListener#commitRemoveStockItems(data.events.StockChangeEvent)

Videoautomat