Interface CartFacade
-
- All Known Subinterfaces:
B2BCartFacade
- All Known Implementing Classes:
DefaultB2BCartFacade,DefaultCartFacade,SapOrdermgmtB2BCartFacade
public interface CartFacadeDefines an API for cart manipulation, responsible for managing entries for cart.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description CartModificationDataaddOrderEntry(OrderEntryData cartEntry)Method for adding a product to cart.java.util.List<CartModificationData>addOrderEntryList(java.util.List<OrderEntryData> cartEntries)Method for adding a product to cart.CartDatagetCurrentCart()This gets the current cart.CartDataupdate(CartData cartData)Updates the information in the cart based on the content of the cartDataCartModificationDataupdateOrderEntry(OrderEntryData cartEntry)Method for updating the number of products.java.util.List<CartModificationData>updateOrderEntryList(java.util.List<OrderEntryData> cartEntries)Method for updating a list of products in the cart.
-
-
-
Method Detail
-
addOrderEntry
CartModificationData addOrderEntry(OrderEntryData cartEntry) throws EntityValidationException
Method for adding a product to cart.- Parameters:
cartEntry- the cart entry with the new product to add..- Returns:
- the cart modification data that includes a statusCode and the actual quantity added to the cart
- Throws:
EntityValidationException- if the validation fails.
-
updateOrderEntry
CartModificationData updateOrderEntry(OrderEntryData cartEntry) throws EntityValidationException
Method for updating the number of products.- Parameters:
cartEntry- the cart entry with the new value of quantity for product.- Returns:
- the cart modification data that includes a statusCode and the actual quantity that the entry was updated to
- Throws:
EntityValidationException- if the validation fails.
-
addOrderEntryList
java.util.List<CartModificationData> addOrderEntryList(java.util.List<OrderEntryData> cartEntries)
Method for adding a product to cart.- Parameters:
cartEntries- the cart entries with the new products to add.- Returns:
- the cart modification data that includes a statusCode and the actual quantity added to the cart
-
updateOrderEntryList
java.util.List<CartModificationData> updateOrderEntryList(java.util.List<OrderEntryData> cartEntries)
Method for updating a list of products in the cart.- Parameters:
cartEntries- the cart entries with the new products to add.- Returns:
- the cart modification data that includes a statusCode and the actual quantity added to the cart
-
update
CartData update(CartData cartData)
Updates the information in the cart based on the content of the cartData- Parameters:
cartData- the cart to modify and it's modifications.- Returns:
- the updated cart.
-
getCurrentCart
CartData getCurrentCart()
This gets the current cart.- Returns:
- the current cart.
-
-