Interface UpdateCartService

All Known Implementing Classes:
UpdateCartServiceImpl

public interface UpdateCartService
Provides methods to facilitate order repricing.

Author: jerryocanas Date: 9/26/12

  • Method Details

    • getSavedCurrency

      BroadleafCurrency getSavedCurrency()
      Gets the currency that was set as active on last pass through.
      Returns:
    • setSavedCurrency

      void setSavedCurrency(BroadleafCurrency savedCurrency)
      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

      UpdateCartResponse copyCartToCurrentContext(Order currentCart)
      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

      void updateAndValidateCart(Order cart)
      Updates the cart (locale, pricing) and performs validation.
      Parameters:
      cart -
      Throws:
      IllegalArgumentException