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
ConstructorsConstructorDescriptionDBFulfillmentCalculatorProvider(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 DistanceCalculationHelperprotected GeoCoordinateServiceprotected com.broadleafcommerce.common.extension.TypeFactoryprotected WeightCalculationHelperbooleanIf true, this provider will be used to build the list of fulfillment calculators.voidsetEnabled(boolean enabled) voidsetGeoCoordinateService(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:
findEligibleFulfillmentPricingCalculatorsin 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: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
-
getWeightCalculationHelper
-
getDistanceCalculationHelper
-
getTypeFactory
protected com.broadleafcommerce.common.extension.TypeFactory getTypeFactory() -
setGeoCoordinateService
-
getGeoCoordinateService
-