Interface FulfillmentSplittingService<F extends com.broadleafcommerce.order.client.domain.OrderFulfillment>

All Known Implementing Classes:
DefaultFulfillmentSplittingService

public interface FulfillmentSplittingService<F extends com.broadleafcommerce.order.client.domain.OrderFulfillment>
Responsible for splitting a fulfillment into two based on requested item quantities.
  • Method Summary

    Modifier and Type
    Method
    Description
    splitFulfillment(F fulfillment, List<Map<String,Integer>> itemQuantities)
    Splits the given fulfillment into multiple.
  • Method Details

    • splitFulfillment

      List<F> splitFulfillment(F fulfillment, List<Map<String,Integer>> itemQuantities)
      Splits the given fulfillment into multiple. The first split fulfillment will contain the remainder of the original fulfillment, while the rest will contain the portions requested by itemQuantities.
      Parameters:
      fulfillment - the original fulfillment to split
      itemQuantities - the quantities of each item to put into each fulfillment, with each map having the fulfillment item ID as the key, and the quantity to include in that fulfillment as the value
      Returns:
      a list containing the original fulfillment now containing the remainder of the original fulfillment, and all of the new fulfillments each containing the items requested