Interface CartRestorationFacade
- All Known Implementing Classes:
DefaultCartRestorationFacade
public interface CartRestorationFacade
Used to write a minimal representation of the cart into the hybris persistence, and to restore it from there
-
Method Summary
Modifier and TypeMethodDescriptionvoidIf existing the saved cart will be removedrestoreSavedCart(String guid, UserModel currentUser) Restores current users's saved cart from the hybris persistence layervoidsetSavedCart(CartData newCart) By each interaction with the cart e.g add product, edit product, the persisted cart is reconstructed from the backend cart.
-
Method Details
-
restoreSavedCart
CartRestorationData restoreSavedCart(String guid, UserModel currentUser) throws de.hybris.platform.commerceservices.order.CommerceCartRestorationException Restores current users's saved cart from the hybris persistence layer- 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
void removeSavedCart()If existing the saved cart will be removed -
setSavedCart
void setSavedCart(CartData newCart) throws de.hybris.platform.commerceservices.order.CommerceCartModificationException By each interaction with the cart e.g add product, edit product, the persisted cart is reconstructed from the backend cart.- Parameters:
newCart- to be used further on- Throws:
de.hybris.platform.commerceservices.order.CommerceCartModificationException
-