Class UpdateCartServiceImpl
java.lang.Object
org.broadleafcommerce.core.web.service.UpdateCartServiceImpl
- All Implemented Interfaces:
UpdateCartService
@Service("blUpdateCartService")
public class UpdateCartServiceImpl
extends Object
implements UpdateCartService
Author: jerryocanas
Date: 9/26/12
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected UpdateCartServiceExtensionManagerprotected static final org.apache.commons.logging.Logprotected OrderLockManagerprotected OrderServiceprotected static BroadleafCurrency -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleancheckAvailabilityInLocale(DiscreteOrderItem doi, BroadleafCurrency currency) copyCartToCurrentContext(Order currentCart) Reprices the order by removing all items and recreating the cart calling for a reprice on the new cart.booleanCompares the currency set in the BroadleafRequestContext with the savedCurrency.protected BroadleafCurrencyprotected booleanGets the currency that was set as active on last pass through.protected ObjectvoidsetSavedCurrency(BroadleafCurrency savedCurrency) Sets the currency that was set as active on last pass through.voidupdateAndValidateCart(Order cart) Updates the cart (locale, pricing) and performs validation.voidvalidateAddToCartRequest(OrderItemRequestDTO itemRequest, Order cart) Validates the given add item that will be added to the given cart.
-
Field Details
-
LOG
protected static final org.apache.commons.logging.Log LOG -
savedCurrency
-
orderService
-
extensionManager
-
orderLockManager
-
-
Constructor Details
-
UpdateCartServiceImpl
public UpdateCartServiceImpl()
-
-
Method Details
-
currencyHasChanged
public boolean currencyHasChanged()Description copied from interface:UpdateCartServiceCompares the currency set in the BroadleafRequestContext with the savedCurrency. If different, returns TRUE- Specified by:
currencyHasChangedin interfaceUpdateCartService- Returns:
-
copyCartToCurrentContext
Description copied from interface:UpdateCartServiceReprices the order by removing all items and recreating the cart calling for a reprice on the new cart.- Specified by:
copyCartToCurrentContextin interfaceUpdateCartService- Returns:
-
validateAddToCartRequest
Description copied from interface:UpdateCartServiceValidates the given add item that will be added to the given cart. This occurs prior to the item actually being added- Specified by:
validateAddToCartRequestin interfaceUpdateCartService
-
updateAndValidateCart
Description copied from interface:UpdateCartServiceUpdates the cart (locale, pricing) and performs validation.- Specified by:
updateAndValidateCartin interfaceUpdateCartService
-
lockOrder
-
getErrorInsteadOfQueue
protected boolean getErrorInsteadOfQueue() -
findActiveCurrency
-
checkAvailabilityInLocale
-
getSavedCurrency
Description copied from interface:UpdateCartServiceGets the currency that was set as active on last pass through.- Specified by:
getSavedCurrencyin interfaceUpdateCartService- Returns:
-
setSavedCurrency
Description copied from interface:UpdateCartServiceSets the currency that was set as active on last pass through.- Specified by:
setSavedCurrencyin interfaceUpdateCartService
-