org.broadleafcommerce.core.order.strategy
Class NullFulfillmentGroupItemStrategyImpl

java.lang.Object
  extended by org.broadleafcommerce.core.order.strategy.FulfillmentGroupItemStrategyImpl
      extended by org.broadleafcommerce.core.order.strategy.NullFulfillmentGroupItemStrategyImpl
All Implemented Interfaces:
FulfillmentGroupItemStrategy

public class NullFulfillmentGroupItemStrategyImpl
extends FulfillmentGroupItemStrategyImpl

This class provides the implementation of a strategy that does not touch FulfillmentGroupItems when cart add or update operations have been performed. However, the remove operation must still remove the FulfillmentGroupItems, and this strategy will delegate to the default Broadleaf FulfillmentGroupItemStrategy to perform the removal.

Author:
Andre Azzolini (apazzolini)

Field Summary
protected  boolean removeEmptyFulfillmentGroups
           
 
Fields inherited from class org.broadleafcommerce.core.order.strategy.FulfillmentGroupItemStrategyImpl
fgItemDao, fulfillmentGroupService, orderItemService, orderService
 
Constructor Summary
NullFulfillmentGroupItemStrategyImpl()
           
 
Method Summary
 boolean isRemoveEmptyFulfillmentGroups()
           
 CartOperationRequest onItemAdded(CartOperationRequest request)
           
 CartOperationRequest onItemRemoved(CartOperationRequest request)
          When we remove an order item, we must also remove the associated fulfillment group item to respsect the database constraints.
 CartOperationRequest onItemUpdated(CartOperationRequest request)
           
 CartOperationRequest verify(CartOperationRequest request)
           
 
Methods inherited from class org.broadleafcommerce.core.order.strategy.FulfillmentGroupItemStrategyImpl
addItemToFulfillmentGroup, addItemToFulfillmentGroup, resolveFulfillmentType, setRemoveEmptyFulfillmentGroups, updateItemQuantity
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

removeEmptyFulfillmentGroups

protected boolean removeEmptyFulfillmentGroups
Constructor Detail

NullFulfillmentGroupItemStrategyImpl

public NullFulfillmentGroupItemStrategyImpl()
Method Detail

onItemAdded

public CartOperationRequest onItemAdded(CartOperationRequest request)
Specified by:
onItemAdded in interface FulfillmentGroupItemStrategy
Overrides:
onItemAdded in class FulfillmentGroupItemStrategyImpl

onItemUpdated

public CartOperationRequest onItemUpdated(CartOperationRequest request)
Specified by:
onItemUpdated in interface FulfillmentGroupItemStrategy
Overrides:
onItemUpdated in class FulfillmentGroupItemStrategyImpl

onItemRemoved

public CartOperationRequest onItemRemoved(CartOperationRequest request)
When we remove an order item, we must also remove the associated fulfillment group item to respsect the database constraints.

Specified by:
onItemRemoved in interface FulfillmentGroupItemStrategy
Overrides:
onItemRemoved in class FulfillmentGroupItemStrategyImpl

verify

public CartOperationRequest verify(CartOperationRequest request)
Specified by:
verify in interface FulfillmentGroupItemStrategy
Overrides:
verify in class FulfillmentGroupItemStrategyImpl

isRemoveEmptyFulfillmentGroups

public boolean isRemoveEmptyFulfillmentGroups()
Specified by:
isRemoveEmptyFulfillmentGroups in interface FulfillmentGroupItemStrategy
Overrides:
isRemoveEmptyFulfillmentGroups in class FulfillmentGroupItemStrategyImpl


Copyright © 2013. All Rights Reserved.