Interface UpdateCartService
- All Known Implementing Classes:
UpdateCartServiceImpl
public interface UpdateCartService
Provides methods to facilitate order repricing.
Author: jerryocanas Date: 9/26/12
-
Method Summary
Modifier and TypeMethodDescriptioncopyCartToCurrentContext(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.Gets the currency that was set as active on last pass through.voidsetSavedCurrency(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.
-
Method Details
-
getSavedCurrency
BroadleafCurrency getSavedCurrency()Gets the currency that was set as active on last pass through.- Returns:
-
setSavedCurrency
Sets the currency that was set as active on last pass through.- Parameters:
savedCurrency-
-
currencyHasChanged
boolean currencyHasChanged()Compares the currency set in the BroadleafRequestContext with the savedCurrency. If different, returns TRUE- Returns:
-
copyCartToCurrentContext
Reprices the order by removing all items and recreating the cart calling for a reprice on the new cart.- Returns:
-
validateAddToCartRequest
void validateAddToCartRequest(OrderItemRequestDTO itemRequest, Order cart) throws IllegalArgumentException Validates the given add item that will be added to the given cart. This occurs prior to the item actually being added- Parameters:
cart-- Throws:
IllegalArgumentException
-
updateAndValidateCart
Updates the cart (locale, pricing) and performs validation.- Parameters:
cart-- Throws:
IllegalArgumentException
-