Interface CartRestorationService

  • All Known Implementing Classes:
    DefaultCartRestorationService

    public interface CartRestorationService
    Service needed to access the standard session cart (basing on the hybris persistence) and to create a BOL cart from a standard session cart.
    • Method Detail

      • getInternalSessionCart

        CartModel getInternalSessionCart()
        Returns the standard session cart, basing on the hybris persistence
        Returns:
        hybris cart model
      • setInternalSessionCart

        void setInternalSessionCart​(CartModel cart)
        Sets session cart (stores it into the session)
        Parameters:
        cart -
      • hasInternalSessionCart

        boolean hasInternalSessionCart()
        Does a standard session cart exist?
        Returns:
        true if a hybris session cart exists
      • removeInternalSessionCart

        void removeInternalSessionCart()
        Removes the internal session cart, basing on the hybris persistence
      • restoreCart

        CartRestorationData restoreCart​(CartModel fromCart)
        Restores a BOL cart from the persisted standard session cart
        Parameters:
        fromCart - Session cart in hybris persistence
        Returns:
        Restorated cart, basing on the BOL cart