org.broadleafcommerce.core.order.strategy
Class FulfillmentGroupItemStrategyImpl

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

@Service(value="blFulfillmentGroupItemStrategy")
public class FulfillmentGroupItemStrategyImpl
extends Object
implements FulfillmentGroupItemStrategy

Author:
Andre Azzolini (apazzolini)

Field Summary
protected  FulfillmentGroupItemDao fgItemDao
           
protected  FulfillmentGroupService fulfillmentGroupService
           
protected  OrderItemService orderItemService
           
protected  OrderService orderService
           
protected  boolean removeEmptyFulfillmentGroups
           
 
Constructor Summary
FulfillmentGroupItemStrategyImpl()
           
 
Method Summary
protected  FulfillmentGroup addItemToFulfillmentGroup(Order order, OrderItem orderItem, FulfillmentGroup fulfillmentGroup)
           
protected  FulfillmentGroup addItemToFulfillmentGroup(Order order, OrderItem orderItem, int quantity, FulfillmentGroup fulfillmentGroup)
           
 boolean isRemoveEmptyFulfillmentGroups()
           
 CartOperationRequest onItemAdded(CartOperationRequest request)
           
 CartOperationRequest onItemRemoved(CartOperationRequest request)
           
 CartOperationRequest onItemUpdated(CartOperationRequest request)
           
protected  FulfillmentType resolveFulfillmentType(DiscreteOrderItem discreteOrderItem)
          Resolves the fulfillment type based on the order item.
protected  FulfillmentType resolveFulfillmentType(Sku sku)
           
 void setRemoveEmptyFulfillmentGroups(boolean removeEmptyFulfillmentGroups)
           
protected  Order updateItemQuantity(Order order, OrderItem orderItem, Integer orderItemQuantityDelta)
           
 CartOperationRequest verify(CartOperationRequest request)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

fulfillmentGroupService

protected FulfillmentGroupService fulfillmentGroupService

orderItemService

protected OrderItemService orderItemService

orderService

protected OrderService orderService

fgItemDao

protected FulfillmentGroupItemDao fgItemDao

removeEmptyFulfillmentGroups

protected boolean removeEmptyFulfillmentGroups
Constructor Detail

FulfillmentGroupItemStrategyImpl

public FulfillmentGroupItemStrategyImpl()
Method Detail

onItemAdded

public CartOperationRequest onItemAdded(CartOperationRequest request)
                                 throws PricingException
Specified by:
onItemAdded in interface FulfillmentGroupItemStrategy
Throws:
PricingException

resolveFulfillmentType

protected FulfillmentType resolveFulfillmentType(DiscreteOrderItem discreteOrderItem)
Resolves the fulfillment type based on the order item. The OOB implementation uses the DiscreteOrderItem.getSku() to then invoke resolveFulfillmentType(Sku).

Parameters:
discreteOrderItem -
Returns:

resolveFulfillmentType

protected FulfillmentType resolveFulfillmentType(Sku sku)

addItemToFulfillmentGroup

protected FulfillmentGroup addItemToFulfillmentGroup(Order order,
                                                     OrderItem orderItem,
                                                     FulfillmentGroup fulfillmentGroup)
                                              throws PricingException
Throws:
PricingException

addItemToFulfillmentGroup

protected FulfillmentGroup addItemToFulfillmentGroup(Order order,
                                                     OrderItem orderItem,
                                                     int quantity,
                                                     FulfillmentGroup fulfillmentGroup)
                                              throws PricingException
Throws:
PricingException

onItemUpdated

public CartOperationRequest onItemUpdated(CartOperationRequest request)
                                   throws PricingException
Specified by:
onItemUpdated in interface FulfillmentGroupItemStrategy
Throws:
PricingException

updateItemQuantity

protected Order updateItemQuantity(Order order,
                                   OrderItem orderItem,
                                   Integer orderItemQuantityDelta)
                            throws PricingException
Throws:
PricingException

onItemRemoved

public CartOperationRequest onItemRemoved(CartOperationRequest request)
Specified by:
onItemRemoved in interface FulfillmentGroupItemStrategy

verify

public CartOperationRequest verify(CartOperationRequest request)
                            throws PricingException
Specified by:
verify in interface FulfillmentGroupItemStrategy
Throws:
PricingException

isRemoveEmptyFulfillmentGroups

public boolean isRemoveEmptyFulfillmentGroups()
Specified by:
isRemoveEmptyFulfillmentGroups in interface FulfillmentGroupItemStrategy

setRemoveEmptyFulfillmentGroups

public void setRemoveEmptyFulfillmentGroups(boolean removeEmptyFulfillmentGroups)
Specified by:
setRemoveEmptyFulfillmentGroups in interface FulfillmentGroupItemStrategy


Copyright © 2013. All Rights Reserved.