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 java.lang.Object implements CartCheckoutBaseService
DefaultCartCheckout implementation i.e creating the session cart from the BOL cart representation etc
-
-
Constructor Summary
Constructors Constructor Description DefaultCartCheckoutBaseService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected CartDatacompileSessionCart(boolean recentlyAddedFirst)Creates the session cart from the BOL cart representation, and returns it in hybris representation.protected CartDatacreateEmptyCart()Creates an empty cart, just initializing the entry listBolCartFacadegetBolCartFacade()Converter<Basket,CartData>getCartConverter()I18NServicegetI18nService()org.springframework.context.MessageSourcegetMessageSource()CartDatagetSessionCart()Retrieves the session cart held in the SAP back endCartDatagetSessionCart(boolean recentlyAddedFirst)Returns session cart, sorted in inverted order if requiredbooleanhasSessionCart()Checks if a session cart exists held in the SAP back endvoidremoveSessionCart()Removes 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(Converter<Basket,CartData> cartConverter)voidsetI18nService(I18NService i18nService)voidsetMessageSource(org.springframework.context.MessageSource messageSource)
-
-
-
Method Detail
-
getMessageSource
public org.springframework.context.MessageSource getMessageSource()
-
setMessageSource
public void setMessageSource(org.springframework.context.MessageSource messageSource)
-
getI18nService
public I18NService getI18nService()
-
setI18nService
public void setI18nService(I18NService i18nService)
-
getSessionCart
public CartData getSessionCart()
Description copied from interface:CartCheckoutBaseServiceRetrieves the session cart held in the SAP back end- Specified by:
getSessionCartin interfaceCartCheckoutBaseService- 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: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
protected CartData 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
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
-
setCartConverter
public void setCartConverter(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
-
-