Class DefaultCartRestorationFacade
- java.lang.Object
-
- de.hybris.platform.sap.sapordermgmtb2bfacades.cart.impl.DefaultCartRestorationFacade
-
- All Implemented Interfaces:
CartRestorationFacade
public class DefaultCartRestorationFacade extends java.lang.Object implements CartRestorationFacade
Default implementation forCartRestorationFacade
-
-
Constructor Summary
Constructors Constructor Description DefaultCartRestorationFacade()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddCartEntriesToStandardCart(CartData newCart)Creates a new cart (in hybris persistence) from the current (BOL based) representation of the cartprotected BaseSiteServicegetBaseSiteService()java.util.List<CartRestorationFacadeHook>getCartRestorationFacadeHooks()protected CartRestorationServicegetCartRestorationService()protected CartServicegetCartService()protected CommerceCartServicegetCommerceCartService()ModelServicegetModelService()protected ProductServicegetProductService()voidremoveSavedCart()If existing the saved cart will be removedCartRestorationDatarestoreSavedCart(java.lang.String guid, UserModel currentUser)Restores current users's saved cart from the hybris persistence layervoidsetBaseSiteService(BaseSiteService baseSiteService)voidsetCartRestorationFacadeHooks(java.util.List<CartRestorationFacadeHook> cartRestorationFacadeHooks)voidsetCartRestorationService(CartRestorationService cartRestorationService)voidsetCartService(CartService cartService)voidsetCommerceCartService(CommerceCartService commerceCartService)voidsetModelService(ModelService modelService)voidsetProductService(ProductService productService)voidsetSavedCart(CartData newCart)By each interaction with the cart e.g add product, edit product, the persisted cart is reconstructed from the backend cart.
-
-
-
Method Detail
-
restoreSavedCart
public CartRestorationData restoreSavedCart(java.lang.String guid, UserModel currentUser) throws CommerceCartRestorationException
Description copied from interface:CartRestorationFacadeRestores current users's saved cart from the hybris persistence layer- Specified by:
restoreSavedCartin interfaceCartRestorationFacade- Parameters:
guid- of the saved cartcurrentUser- is the user which is currently logged in- Returns:
- the restoration data needed by the calling facade
- Throws:
CommerceCartRestorationException- exception.
-
removeSavedCart
public void removeSavedCart()
Description copied from interface:CartRestorationFacadeIf existing the saved cart will be removed- Specified by:
removeSavedCartin interfaceCartRestorationFacade
-
setSavedCart
public void setSavedCart(CartData newCart) throws CommerceCartModificationException
Description copied from interface:CartRestorationFacadeBy each interaction with the cart e.g add product, edit product, the persisted cart is reconstructed from the backend cart.- Specified by:
setSavedCartin interfaceCartRestorationFacade- Parameters:
newCart- to be used further on- Throws:
CommerceCartModificationException
-
addCartEntriesToStandardCart
protected void addCartEntriesToStandardCart(CartData newCart) throws CommerceCartModificationException
Creates a new cart (in hybris persistence) from the current (BOL based) representation of the cart- Parameters:
newCart- to take the entries from- Throws:
CommerceCartModificationException
-
getProductService
protected ProductService getProductService()
-
setProductService
public void setProductService(ProductService productService)
-
getBaseSiteService
protected BaseSiteService getBaseSiteService()
-
setBaseSiteService
public void setBaseSiteService(BaseSiteService baseSiteService)
-
getCommerceCartService
protected CommerceCartService getCommerceCartService()
-
setCommerceCartService
public void setCommerceCartService(CommerceCartService commerceCartService)
-
getCartRestorationService
protected CartRestorationService getCartRestorationService()
-
setCartRestorationService
public void setCartRestorationService(CartRestorationService cartRestorationService)
-
getCartService
protected CartService getCartService()
-
setCartService
public void setCartService(CartService cartService)
-
getModelService
public ModelService getModelService()
-
setModelService
public void setModelService(ModelService modelService)
-
getCartRestorationFacadeHooks
public java.util.List<CartRestorationFacadeHook> getCartRestorationFacadeHooks()
- Returns:
- the cartRestorationFacadeHooks
-
setCartRestorationFacadeHooks
public void setCartRestorationFacadeHooks(java.util.List<CartRestorationFacadeHook> cartRestorationFacadeHooks)
- Parameters:
cartRestorationFacadeHooks- the cartRestorationFacadeHooks to set
-
-