Interface CartRestorationFacade

All Known Implementing Classes:
DefaultCartRestorationFacade

public interface CartRestorationFacade
Used to write a minimal representation of the cart into the hybris persistence, and to restore it from there
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    If existing the saved cart will be removed
    restoreSavedCart(String guid, UserModel currentUser)
    Restores current users's saved cart from the hybris persistence layer
    void
    By each interaction with the cart e.g add product, edit product, the persisted cart is reconstructed from the backend cart.
  • Method Details

    • restoreSavedCart

      CartRestorationData restoreSavedCart(String guid, UserModel currentUser) throws de.hybris.platform.commerceservices.order.CommerceCartRestorationException
      Restores current users's saved cart from the hybris persistence layer
      Parameters:
      guid - of the saved cart
      currentUser - is the user which is currently logged in
      Returns:
      the restoration data needed by the calling facade
      Throws:
      de.hybris.platform.commerceservices.order.CommerceCartRestorationException - exception.
    • removeSavedCart

      void removeSavedCart()
      If existing the saved cart will be removed
    • setSavedCart

      void setSavedCart(CartData newCart) throws de.hybris.platform.commerceservices.order.CommerceCartModificationException
      By each interaction with the cart e.g add product, edit product, the persisted cart is reconstructed from the backend cart.
      Parameters:
      newCart - to be used further on
      Throws:
      de.hybris.platform.commerceservices.order.CommerceCartModificationException