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 Type
    Method
    Description
    org.broadleafcommerce.core.order.service.call.UpdateCartResponse
    copyCartToCurrentContext(org.broadleafcommerce.core.order.domain.Order currentCart)
    Reprices the order by removing all items and recreating the cart calling for a reprice on the new cart.
    boolean
    Compares the currency set in the BroadleafRequestContext with the savedCurrency.
    org.broadleafcommerce.common.currency.domain.BroadleafCurrency
    Gets the currency that was set as active on last pass through.
    void
    setSavedCurrency(org.broadleafcommerce.common.currency.domain.BroadleafCurrency savedCurrency)
    Sets the currency that was set as active on last pass through.
    void
    updateAndValidateCart(org.broadleafcommerce.core.order.domain.Order cart)
    Updates the cart (locale, pricing) and performs validation.
    void
    validateAddToCartRequest(org.broadleafcommerce.core.order.service.call.OrderItemRequestDTO itemRequest, org.broadleafcommerce.core.order.domain.Order cart)
    Validates the given add item that will be added to the given cart.
  • Method Details

    • getSavedCurrency

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

      void setSavedCurrency(org.broadleafcommerce.common.currency.domain.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

      org.broadleafcommerce.core.order.service.call.UpdateCartResponse copyCartToCurrentContext(org.broadleafcommerce.core.order.domain.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(org.broadleafcommerce.core.order.service.call.OrderItemRequestDTO itemRequest, org.broadleafcommerce.core.order.domain.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(org.broadleafcommerce.core.order.domain.Order cart)
      Updates the cart (locale, pricing) and performs validation.
      Parameters:
      cart -
      Throws:
      IllegalArgumentException