Class ItemAttributeFlatRateFulfillmentCalculator
java.lang.Object
com.broadleafcommerce.fulfillment.service.dto.calculator.ItemAttributeFlatRateFulfillmentCalculator
- All Implemented Interfaces:
FulfillmentCalculator
public class ItemAttributeFlatRateFulfillmentCalculator
extends Object
implements FulfillmentCalculator
Calculator that calculates flat rates based on the attributes of the
FulfillmentPricingItem-
Field Summary
FieldsFields inherited from interface com.broadleafcommerce.fulfillment.service.dto.calculator.FulfillmentCalculator
DEFAULT_CALCULATOR_TYPE_PRIORITY, DEFAULT_FLAT_RATE_TYPE_PRIORITY, FLAT_RATE_ITEM_ATTR, UNKNOWN -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanintBy default, DB configured calculators run between the code level calculators.getId()Returns the id of this calculatorgetName()Returns the name of this calculatorReturns the service level that this calculator is able to operate on.getType()booleanbooleanIndicates whether this calculator should be used.booleanmatchesCurrency(javax.money.CurrencyUnit currency) Always return true.voidsetCalculatorTypePriority(int calculatorTypePriority) voidsetEnabled(boolean enabled) voidvoidvoidsetPriority(Integer priority) voidsetServiceLevel(String serviceLevel) voidMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.broadleafcommerce.fulfillment.service.dto.calculator.FulfillmentCalculator
getFulfillmentCalculatorConfig, hasCalculatorConfig, matchesAddress, matchesAnyFulfillmentTypes, matchesAnyInventoryTypes, matchesAnyOriginInfo, matchesFulfillmentType, matchesInventoryType, matchesOriginInfo
-
Field Details
-
type
-
-
Constructor Details
-
ItemAttributeFlatRateFulfillmentCalculator
public ItemAttributeFlatRateFulfillmentCalculator()
-
-
Method Details
-
isEnabled
Description copied from interface:FulfillmentCalculatorIndicates whether this calculator should be used. Database driven calculators will rely on active dates. Configured calculators can be disabled by setting this property.- Specified by:
isEnabledin interfaceFulfillmentCalculator- Returns:
- true if this calculator is enabled
-
matchesCurrency
public boolean matchesCurrency(javax.money.CurrencyUnit currency) Always return true. This calculator uses MonetaryAmounts passed in on the request and therefore will always match. Note, however, in processing if the flat rate amounts are in a different currency than the fulfillment request, they will be ignored.- Specified by:
matchesCurrencyin interfaceFulfillmentCalculator- Parameters:
currency-- Returns:
-
canHandle
- Specified by:
canHandlein interfaceFulfillmentCalculator
-
getEstimatedMinDaysToFulfill
- Specified by:
getEstimatedMinDaysToFulfillin interfaceFulfillmentCalculator
-
getEstimatedMaxDaysToFulfill
- Specified by:
getEstimatedMaxDaysToFulfillin interfaceFulfillmentCalculator
-
getCalculatorTypePriority
public int getCalculatorTypePriority()Description copied from interface:FulfillmentCalculatorBy default, DB configured calculators run between the code level calculators. Implementations can control ordering by configuring calculators to run at the same "type" priority and then use only the "priority" field for default sorting.- Specified by:
getCalculatorTypePriorityin interfaceFulfillmentCalculator- Returns:
- The priority of this fulfillment calculator type.
-
getPriority
- Specified by:
getPriorityin interfaceFulfillmentCalculator
-
getId
Description copied from interface:FulfillmentCalculatorReturns the id of this calculator- Specified by:
getIdin interfaceFulfillmentCalculator- Returns:
- The id for this calculator which must be unique.
-
getName
Description copied from interface:FulfillmentCalculatorReturns the name of this calculator- Specified by:
getNamein interfaceFulfillmentCalculator- Returns:
- The name of the calculator which is useful for debugging.
-
getServiceLevel
Description copied from interface:FulfillmentCalculatorReturns the service level that this calculator is able to operate on.- Specified by:
getServiceLevelin interfaceFulfillmentCalculator- Returns:
- The service level
-
isEnabled
public boolean isEnabled() -
getType
- Specified by:
getTypein interfaceFulfillmentCalculator
-
setCalculatorTypePriority
public void setCalculatorTypePriority(int calculatorTypePriority) - Specified by:
setCalculatorTypePriorityin interfaceFulfillmentCalculator
-
setPriority
-
setId
-
setName
-
setServiceLevel
-
setEnabled
public void setEnabled(boolean enabled) -
setType
-