org.broadleafcommerce.core.order.strategy
Interface FulfillmentGroupItemStrategy

All Known Implementing Classes:
FulfillmentGroupItemStrategyImpl, NullFulfillmentGroupItemStrategyImpl

public interface FulfillmentGroupItemStrategy

The methods in this class are invoked by the add and update item to cart workflows. Broadleaf provides two implementations, the default FulfillmentGroupItemStrategyImpl and also a strategy that does nothing to FulifllmentGroupItems, which can be configured by injecting the NullFulfillmentGroupItemStrategyImpl class as the "blFulfillmentGroupItemStrategy" bean. The null strategy would be the approach taken prior to 2.0, where the user was required to manage FulfillmentGroups and FulfillmentGroupItems by themselves. However, the new default implmentation takes care of this for you by ensuring that FG Items and OrderItems stay in sync. Note that even the null strategy WILL remove FulfillmentGroupItems if their corresponding OrderItem is removed to prevent orphaned records.

Author:
Andre Azzolini (apazzolini)

Method Summary
 boolean isRemoveEmptyFulfillmentGroups()
           
 CartOperationRequest onItemAdded(CartOperationRequest request)
           
 CartOperationRequest onItemRemoved(CartOperationRequest request)
           
 CartOperationRequest onItemUpdated(CartOperationRequest request)
           
 void setRemoveEmptyFulfillmentGroups(boolean removeEmptyFulfillmentGroups)
           
 CartOperationRequest verify(CartOperationRequest request)
           
 

Method Detail

onItemAdded

CartOperationRequest onItemAdded(CartOperationRequest request)
                                 throws PricingException
Throws:
PricingException

onItemUpdated

CartOperationRequest onItemUpdated(CartOperationRequest request)
                                   throws PricingException
Throws:
PricingException

onItemRemoved

CartOperationRequest onItemRemoved(CartOperationRequest request)
                                   throws PricingException
Throws:
PricingException

verify

CartOperationRequest verify(CartOperationRequest request)
                            throws PricingException
Throws:
PricingException

setRemoveEmptyFulfillmentGroups

void setRemoveEmptyFulfillmentGroups(boolean removeEmptyFulfillmentGroups)

isRemoveEmptyFulfillmentGroups

boolean isRemoveEmptyFulfillmentGroups()


Copyright © 2012. All Rights Reserved.