Class DefaultB2BCartFacade
java.lang.Object
de.hybris.platform.b2bacceleratorfacades.order.impl.DefaultB2BCartFacade
- All Implemented Interfaces:
CartFacade
Default implementation of
CartFacade.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringprotected static final org.apache.log4j.Logger -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddOrderEntry(OrderEntryData cartEntry) Method for adding a product to cart.addOrderEntryList(List<OrderEntryData> cartEntries) Method for adding a product to cart.protected CartModificationDatadeleteGroupedOrderEntries(OrderEntryData orderEntry) protected ProductFacadeprotected CartFacadeprotected B2BCartServiceprotected CheckoutFacadeThis gets the current cart.protected IntegergetOrderEntryNumber(OrderEntryData findEntry) protected booleanisValidEntry(OrderEntryData cartEntry) voidIf existing the current session cart is being detached from this session and removed.protected voidsetAddStatusMessage(OrderEntryData orderEntry, CartModificationData cartModification) voidsetB2bProductFacade(ProductFacade b2bProductFacade) voidsetCartFacade(CartFacade cartFacade) voidsetCartService(B2BCartService cartService) voidsetCheckoutFacade(CheckoutFacade checkoutFacade) voidsetGroupCartModificationListConverter(Converter<AbstractOrderModel, List<CartModificationData>> groupCartModificationListConverter) protected voidsetUpdateStatusMessage(OrderEntryData orderEntry, CartModificationData cartModification) Updates the cart data.updateOrderEntry(OrderEntryData orderEntry) Method for updating the number of products.updateOrderEntryList(List<OrderEntryData> cartEntries) Method for updating a list of products in the cart.Method for validating every entry in the cartprotected void
-
Field Details
-
LOG
protected static final org.apache.log4j.Logger LOG -
BASKET_QUANTITY_REMOVE_SUCCESS
- See Also:
-
-
Constructor Details
-
DefaultB2BCartFacade
public DefaultB2BCartFacade()
-
-
Method Details
-
addOrderEntry
Description copied from interface:CartFacadeMethod for adding a product to cart.- Specified by:
addOrderEntryin interfaceCartFacade- 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
-
isValidEntry
-
setAddStatusMessage
protected void setAddStatusMessage(OrderEntryData orderEntry, CartModificationData cartModification) -
updateOrderEntry
Description copied from interface:CartFacadeMethod for updating the number of products.- Specified by:
updateOrderEntryin interfaceCartFacade- Parameters:
orderEntry- 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
-
deleteGroupedOrderEntries
-
setUpdateStatusMessage
protected void setUpdateStatusMessage(OrderEntryData orderEntry, CartModificationData cartModification) -
addOrderEntryList
Description copied from interface:CartFacadeMethod for adding a product to cart.- Specified by:
addOrderEntryListin interfaceCartFacade- 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
Description copied from interface:CartFacadeMethod for updating a list of products in the cart.- Specified by:
updateOrderEntryListin interfaceCartFacade- 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
-
getOrderEntryNumber
-
validateIfCartCanBeUpdated
protected void validateIfCartCanBeUpdated() -
getCurrentCart
Description copied from interface:CartFacadeThis gets the current cart.- Specified by:
getCurrentCartin interfaceCartFacade- Returns:
- the current cart.
-
update
Updates the cart data.- Specified by:
updatein interfaceCartFacade- Parameters:
cartData- an objectCartDatawith cart data to update.- Returns:
- the updated cart.
-
setCartService
-
getCartService
-
getB2bProductFacade
-
setB2bProductFacade
-
getCheckoutFacade
-
setCheckoutFacade
-
getGroupCartModificationListConverter
public Converter<AbstractOrderModel,List<CartModificationData>> getGroupCartModificationListConverter() -
setGroupCartModificationListConverter
public void setGroupCartModificationListConverter(Converter<AbstractOrderModel, List<CartModificationData>> groupCartModificationListConverter) -
getCartFacade
-
setCartFacade
-
validateCurrentCartData
public List<CartModificationData> validateCurrentCartData() throws CommerceCartModificationExceptionDescription copied from interface:CartFacadeMethod for validating every entry in the cart- Specified by:
validateCurrentCartDatain interfaceCartFacade- Returns:
- a list of cart modifications that includes a statusCode and the actual quantity that the entry was updated to
- Throws:
CommerceCartModificationException- if the cart cannot be modified
-
removeSessionCart
public void removeSessionCart()Description copied from interface:CartFacadeIf existing the current session cart is being detached from this session and removed. Afterwards it's no longer available.- Specified by:
removeSessionCartin interfaceCartFacade
-