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
Modifier and TypeMethodDescriptionbooleanonItemAdded(CartOperationRequest request) onItemRemoved(CartOperationRequest request) onItemUpdated(CartOperationRequest request) voidsetRemoveEmptyFulfillmentGroups(boolean removeEmptyFulfillmentGroups) verify(CartOperationRequest request)
-
Method Details
-
onItemAdded
- Throws:
PricingException
-
onItemUpdated
- Throws:
PricingException
-
onItemRemoved
- Throws:
PricingException
-
verify
- Throws:
PricingException
-
isRemoveEmptyFulfillmentGroups
boolean isRemoveEmptyFulfillmentGroups() -
setRemoveEmptyFulfillmentGroups
void setRemoveEmptyFulfillmentGroups(boolean removeEmptyFulfillmentGroups)
-