Class ItemAttributeFlatRateFulfillmentCalculatorProvider
java.lang.Object
com.broadleafcommerce.fulfillment.provider.ItemAttributeFlatRateFulfillmentCalculatorProvider
- All Implemented Interfaces:
FulfillmentCalculatorProvider
public class ItemAttributeFlatRateFulfillmentCalculatorProvider
extends Object
implements FulfillmentCalculatorProvider
Interface to define a provider capable of returning
FulfillmentCalculator
instances.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected FulfillmentCalculator
buildCalculatorForServiceLevel
(String serviceLevel) protected List<FulfillmentCalculator>
protected String
buildIdForOption
(String serviceLevel) protected String
buildNameForOption
(String serviceLevel) findEligibleFulfillmentPricingCalculators
(FulfillmentPricingContext context, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Returns a list of FulffillmentCalculator objects based on the passed in context.int
boolean
If true, this provider will be used to build the list of fulfillment calculators.void
setCalculatorTypePriority
(int calculatorTypePriority)
-
Constructor Details
-
ItemAttributeFlatRateFulfillmentCalculatorProvider
public ItemAttributeFlatRateFulfillmentCalculatorProvider(boolean enabled)
-
-
Method Details
-
findEligibleFulfillmentPricingCalculators
public List<FulfillmentCalculator> findEligibleFulfillmentPricingCalculators(@NonNull FulfillmentPricingContext context, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Returns a list of FulffillmentCalculator 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:
-
buildFlatRateCalculators
-
buildServiceLevels
-
buildCalculatorForServiceLevel
-
buildNameForOption
-
buildIdForOption
-
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:
-
getCalculatorTypePriority
public int getCalculatorTypePriority() -
setCalculatorTypePriority
public void setCalculatorTypePriority(int calculatorTypePriority)
-