All Superinterfaces:
BusinessObject, Iterable<Item>, MessageListHolder, SalesDocument, SalesDocumentBase<ItemList,Item,Header>, Serializable, SimpleDocument<ItemList,Item,Header>
All Known Implementing Classes:
BasketImpl

public interface Basket extends SalesDocument
Business object representation of a basket.
The basket extends the SalesDocument business object.
There will be always exactly one basket per session. Depending on the back end a login may be required to access the basket.
See Also:
  • Method Details

    • setBasketOrderConsistency

      void setBasketOrderConsistency(BasketOrderConsistency basketOrderConsistency)
      Injects the basketOrderConsisteny into the basket
      Parameters:
      basketOrderConsistency - consistency manager
    • read

      void read(boolean force) throws CommunicationException
      Reads the sales document. The back-end call happens if considered as necessary or if forced. The method also checks the BasketOrderConsistency and can trigger an update before the read happens.
      Specified by:
      read in interface SalesDocument
      Parameters:
      force - If true, then read even if not considered as necessary
      Throws:
      CommunicationException - in case back-end error
    • calculateTotalQuantity

      BigDecimal calculateTotalQuantity()
      Returns:
      the total quantity of the products in basket
    • release

      void release() throws CommunicationException
      Releases cart object. Afterwards, cart is fully initialized
      Throws:
      CommunicationException