@Service(value="blUpdateCartService") public class UpdateCartServiceImpl extends Object implements UpdateCartService
Modifier and Type | Field and Description |
---|---|
protected UpdateCartServiceExtensionManager |
extensionManager |
protected static org.apache.commons.logging.Log |
LOG |
protected OrderService |
orderService |
protected static BroadleafCurrency |
savedCurrency |
Constructor and Description |
---|
UpdateCartServiceImpl() |
Modifier and Type | Method and Description |
---|---|
protected boolean |
checkAvailabilityInLocale(DiscreteOrderItem doi,
BroadleafCurrency currency) |
UpdateCartResponse |
copyCartToCurrentContext(Order currentCart)
Reprices the order by removing all items and recreating the cart calling for a reprice on the new cart.
|
boolean |
currencyHasChanged()
Compares the currency set in the BroadleafRequestContext with the savedCurrency.
|
protected BroadleafCurrency |
findActiveCurrency() |
BroadleafCurrency |
getSavedCurrency()
Gets the currency that was set as active on last pass through.
|
void |
setSavedCurrency(BroadleafCurrency savedCurrency)
Sets the currency that was set as active on last pass through.
|
void |
updateAndValidateCart(Order cart)
Updates the cart (locale, pricing) and performs validation.
|
void |
validateAddToCartRequest(OrderItemRequestDTO itemRequest,
Order cart)
Validates the given add item that will be added to the given cart.
|
protected static final org.apache.commons.logging.Log LOG
protected static BroadleafCurrency savedCurrency
protected OrderService orderService
protected UpdateCartServiceExtensionManager extensionManager
public boolean currencyHasChanged()
UpdateCartService
currencyHasChanged
in interface UpdateCartService
public UpdateCartResponse copyCartToCurrentContext(Order currentCart)
UpdateCartService
copyCartToCurrentContext
in interface UpdateCartService
public void validateAddToCartRequest(OrderItemRequestDTO itemRequest, Order cart)
UpdateCartService
validateAddToCartRequest
in interface UpdateCartService
public void updateAndValidateCart(Order cart)
UpdateCartService
updateAndValidateCart
in interface UpdateCartService
protected BroadleafCurrency findActiveCurrency()
protected boolean checkAvailabilityInLocale(DiscreteOrderItem doi, BroadleafCurrency currency)
public void setSavedCurrency(BroadleafCurrency savedCurrency)
UpdateCartService
setSavedCurrency
in interface UpdateCartService
public BroadleafCurrency getSavedCurrency()
UpdateCartService
getSavedCurrency
in interface UpdateCartService
Copyright © 2019. All rights reserved.