Interface FulfillmentCalculatorService
- All Known Implementing Classes:
DefaultFulfillmentCalculatorService
public interface FulfillmentCalculatorService
Service interface to find, qualify, and process fulfillment pricing using
FulfillmentCalculator
s.-
Method Summary
Modifier and TypeMethodDescriptionfindEligibleFulfillmentPricingCalculators
(FulfillmentPricingContext context, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Given theFulfillmentPricingContext
, this method returns a list of eligibleFulfillmentCalculator
calculators that can be used to compute option pricing.void
priceFulfillmentGroups
(FulfillmentPricingContext context, List<FulfillmentCalculator> calculators) Price the passed inFulfillmentPricingContext.getPricingGroups()
using the passed in calculators.void
priceFulfillmentItems
(FulfillmentPricingContext context, List<FulfillmentCalculator> calculators) Price the passed inFulfillmentPricingContext.getPricingGroups()
using the passed in calculators.
-
Method Details
-
findEligibleFulfillmentPricingCalculators
List<FulfillmentCalculator> findEligibleFulfillmentPricingCalculators(@NonNull FulfillmentPricingContext context, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Given theFulfillmentPricingContext
, this method returns a list of eligibleFulfillmentCalculator
calculators that can be used to compute option pricing.- Parameters:
context
- the pricing context containing the items and originating requestcontextInfo
- the context info providing tenancy and application data- Returns:
- List of
Fulfillment Calculators
sorted in default order.
-
priceFulfillmentGroups
void priceFulfillmentGroups(FulfillmentPricingContext context, List<FulfillmentCalculator> calculators) Price the passed inFulfillmentPricingContext.getPricingGroups()
using the passed in calculators. Modifies the passed inEnhancedFulfillmentPricingGroup
and its containedItems
with the computed price information. Adds aGroupServiceLevelPriceResult
toEnhancedFulfillmentPricingGroup.getServiceLevelPriceMap()
where the map key is the service level (e.g. "STANDARD") as defined inFulfillmentPricingConfig#getSupportedFulfillmentOptions()
- Parameters:
context
- the pricing context containing the items and originating requestcalculators
- the list of calculators to use for pricing
-
priceFulfillmentItems
void priceFulfillmentItems(FulfillmentPricingContext context, List<FulfillmentCalculator> calculators) Price the passed inFulfillmentPricingContext.getPricingGroups()
using the passed in calculators. Modifies the passed inEnhancedFulfillmentPricingGroup
and its containedItems
with the computed price information. Adds aFulfillmentItemPriceResult
to each item for each applicable service level (e.g. "STANDARD")- Parameters:
context
- the pricing context containing the items and originating requestcalculators
- the list of calculators to use for pricing
-