Class DefaultCartCheckoutBaseService

java.lang.Object
de.hybris.platform.sap.sapordermgmtservices.cart.impl.DefaultCartCheckoutBaseService
All Implemented Interfaces:
CartCheckoutBaseService
Direct Known Subclasses:
DefaultCartService, DefaultCheckoutService

public class DefaultCartCheckoutBaseService extends Object implements CartCheckoutBaseService
DefaultCartCheckout implementation i.e creating the session cart from the BOL cart representation etc
  • Constructor Details

    • DefaultCartCheckoutBaseService

      public DefaultCartCheckoutBaseService()
  • Method Details

    • getMessageSource

      public org.springframework.context.MessageSource getMessageSource()
    • setMessageSource

      public void setMessageSource(org.springframework.context.MessageSource messageSource)
    • getI18nService

      public de.hybris.platform.servicelayer.i18n.I18NService getI18nService()
    • setI18nService

      public void setI18nService(de.hybris.platform.servicelayer.i18n.I18NService i18nService)
    • getSessionCart

      public CartData getSessionCart()
      Description copied from interface: CartCheckoutBaseService
      Retrieves the session cart held in the SAP back end
      Specified by:
      getSessionCart in interface CartCheckoutBaseService
      Returns:
      Current session cart
    • compileSessionCart

      protected CartData compileSessionCart(boolean recentlyAddedFirst)
      Creates the session cart from the BOL cart representation, and returns it in hybris representation. In case the cart is not initialized yet (i.e. if no back end call has taken place), an empty hybris cart is returned.
      Parameters:
      recentlyAddedFirst -
      Returns:
      Cart in hybris format
    • getSessionCart

      public CartData getSessionCart(boolean recentlyAddedFirst)
      Description copied from interface: CartCheckoutBaseService
      Returns session cart, sorted in inverted order if required
      Specified by:
      getSessionCart in interface CartCheckoutBaseService
      Parameters:
      recentlyAddedFirst - If true, recently added items will be returned first (Standard sorting will be inverted)
      Returns:
      Session Cart
    • createEmptyCart

      protected CartData createEmptyCart()
      Creates an empty cart, just initializing the entry list
      Returns:
      Empty cart
    • hasSessionCart

      public boolean hasSessionCart()
      Description copied from interface: CartCheckoutBaseService
      Checks if a session cart exists held in the SAP back end
      Specified by:
      hasSessionCart in interface CartCheckoutBaseService
      Returns:
      Does the session cart exist?
    • removeSessionCart

      public void removeSessionCart()
      Description copied from interface: CartCheckoutBaseService
      Removes the existing session cart and releases the underlying LO-API session in SD. Afterwards, the cart is initial
      Specified by:
      removeSessionCart in interface CartCheckoutBaseService
    • reverseCartSorting

      protected void reverseCartSorting(Basket cart)
      Reverse the sorting of the ItemList of the Cart
      Parameters:
      cart - the Cart object
    • reverseCartSorting

      protected void reverseCartSorting(CartData cart)
      Reverse the sorting of the ItemList of the Cart
      Parameters:
      cart - the Cart object
    • getCartConverter

      public de.hybris.platform.servicelayer.dto.converter.Converter<Basket,CartData> getCartConverter()
      Returns:
      the cartConverter
    • setCartConverter

      public void setCartConverter(de.hybris.platform.servicelayer.dto.converter.Converter<Basket,CartData> cartConverter)
      Parameters:
      cartConverter - the cartConverter to set
    • getBolCartFacade

      public BolCartFacade getBolCartFacade()
      Returns:
      the bolCartFacade
    • setBolCartFacade

      public void setBolCartFacade(BolCartFacade bolCartFacade)
      Parameters:
      bolCartFacade - the bolCartFacade to set