Interface CartRestorationFacade
-
- All Known Implementing Classes:
DefaultCartRestorationFacade
public interface CartRestorationFacadeUsed to write a minimal representation of the cart into the hybris persistence, and to restore it from there
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description 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 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 Detail
-
restoreSavedCart
CartRestorationData restoreSavedCart(java.lang.String guid, UserModel currentUser) throws 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:
CommerceCartRestorationException- exception.
-
removeSavedCart
void removeSavedCart()
If existing the saved cart will be removed
-
setSavedCart
void setSavedCart(CartData newCart) throws 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:
CommerceCartModificationException
-
-