Class DBFulfillmentCalculatorProvider<P extends FulfillmentCalculatorConfig>
java.lang.Object
com.broadleafcommerce.fulfillment.provider.DBFulfillmentCalculatorProvider<P>
- All Implemented Interfaces:
FulfillmentCalculatorProvider
public class DBFulfillmentCalculatorProvider<P extends FulfillmentCalculatorConfig>
extends Object
implements FulfillmentCalculatorProvider
Interface to define a provider capable of returning
FulfillmentCalculator instances.-
Constructor Summary
ConstructorsConstructorDescriptionDBFulfillmentCalculatorProvider(FulfillmentCalculatorConfigService<P> configService) -
Method Summary
Modifier and TypeMethodDescriptionprotected List<FulfillmentCalculator>convertConfigsToCalculators(List<P> configs) findEligibleFulfillmentPricingCalculators(FulfillmentPricingContext context, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Returns a list of FulfillmentCalculator objects based on the passed in context.protected FulfillmentCalculatorConfigService<P>booleanIf true, this provider will be used to build the list of fulfillment calculators.voidsetEnabled(boolean enabled)
-
Constructor Details
-
DBFulfillmentCalculatorProvider
-
-
Method Details
-
findEligibleFulfillmentPricingCalculators
public List<FulfillmentCalculator> findEligibleFulfillmentPricingCalculators(@NonNull FulfillmentPricingContext context, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Returns a list of FulfillmentCalculator objects based on the passed in context.- Specified by:
findEligibleFulfillmentPricingCalculatorsin interfaceFulfillmentCalculatorProvider- Parameters:
context- Container with the request and state objects needed to determine eligibility.contextInfo- Context info sed for any DB operations.- Returns:
-
convertConfigsToCalculators
-
isEnabled
public boolean isEnabled()Description copied from interface:FulfillmentCalculatorProviderIf true, this provider will be used to build the list of fulfillment calculators.- Specified by:
isEnabledin interfaceFulfillmentCalculatorProvider- Returns:
-
setEnabled
public void setEnabled(boolean enabled) -
getCalculatorConfigService
-