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
ConstructorDescriptionDBFulfillmentCalculatorProvider
(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>
boolean
If true, this provider will be used to build the list of fulfillment calculators.void
setEnabled
(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:
findEligibleFulfillmentPricingCalculators
in 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:FulfillmentCalculatorProvider
If true, this provider will be used to build the list of fulfillment calculators.- Specified by:
isEnabled
in interfaceFulfillmentCalculatorProvider
- Returns:
-
setEnabled
public void setEnabled(boolean enabled) -
getCalculatorConfigService
-