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.
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionde.hybris.platform.servicelayer.dto.converter.Converter<Map.Entry<String,String>, DeliveryModeData> protected OrderModelgetOrderModelfromOrderData(OrderData orderData) protected de.hybris.platform.product.ProductServiceRetrieving delivery modes from SAP back end.Submits an order from the current session cart which is held in the SAP back end.protected voidvoidsetBolOrderFacade(BolOrderFacade bolOrderFacade) voidsetCartRestorationService(CartRestorationService cartRestorationService) booleansetDeliveryAddress(String sapCustomerId) Sets current delivery address.booleansetDeliveryMode(String deliveryModeCode) Sets a delivery mode code into the current session cart which is held in SD, and updates the cart afterwards as prices can change.voidsetDeliveryModeConverter(de.hybris.platform.servicelayer.dto.converter.Converter<Map.Entry<String, String>, DeliveryModeData> deliveryModeConverter) voidsetOrderConverter(de.hybris.platform.servicelayer.dto.converter.Converter<Order, OrderData> orderConverter) voidsetProductService(de.hybris.platform.product.ProductService productService) booleansetPurchaseOrderNumber(String purchaseOrderNumber) Sets the purchase order number into the current session cart which is held in SD, and updates the cart afterwards.voidsetSapPartnerService(SapPartnerService sapPartnerService) updateCheckoutCart(CartData cartData) Update the checkout cart quantity,Methods inherited from class de.hybris.platform.sap.sapordermgmtservices.cart.impl.DefaultCartCheckoutBaseService
compileSessionCart, createEmptyCart, getBolCartFacade, getCartConverter, getI18nService, getMessageSource, getSessionCart, getSessionCart, hasSessionCart, removeSessionCart, reverseCartSorting, reverseCartSorting, setBolCartFacade, setCartConverter, setI18nService, setMessageSourceMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface de.hybris.platform.sap.sapordermgmtservices.cart.CartCheckoutBaseService
getSessionCart, getSessionCart, hasSessionCart, removeSessionCart
-
Constructor Details
-
DefaultCheckoutService
public DefaultCheckoutService()
-
-
Method Details
-
getDeliveryModeConverter
public de.hybris.platform.servicelayer.dto.converter.Converter<Map.Entry<String,String>, getDeliveryModeConverter()DeliveryModeData> - 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
Description copied from interface:CheckoutServiceSubmits an order from the current session cart which is held in the SAP back end.- Specified by:
placeOrderin interfaceCheckoutService- Returns:
- The order that has been persisted in the SAP back end
-
getOrderModelfromOrderData
- Parameters:
orderData-- Returns:
- orderModel converted order Model from the passed order Data
-
populateEntryMetrics
- Parameters:
e-model-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
Description copied from interface:CheckoutServiceRetrieving delivery modes from SAP back end. In SAP terminology, this is mostly referred to as 'Shipping Condition'- Specified by:
getSupportedDeliveryModesin interfaceCheckoutService- Returns:
- The list of available delivery modes. These are read from the SAP back end.
-
setDeliveryMode
Description copied from interface:CheckoutServiceSets 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:
setDeliveryModein interfaceCheckoutService- Parameters:
deliveryModeCode- The new delivery mode code. Named 'Shipping condition' in SAP back end terms.- Returns:
- Has this action been performed successfully?
-
getCurrentDeliveryMode
- Returns:
- Current delivery mode from BOL header object
-
setPurchaseOrderNumber
Description copied from interface:CheckoutServiceSets the purchase order number into the current session cart which is held in SD, and updates the cart afterwards.- Specified by:
setPurchaseOrderNumberin interfaceCheckoutService- Parameters:
purchaseOrderNumber- Purchase order number- Returns:
- Has this action been performed successfully?
-
getBolOrderFacade
- Returns:
- the bolOrderFacade
-
setBolOrderFacade
- Parameters:
bolOrderFacade- the bolOrderFacade to set
-
setDeliveryAddress
Description copied from interface:CheckoutServiceSets 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:
setDeliveryAddressin interfaceCheckoutService- Parameters:
sapCustomerId- Technical key of an back end ship-to party, typically with length 10- Returns:
- Did it succeed?
-
setCartRestorationService
- Parameters:
cartRestorationService- the cartRestorationService to set
-
updateCheckoutCart
Description copied from interface:CheckoutServiceUpdate the checkout cart quantity,- Specified by:
updateCheckoutCartin interfaceCheckoutService- Parameters:
cartData- Cartdata values- Returns:
- cartData after update.
-
getSapPartnerService
- Returns:
- the sapPartnerService
-
setSapPartnerService
- Parameters:
sapPartnerService- the sapPartnerService to set
-
getProductService
protected de.hybris.platform.product.ProductService getProductService() -
setProductService
public void setProductService(de.hybris.platform.product.ProductService productService)
-