All Known Subinterfaces:
B2BCartFacade
All Known Implementing Classes:
DefaultB2BCartFacade, DefaultCartFacade

public interface CartFacade
Defines an API for cart manipulation, responsible for managing entries for cart.
  • Method Details

    • addOrderEntry

      Method for adding a product to cart.
      Parameters:
      cartEntry - the cart entry with the new product to add..
      Returns:
      the cart modification data that includes a statusCode and the actual quantity added to the cart
      Throws:
      EntityValidationException - if the validation fails.
    • updateOrderEntry

      Method for updating the number of products.
      Parameters:
      cartEntry - the cart entry with the new value of quantity for product.
      Returns:
      the cart modification data that includes a statusCode and the actual quantity that the entry was updated to
      Throws:
      EntityValidationException - if the validation fails.
    • addOrderEntryList

      List<CartModificationData> addOrderEntryList(List<OrderEntryData> cartEntries)
      Method for adding a product to cart.
      Parameters:
      cartEntries - the cart entries with the new products to add.
      Returns:
      the cart modification data that includes a statusCode and the actual quantity added to the cart
    • updateOrderEntryList

      List<CartModificationData> updateOrderEntryList(List<OrderEntryData> cartEntries)
      Method for updating a list of products in the cart.
      Parameters:
      cartEntries - the cart entries with the new products to add.
      Returns:
      the cart modification data that includes a statusCode and the actual quantity added to the cart
    • update

      CartData update(CartData cartData)
      Updates the information in the cart based on the content of the cartData
      Parameters:
      cartData - the cart to modify and it's modifications.
      Returns:
      the updated cart.
    • getCurrentCart

      CartData getCurrentCart()
      This gets the current cart.
      Returns:
      the current cart.
    • validateCurrentCartData

      Method for validating every entry in the cart
      Returns:
      a list of cart modifications that includes a statusCode and the actual quantity that the entry was updated to
      Throws:
      CommerceCartModificationException - if the cart cannot be modified
    • removeSessionCart

      void removeSessionCart()
      If existing the current session cart is being detached from this session and removed. Afterwards it's no longer available.