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
Provider for
DBFulfillmentCalculator
.-
Constructor Summary
ConstructorDescriptionDBFulfillmentCalculatorProvider
(FulfillmentCalculatorConfigService<P> calculatorConfigService, WeightCalculationHelper weightCalculationHelper, DistanceCalculationHelper distanceCalculationHelper, com.broadleafcommerce.common.extension.TypeFactory typeFactory) -
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>
protected DistanceCalculationHelper
protected GeoCoordinateService
protected com.broadleafcommerce.common.extension.TypeFactory
protected WeightCalculationHelper
boolean
If true, this provider will be used to build the list of fulfillment calculators.void
setEnabled
(boolean enabled) void
setGeoCoordinateService
(GeoCoordinateService geoCoordinateService)
-
Constructor Details
-
DBFulfillmentCalculatorProvider
public DBFulfillmentCalculatorProvider(FulfillmentCalculatorConfigService<P> calculatorConfigService, WeightCalculationHelper weightCalculationHelper, DistanceCalculationHelper distanceCalculationHelper, com.broadleafcommerce.common.extension.TypeFactory typeFactory)
-
-
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:
- List of eligible
DBFulfillmentCalculators
.
-
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
-
getWeightCalculationHelper
-
getDistanceCalculationHelper
-
getTypeFactory
protected com.broadleafcommerce.common.extension.TypeFactory getTypeFactory() -
setGeoCoordinateService
-
getGeoCoordinateService
-