org.broadleafcommerce.core.web.service
Class UpdateCartServiceImpl

java.lang.Object
  extended by org.broadleafcommerce.core.web.service.UpdateCartServiceImpl
All Implemented Interfaces:
UpdateCartService

@Service(value="blUpdateCartService")
public class UpdateCartServiceImpl
extends Object
implements UpdateCartService

Author: jerryocanas Date: 9/26/12


Field Summary
protected  UpdateCartServiceExtensionManager extensionManager
           
protected static org.apache.commons.logging.Log LOG
           
protected  OrderService orderService
           
protected static BroadleafCurrency savedCurrency
           
 
Constructor Summary
UpdateCartServiceImpl()
           
 
Method Summary
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 validateCart(Order cart)
          Validates the cart against the active price list and locale.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG

protected static final org.apache.commons.logging.Log LOG

savedCurrency

protected static BroadleafCurrency savedCurrency

orderService

protected OrderService orderService

extensionManager

protected UpdateCartServiceExtensionManager extensionManager
Constructor Detail

UpdateCartServiceImpl

public UpdateCartServiceImpl()
Method Detail

currencyHasChanged

public boolean currencyHasChanged()
Description copied from interface: UpdateCartService
Compares the currency set in the BroadleafRequestContext with the savedCurrency. If different, returns TRUE

Specified by:
currencyHasChanged in interface UpdateCartService
Returns:

copyCartToCurrentContext

public UpdateCartResponse copyCartToCurrentContext(Order currentCart)
Description copied from interface: UpdateCartService
Reprices the order by removing all items and recreating the cart calling for a reprice on the new cart.

Specified by:
copyCartToCurrentContext in interface UpdateCartService
Returns:

validateCart

public void validateCart(Order cart)
Description copied from interface: UpdateCartService
Validates the cart against the active price list and locale.

Specified by:
validateCart in interface UpdateCartService

findActiveCurrency

protected BroadleafCurrency findActiveCurrency()

checkAvailabilityInLocale

protected boolean checkAvailabilityInLocale(DiscreteOrderItem doi,
                                            BroadleafCurrency currency)

setSavedCurrency

public void setSavedCurrency(BroadleafCurrency savedCurrency)
Description copied from interface: UpdateCartService
Sets the currency that was set as active on last pass through.

Specified by:
setSavedCurrency in interface UpdateCartService

getSavedCurrency

public BroadleafCurrency getSavedCurrency()
Description copied from interface: UpdateCartService
Gets the currency that was set as active on last pass through.

Specified by:
getSavedCurrency in interface UpdateCartService
Returns:


Copyright © 2013. All Rights Reserved.