Class DefaultCartRestorationFacade
java.lang.Object
de.hybris.platform.sap.sapordermgmtb2bfacades.cart.impl.DefaultCartRestorationFacade
- All Implemented Interfaces:
CartRestorationFacade
Default implementation for
CartRestorationFacade-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddCartEntriesToStandardCart(CartData newCart) Creates a new cart (in hybris persistence) from the current (BOL based) representation of the cartprotected de.hybris.platform.site.BaseSiteServiceprotected CartRestorationServiceprotected CartServiceprotected de.hybris.platform.commerceservices.order.CommerceCartServicede.hybris.platform.servicelayer.model.ModelServiceprotected de.hybris.platform.product.ProductServicevoidIf existing the saved cart will be removedrestoreSavedCart(String guid, UserModel currentUser) Restores current users's saved cart from the hybris persistence layervoidsetBaseSiteService(de.hybris.platform.site.BaseSiteService baseSiteService) voidsetCartRestorationFacadeHooks(List<CartRestorationFacadeHook> cartRestorationFacadeHooks) voidsetCartRestorationService(CartRestorationService cartRestorationService) voidsetCartService(CartService cartService) voidsetCommerceCartService(de.hybris.platform.commerceservices.order.CommerceCartService commerceCartService) voidsetModelService(de.hybris.platform.servicelayer.model.ModelService modelService) voidsetProductService(de.hybris.platform.product.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.
-
Constructor Details
-
DefaultCartRestorationFacade
public DefaultCartRestorationFacade()
-
-
Method Details
-
restoreSavedCart
public CartRestorationData restoreSavedCart(String guid, UserModel currentUser) throws de.hybris.platform.commerceservices.order.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:
de.hybris.platform.commerceservices.order.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 de.hybris.platform.commerceservices.order.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:
de.hybris.platform.commerceservices.order.CommerceCartModificationException
-
addCartEntriesToStandardCart
protected void addCartEntriesToStandardCart(CartData newCart) throws de.hybris.platform.commerceservices.order.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:
de.hybris.platform.commerceservices.order.CommerceCartModificationException
-
getProductService
protected de.hybris.platform.product.ProductService getProductService() -
setProductService
public void setProductService(de.hybris.platform.product.ProductService productService) -
getBaseSiteService
protected de.hybris.platform.site.BaseSiteService getBaseSiteService() -
setBaseSiteService
public void setBaseSiteService(de.hybris.platform.site.BaseSiteService baseSiteService) -
getCommerceCartService
protected de.hybris.platform.commerceservices.order.CommerceCartService getCommerceCartService() -
setCommerceCartService
public void setCommerceCartService(de.hybris.platform.commerceservices.order.CommerceCartService commerceCartService) -
getCartRestorationService
-
setCartRestorationService
-
getCartService
-
setCartService
-
getModelService
public de.hybris.platform.servicelayer.model.ModelService getModelService() -
setModelService
public void setModelService(de.hybris.platform.servicelayer.model.ModelService modelService) -
getCartRestorationFacadeHooks
- Returns:
- the cartRestorationFacadeHooks
-
setCartRestorationFacadeHooks
public void setCartRestorationFacadeHooks(List<CartRestorationFacadeHook> cartRestorationFacadeHooks) - Parameters:
cartRestorationFacadeHooks- the cartRestorationFacadeHooks to set
-