Class DefaultSapCartFacade

java.lang.Object
de.hybris.platform.commercefacades.order.impl.DefaultCartFacade
de.hybris.platform.sap.sapordermgmtb2bfacades.order.impl.DefaultSapCartFacade
All Implemented Interfaces:
de.hybris.platform.commercefacades.order.CartFacade

public class DefaultSapCartFacade extends de.hybris.platform.commercefacades.order.impl.DefaultCartFacade
Implementation for CartFacade. Delivers main functionality for cart.
  • Constructor Details

    • DefaultSapCartFacade

      public DefaultSapCartFacade()
  • Method Details

    • getI18nService

      public de.hybris.platform.servicelayer.i18n.I18NService getI18nService()
      Returns:
      the i18nService
    • setI18nService

      public void setI18nService(de.hybris.platform.servicelayer.i18n.I18NService i18nService)
      Parameters:
      i18nService - the i18nService to set
    • getMessageSource

      public org.springframework.context.MessageSource getMessageSource()
      Returns:
      the messageSource
    • setMessageSource

      public void setMessageSource(org.springframework.context.MessageSource messageSource)
      Parameters:
      messageSource - the messageSource to set
    • hasSessionCart

      public boolean hasSessionCart()
      Specified by:
      hasSessionCart in interface de.hybris.platform.commercefacades.order.CartFacade
      Overrides:
      hasSessionCart in class de.hybris.platform.commercefacades.order.impl.DefaultCartFacade
    • getMiniCart

      public CartData getMiniCart()
      Specified by:
      getMiniCart in interface de.hybris.platform.commercefacades.order.CartFacade
      Overrides:
      getMiniCart in class de.hybris.platform.commercefacades.order.impl.DefaultCartFacade
    • getSessionCart

      public CartData getSessionCart()
      Specified by:
      getSessionCart in interface de.hybris.platform.commercefacades.order.CartFacade
      Overrides:
      getSessionCart in class de.hybris.platform.commercefacades.order.impl.DefaultCartFacade
    • getSessionCartWithEntryOrdering

      public CartData getSessionCartWithEntryOrdering(boolean recentlyAddedFirst)
      Specified by:
      getSessionCartWithEntryOrdering in interface de.hybris.platform.commercefacades.order.CartFacade
      Overrides:
      getSessionCartWithEntryOrdering in class de.hybris.platform.commercefacades.order.impl.DefaultCartFacade
    • addToCart

      public CartModificationData addToCart(String code, long quantity) throws de.hybris.platform.commerceservices.order.CommerceCartModificationException
      Specified by:
      addToCart in interface de.hybris.platform.commercefacades.order.CartFacade
      Overrides:
      addToCart in class de.hybris.platform.commercefacades.order.impl.DefaultCartFacade
      Throws:
      de.hybris.platform.commerceservices.order.CommerceCartModificationException
    • addToCart

      public CartModificationData addToCart(String code, long quantity, String storeId) throws de.hybris.platform.commerceservices.order.CommerceCartModificationException
      Specified by:
      addToCart in interface de.hybris.platform.commercefacades.order.CartFacade
      Overrides:
      addToCart in class de.hybris.platform.commercefacades.order.impl.DefaultCartFacade
      Throws:
      de.hybris.platform.commerceservices.order.CommerceCartModificationException
    • addItemsToCart

      public List<CartModificationData> addItemsToCart(List<OrderEntryData> cartEntries) throws de.hybris.platform.commerceservices.order.CommerceCartModificationException
      Add quick order entries to cart
      Parameters:
      cartEntries - list of cart entries
      Returns:
      cart modification data
      Throws:
      de.hybris.platform.commerceservices.order.CommerceCartModificationException - exception
    • validateCartData

      public List<CartModificationData> validateCartData() throws de.hybris.platform.commerceservices.order.CommerceCartModificationException
      Specified by:
      validateCartData in interface de.hybris.platform.commercefacades.order.CartFacade
      Overrides:
      validateCartData in class de.hybris.platform.commercefacades.order.impl.DefaultCartFacade
      Throws:
      de.hybris.platform.commerceservices.order.CommerceCartModificationException
    • updateCartEntry

      public CartModificationData updateCartEntry(long entryNumber, long quantity) throws de.hybris.platform.commerceservices.order.CommerceCartModificationException
      Specified by:
      updateCartEntry in interface de.hybris.platform.commercefacades.order.CartFacade
      Overrides:
      updateCartEntry in class de.hybris.platform.commercefacades.order.impl.DefaultCartFacade
      Throws:
      de.hybris.platform.commerceservices.order.CommerceCartModificationException
    • isSyncOrdermgmtEnabled

      protected boolean isSyncOrdermgmtEnabled()
    • getBaseStoreService

      public de.hybris.platform.store.services.BaseStoreService getBaseStoreService()
      Returns:
      the baseStoreService
    • setBaseStoreService

      public void setBaseStoreService(de.hybris.platform.store.services.BaseStoreService baseStoreService)
      Parameters:
      baseStoreService - the baseStoreService to set
    • getSapCartService

      public CartService getSapCartService()
      Returns:
      the sapCartService
    • setSapCartService

      public void setSapCartService(CartService sapCartService)
      Parameters:
      sapCartService - the sapCartService to set
    • getBackendAvailabilityService

      public BackendAvailabilityService getBackendAvailabilityService()
      Returns:
      the backendAvailabilityService
    • setBackendAvailabilityService

      public void setBackendAvailabilityService(BackendAvailabilityService backendAvailabilityService)
      Parameters:
      backendAvailabilityService - the backendAvailabilityService to set
    • getProductImageHelper

      public ProductImageHelper getProductImageHelper()
      Returns:
      the productImageHelper
    • setProductImageHelper

      public void setProductImageHelper(ProductImageHelper productImageHelper)
      Parameters:
      productImageHelper - the productImageHelper to set
    • getCartRestorationFacade

      public CartRestorationFacade getCartRestorationFacade()
      Returns:
      the cartRestorationFacade
    • setCartRestorationFacade

      public void setCartRestorationFacade(CartRestorationFacade cartRestorationFacade)
      Parameters:
      cartRestorationFacade - the cartRestorationFacade to set
    • updateCartEntry

      public CartModificationData updateCartEntry(long entryNumber, String storeId) throws de.hybris.platform.commerceservices.order.CommerceCartModificationException
      Specified by:
      updateCartEntry in interface de.hybris.platform.commercefacades.order.CartFacade
      Overrides:
      updateCartEntry in class de.hybris.platform.commercefacades.order.impl.DefaultCartFacade
      Throws:
      de.hybris.platform.commerceservices.order.CommerceCartModificationException
    • restoreSavedCart

      public CartRestorationData restoreSavedCart(String code) throws de.hybris.platform.commerceservices.order.CommerceCartRestorationException
      Specified by:
      restoreSavedCart in interface de.hybris.platform.commercefacades.order.CartFacade
      Overrides:
      restoreSavedCart in class de.hybris.platform.commercefacades.order.impl.DefaultCartFacade
      Throws:
      de.hybris.platform.commerceservices.order.CommerceCartRestorationException
    • getDeliveryCountries

      public List<CountryData> getDeliveryCountries()
      Specified by:
      getDeliveryCountries in interface de.hybris.platform.commercefacades.order.CartFacade
      Overrides:
      getDeliveryCountries in class de.hybris.platform.commercefacades.order.impl.DefaultCartFacade
    • estimateExternalTaxes

      public CartData estimateExternalTaxes(String deliveryZipCode, String countryIsoCode)
      Specified by:
      estimateExternalTaxes in interface de.hybris.platform.commercefacades.order.CartFacade
      Overrides:
      estimateExternalTaxes in class de.hybris.platform.commercefacades.order.impl.DefaultCartFacade
    • removeStaleCarts

      public void removeStaleCarts()
      Specified by:
      removeStaleCarts in interface de.hybris.platform.commercefacades.order.CartFacade
      Overrides:
      removeStaleCarts in class de.hybris.platform.commercefacades.order.impl.DefaultCartFacade
    • restoreAnonymousCartAndTakeOwnership

      public CartRestorationData restoreAnonymousCartAndTakeOwnership(String guid) throws de.hybris.platform.commerceservices.order.CommerceCartRestorationException
      Specified by:
      restoreAnonymousCartAndTakeOwnership in interface de.hybris.platform.commercefacades.order.CartFacade
      Overrides:
      restoreAnonymousCartAndTakeOwnership in class de.hybris.platform.commercefacades.order.impl.DefaultCartFacade
      Throws:
      de.hybris.platform.commerceservices.order.CommerceCartRestorationException
    • removeSessionCart

      public void removeSessionCart()
      Specified by:
      removeSessionCart in interface de.hybris.platform.commercefacades.order.CartFacade
      Overrides:
      removeSessionCart in class de.hybris.platform.commercefacades.order.impl.DefaultCartFacade
    • getCartsForCurrentUser

      public List<CartData> getCartsForCurrentUser()
      Specified by:
      getCartsForCurrentUser in interface de.hybris.platform.commercefacades.order.CartFacade
      Overrides:
      getCartsForCurrentUser in class de.hybris.platform.commercefacades.order.impl.DefaultCartFacade
    • restoreAnonymousCartAndMerge

      public CartRestorationData restoreAnonymousCartAndMerge(String fromAnonumousCartGuid, String toUserCartGuid) throws de.hybris.platform.commerceservices.order.CommerceCartMergingException, de.hybris.platform.commerceservices.order.CommerceCartRestorationException
      Specified by:
      restoreAnonymousCartAndMerge in interface de.hybris.platform.commercefacades.order.CartFacade
      Overrides:
      restoreAnonymousCartAndMerge in class de.hybris.platform.commercefacades.order.impl.DefaultCartFacade
      Throws:
      de.hybris.platform.commerceservices.order.CommerceCartMergingException
      de.hybris.platform.commerceservices.order.CommerceCartRestorationException
    • restoreCartAndMerge

      public CartRestorationData restoreCartAndMerge(String fromUserCartGuid, String toUserCartGuid) throws de.hybris.platform.commerceservices.order.CommerceCartRestorationException, de.hybris.platform.commerceservices.order.CommerceCartMergingException
      Specified by:
      restoreCartAndMerge in interface de.hybris.platform.commercefacades.order.CartFacade
      Overrides:
      restoreCartAndMerge in class de.hybris.platform.commercefacades.order.impl.DefaultCartFacade
      Throws:
      de.hybris.platform.commerceservices.order.CommerceCartRestorationException
      de.hybris.platform.commerceservices.order.CommerceCartMergingException
    • hasEntries

      public boolean hasEntries()
      Specified by:
      hasEntries in interface de.hybris.platform.commercefacades.order.CartFacade
      Overrides:
      hasEntries in class de.hybris.platform.commercefacades.order.impl.DefaultCartFacade
    • getSapCartFacadeHooks

      public List<SapCartFacadeHook> getSapCartFacadeHooks()
      Returns:
      the sapCartFacadeHooks
    • setSapCartFacadeHooks

      public void setSapCartFacadeHooks(List<SapCartFacadeHook> sapCartFacadeHooks)
      Parameters:
      sapCartFacadeHooks - the sapCartFacadeHooks to set
    • getSessionService

      public de.hybris.platform.servicelayer.session.SessionService getSessionService()
      Overrides:
      getSessionService in class de.hybris.platform.commercefacades.order.impl.DefaultCartFacade
      Returns:
      the sessionService
    • setSessionService

      public void setSessionService(de.hybris.platform.servicelayer.session.SessionService sessionService)
      Overrides:
      setSessionService in class de.hybris.platform.commercefacades.order.impl.DefaultCartFacade
      Parameters:
      sessionService - the sessionService to set