Class DefaultCartCheckoutBaseService
java.lang.Object
de.hybris.platform.sap.sapordermgmtservices.cart.impl.DefaultCartCheckoutBaseService
- All Implemented Interfaces:
CartCheckoutBaseService
- Direct Known Subclasses:
DefaultCartService,DefaultCheckoutService
DefaultCartCheckout implementation i.e creating the session cart from the BOL cart representation etc
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected CartDatacompileSessionCart(boolean recentlyAddedFirst) Creates the session cart from the BOL cart representation, and returns it in hybris representation.protected CartDataCreates an empty cart, just initializing the entry listde.hybris.platform.servicelayer.i18n.I18NServiceorg.springframework.context.MessageSourceRetrieves the session cart held in the SAP back endgetSessionCart(boolean recentlyAddedFirst) Returns session cart, sorted in inverted order if requiredbooleanChecks if a session cart exists held in the SAP back endvoidRemoves the existing session cart and releases the underlying LO-API session in SD.protected voidreverseCartSorting(CartData cart) Reverse the sorting of the ItemList of the Cartprotected voidreverseCartSorting(Basket cart) Reverse the sorting of the ItemList of the CartvoidsetBolCartFacade(BolCartFacade bolCartFacade) voidsetCartConverter(de.hybris.platform.servicelayer.dto.converter.Converter<Basket, CartData> cartConverter) voidsetI18nService(de.hybris.platform.servicelayer.i18n.I18NService i18nService) voidsetMessageSource(org.springframework.context.MessageSource messageSource)
-
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
Description copied from interface:CartCheckoutBaseServiceRetrieves the session cart held in the SAP back end- Specified by:
getSessionCartin interfaceCartCheckoutBaseService- Returns:
- Current session cart
-
compileSessionCart
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
Description copied from interface:CartCheckoutBaseServiceReturns session cart, sorted in inverted order if required- Specified by:
getSessionCartin interfaceCartCheckoutBaseService- Parameters:
recentlyAddedFirst- If true, recently added items will be returned first (Standard sorting will be inverted)- Returns:
- Session Cart
-
createEmptyCart
Creates an empty cart, just initializing the entry list- Returns:
- Empty cart
-
hasSessionCart
public boolean hasSessionCart()Description copied from interface:CartCheckoutBaseServiceChecks if a session cart exists held in the SAP back end- Specified by:
hasSessionCartin interfaceCartCheckoutBaseService- Returns:
- Does the session cart exist?
-
removeSessionCart
public void removeSessionCart()Description copied from interface:CartCheckoutBaseServiceRemoves the existing session cart and releases the underlying LO-API session in SD. Afterwards, the cart is initial- Specified by:
removeSessionCartin interfaceCartCheckoutBaseService
-
reverseCartSorting
Reverse the sorting of the ItemList of the Cart- Parameters:
cart- the Cart object
-
reverseCartSorting
Reverse the sorting of the ItemList of the Cart- Parameters:
cart- the Cart object
-
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
- Returns:
- the bolCartFacade
-
setBolCartFacade
- Parameters:
bolCartFacade- the bolCartFacade to set
-