Class DefaultCheckoutService

java.lang.Object
de.hybris.platform.sap.sapordermgmtservices.cart.impl.DefaultCartCheckoutBaseService
de.hybris.platform.sap.sapordermgmtservices.checkout.impl.DefaultCheckoutService
All Implemented Interfaces:
CartCheckoutBaseService, CheckoutService

public class DefaultCheckoutService extends DefaultCartCheckoutBaseService implements CheckoutService
Default service implementation for checkout with SAP Synchronous Order Management.
The class synchronizes accesses to the BOL object representing the cart, as this is not thread safe. Multi-threaded accesses can happen although we use request sequencing, since also filters might call cart facades.
  • Constructor Details

    • DefaultCheckoutService

      public DefaultCheckoutService()
  • Method Details

    • getDeliveryModeConverter

      public de.hybris.platform.servicelayer.dto.converter.Converter<Map.Entry<String,String>,DeliveryModeData> getDeliveryModeConverter()
      Returns:
      The converter for mapping the BOL representation of the delivery mode into the format needed for facade layer
    • setDeliveryModeConverter

      public void setDeliveryModeConverter(de.hybris.platform.servicelayer.dto.converter.Converter<Map.Entry<String,String>,DeliveryModeData> deliveryModeConverter)
      Parameters:
      deliveryModeConverter - The converter for mapping the BOL representation of the delivery mode into the format needed for the facade layer
    • placeOrder

      public OrderData placeOrder()
      Description copied from interface: CheckoutService
      Submits an order from the current session cart which is held in the SAP back end.
      Specified by:
      placeOrder in interface CheckoutService
      Returns:
      The order that has been persisted in the SAP back end
    • getOrderModelfromOrderData

      protected OrderModel getOrderModelfromOrderData(OrderData orderData)
      Parameters:
      orderData -
      Returns:
      orderModel converted order Model from the passed order Data
    • populateEntryMetrics

      protected void populateEntryMetrics(OrderEntryData e, AbstractOrderEntryModel model)
      Parameters:
      e -
      model -
      orderData -
    • getOrderConverter

      public de.hybris.platform.servicelayer.dto.converter.Converter<Order,OrderData> getOrderConverter()
      Returns:
      The converter we need to map the BOL representation of an order into the format needed in the facade layer
    • setOrderConverter

      public void setOrderConverter(de.hybris.platform.servicelayer.dto.converter.Converter<Order,OrderData> orderConverter)
      Parameters:
      orderConverter - The converter we need to map the BOL representation of an order into the format needed in the facade layer
    • getSupportedDeliveryModes

      public List<DeliveryModeData> getSupportedDeliveryModes()
      Description copied from interface: CheckoutService
      Retrieving delivery modes from SAP back end. In SAP terminology, this is mostly referred to as 'Shipping Condition'
      Specified by:
      getSupportedDeliveryModes in interface CheckoutService
      Returns:
      The list of available delivery modes. These are read from the SAP back end.
    • setDeliveryMode

      public boolean setDeliveryMode(String deliveryModeCode)
      Description copied from interface: CheckoutService
      Sets a delivery mode code into the current session cart which is held in SD, and updates the cart afterwards as prices can change.
      Specified by:
      setDeliveryMode in interface CheckoutService
      Parameters:
      deliveryModeCode - The new delivery mode code. Named 'Shipping condition' in SAP back end terms.
      Returns:
      Has this action been performed successfully?
    • getCurrentDeliveryMode

      public String getCurrentDeliveryMode()
      Returns:
      Current delivery mode from BOL header object
    • setPurchaseOrderNumber

      public boolean setPurchaseOrderNumber(String purchaseOrderNumber)
      Description copied from interface: CheckoutService
      Sets the purchase order number into the current session cart which is held in SD, and updates the cart afterwards.
      Specified by:
      setPurchaseOrderNumber in interface CheckoutService
      Parameters:
      purchaseOrderNumber - Purchase order number
      Returns:
      Has this action been performed successfully?
    • getBolOrderFacade

      public BolOrderFacade getBolOrderFacade()
      Returns:
      the bolOrderFacade
    • setBolOrderFacade

      public void setBolOrderFacade(BolOrderFacade bolOrderFacade)
      Parameters:
      bolOrderFacade - the bolOrderFacade to set
    • setDeliveryAddress

      public boolean setDeliveryAddress(String sapCustomerId)
      Description copied from interface: CheckoutService
      Sets current delivery address. It's not possible to set a document specific address, instead the ID of a valid ship-to party needs to be passed.
      Specified by:
      setDeliveryAddress in interface CheckoutService
      Parameters:
      sapCustomerId - Technical key of an back end ship-to party, typically with length 10
      Returns:
      Did it succeed?
    • setCartRestorationService

      public void setCartRestorationService(CartRestorationService cartRestorationService)
      Parameters:
      cartRestorationService - the cartRestorationService to set
    • updateCheckoutCart

      public CartData updateCheckoutCart(CartData cartData)
      Description copied from interface: CheckoutService
      Update the checkout cart quantity,
      Specified by:
      updateCheckoutCart in interface CheckoutService
      Parameters:
      cartData - Cartdata values
      Returns:
      cartData after update.
    • getSapPartnerService

      public SapPartnerService getSapPartnerService()
      Returns:
      the sapPartnerService
    • setSapPartnerService

      public void setSapPartnerService(SapPartnerService sapPartnerService)
      Parameters:
      sapPartnerService - the sapPartnerService to set
    • getProductService

      protected de.hybris.platform.product.ProductService getProductService()
    • setProductService

      public void setProductService(de.hybris.platform.product.ProductService productService)