Class FulfillmentGroupItemStrategyImpl
java.lang.Object
org.broadleafcommerce.core.order.strategy.FulfillmentGroupItemStrategyImpl
- All Implemented Interfaces:
FulfillmentGroupItemStrategy
- Direct Known Subclasses:
NullFulfillmentGroupItemStrategyImpl
@Service("blFulfillmentGroupItemStrategy")
public class FulfillmentGroupItemStrategyImpl
extends Object
implements FulfillmentGroupItemStrategy
- Author:
- Andre Azzolini (apazzolini)
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected FulfillmentGroupItemDaoprotected FulfillmentGroupServiceprotected OrderItemServiceprotected OrderServiceprotected boolean -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected FulfillmentGroupaddItemToFulfillmentGroup(Order order, OrderItem orderItem, int quantity, FulfillmentGroup fulfillmentGroup) protected FulfillmentGroupaddItemToFulfillmentGroup(Order order, OrderItem orderItem, FulfillmentGroup fulfillmentGroup) booleanonItemAdded(CartOperationRequest request) onItemRemoved(CartOperationRequest request) onItemUpdated(CartOperationRequest request) protected FulfillmentTypeprotected FulfillmentTyperesolveFulfillmentType(DiscreteOrderItem discreteOrderItem) Resolves the fulfillment type based on the order item.voidsetRemoveEmptyFulfillmentGroups(boolean removeEmptyFulfillmentGroups) protected List<FulfillmentGroupItem>updateItemQuantity(Order order, OrderItem orderItem, Integer orderItemQuantityDelta) verify(CartOperationRequest request)
-
Field Details
-
fulfillmentGroupService
-
orderItemService
-
orderService
-
fgItemDao
-
removeEmptyFulfillmentGroups
protected boolean removeEmptyFulfillmentGroups
-
-
Constructor Details
-
FulfillmentGroupItemStrategyImpl
public FulfillmentGroupItemStrategyImpl()
-
-
Method Details
-
onItemAdded
- Specified by:
onItemAddedin interfaceFulfillmentGroupItemStrategy- Throws:
PricingException
-
resolveFulfillmentType
Resolves the fulfillment type based on the order item. The OOB implementation uses theDiscreteOrderItem.getSku()to then invokeresolveFulfillmentType(Sku).- Parameters:
discreteOrderItem-- Returns:
-
resolveFulfillmentType
-
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
- Specified by:
onItemUpdatedin interfaceFulfillmentGroupItemStrategy- Throws:
PricingException
-
updateItemQuantity
protected List<FulfillmentGroupItem> updateItemQuantity(Order order, OrderItem orderItem, Integer orderItemQuantityDelta) throws PricingException - Throws:
PricingException
-
onItemRemoved
- Specified by:
onItemRemovedin interfaceFulfillmentGroupItemStrategy
-
verify
- Specified by:
verifyin interfaceFulfillmentGroupItemStrategy- Throws:
PricingException
-
isRemoveEmptyFulfillmentGroups
public boolean isRemoveEmptyFulfillmentGroups()- Specified by:
isRemoveEmptyFulfillmentGroupsin interfaceFulfillmentGroupItemStrategy
-
setRemoveEmptyFulfillmentGroups
public void setRemoveEmptyFulfillmentGroups(boolean removeEmptyFulfillmentGroups) - Specified by:
setRemoveEmptyFulfillmentGroupsin interfaceFulfillmentGroupItemStrategy
-