apps.basketapp.client
Class Basket

java.lang.Object
  extended by apps.basketapp.client.Basket

public class Basket
extends java.lang.Object

The Class Basket.


Nested Class Summary
static interface Basket.BasketListener
          The listener interface for receiving basket events.
static class Basket.STATUS
          The Enum STATUS.
 
Constructor Summary
Basket(ContentSystem contentSystem, TableIdentity tableId)
          Instantiates a new basket.
 
Method Summary
 void addBasketListener(Basket.BasketListener listener)
          Adds the basket listener.
 boolean addItem(ContentItem basketItem)
          Adds the item.
 void addItems(java.util.List<ContentItem> items)
          Adds the items.
 void clear()
          Clear.
 boolean containsItem(ContentItem item)
          Contains item.
 boolean detachItem(ContentItem item)
          Detach item.
 void detachItems(java.util.List<ContentItem> items)
          Detach items.
 java.util.List<ContentItem> getItems()
          Gets the items.
 TableIdentity getTableId()
          Gets the table id.
 Window getWindow()
          Gets the window.
 void removeBasketListener(Basket.BasketListener listener)
          Removes the basket listener.
 void setStatus(Basket.STATUS status)
          Sets the status.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Basket

public Basket(ContentSystem contentSystem,
              TableIdentity tableId)
Instantiates a new basket.

Parameters:
contentSystem - the content system
tableId - the table id
Method Detail

addBasketListener

public void addBasketListener(Basket.BasketListener listener)
Adds the basket listener.

Parameters:
listener - the listener

addItem

public boolean addItem(ContentItem basketItem)
Adds the item.

Parameters:
basketItem - the basket item
Returns:
true, if successful

addItems

public void addItems(java.util.List<ContentItem> items)
Adds the items.

Parameters:
items - the items

clear

public void clear()
Clear.


containsItem

public boolean containsItem(ContentItem item)
Contains item.

Parameters:
item - the item
Returns:
true, if successful

detachItem

public boolean detachItem(ContentItem item)
Detach item.

Parameters:
item - the item
Returns:
true, if successful

detachItems

public void detachItems(java.util.List<ContentItem> items)
Detach items.

Parameters:
items - the items

getItems

public java.util.List<ContentItem> getItems()
Gets the items.

Returns:
the items

getTableId

public TableIdentity getTableId()
Gets the table id.

Returns:
the table id

getWindow

public Window getWindow()
Gets the window.

Returns:
the window

removeBasketListener

public void removeBasketListener(Basket.BasketListener listener)
Removes the basket listener.

Parameters:
listener - the listener

setStatus

public void setStatus(Basket.STATUS status)
Sets the status.

Parameters:
status - the new status