Class DBFulfillmentCalculator
java.lang.Object
com.broadleafcommerce.fulfillment.service.dto.calculator.DBFulfillmentCalculator
- All Implemented Interfaces:
FulfillmentCalculator
-
Field Summary
Fields 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
-
Method Summary
Modifier and TypeMethodDescriptionboolean
getId()
Returns the id of this calculatorgetName()
Returns the name of this calculatorReturns the service level that this calculator is able to operate on.boolean
boolean
Indicates whether this calculator should be used.boolean
matchesAddress
(com.broadleafcommerce.fulfillment.common.domain.Address address) Returns true if this calculator can compute prices for the passed inAddress
boolean
matchesCurrency
(javax.money.CurrencyUnit currencyUnit) boolean
matchesFulfillmentType
(String type) Returns true if the calculator can handle the passed in fulfillment type.boolean
matchesInventoryType
(String type) Returns true if the calculator can handle the passed in inventory type.boolean
matchesOriginInfo
(com.broadleafcommerce.fulfillment.common.domain.FulfillmentOriginInfo originInfo) Returns true if theFulfillmentOriginInfo
can be handled by this calculator.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.broadleafcommerce.fulfillment.service.dto.calculator.FulfillmentCalculator
getCalculatorTypePriority, getType, matchesAnyFulfillmentTypes, matchesAnyInventoryTypes, matchesAnyOriginInfo, setCalculatorTypePriority
-
Constructor Details
-
DBFulfillmentCalculator
-
-
Method Details
-
getPriority
- Specified by:
getPriority
in interfaceFulfillmentCalculator
-
getName
Description copied from interface:FulfillmentCalculator
Returns the name of this calculator- Specified by:
getName
in interfaceFulfillmentCalculator
- Returns:
- The name of the calculator which is useful for debugging.
-
getId
Description copied from interface:FulfillmentCalculator
Returns the id of this calculator- Specified by:
getId
in interfaceFulfillmentCalculator
- Returns:
- The id for this calculator which must be unique.
-
isEnabled
Description copied from interface:FulfillmentCalculator
Indicates 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:
isEnabled
in interfaceFulfillmentCalculator
- Returns:
- true if this calculator is enabled
-
getServiceLevel
Description copied from interface:FulfillmentCalculator
Returns the service level that this calculator is able to operate on.- Specified by:
getServiceLevel
in interfaceFulfillmentCalculator
- Returns:
- The service level
-
matchesCurrency
public boolean matchesCurrency(javax.money.CurrencyUnit currencyUnit) - Specified by:
matchesCurrency
in interfaceFulfillmentCalculator
-
matchesAddress
public boolean matchesAddress(com.broadleafcommerce.fulfillment.common.domain.Address address) Description copied from interface:FulfillmentCalculator
Returns true if this calculator can compute prices for the passed inAddress
- Specified by:
matchesAddress
in interfaceFulfillmentCalculator
- Returns:
- See Also:
-
canHandle
- Specified by:
canHandle
in interfaceFulfillmentCalculator
-
matchesOriginInfo
public boolean matchesOriginInfo(com.broadleafcommerce.fulfillment.common.domain.FulfillmentOriginInfo originInfo) Description copied from interface:FulfillmentCalculator
Returns true if theFulfillmentOriginInfo
can be handled by this calculator. The origin info is typically a container of inventory location references but can be implementation dependent.- Specified by:
matchesOriginInfo
in interfaceFulfillmentCalculator
- Returns:
-
matchesInventoryType
Description copied from interface:FulfillmentCalculator
Returns true if the calculator can handle the passed in inventory type.- Specified by:
matchesInventoryType
in interfaceFulfillmentCalculator
- Parameters:
type
- The type to check- Returns:
-
matchesFulfillmentType
Description copied from interface:FulfillmentCalculator
Returns true if the calculator can handle the passed in fulfillment type.- Specified by:
matchesFulfillmentType
in interfaceFulfillmentCalculator
- Parameters:
type
- The type to check- Returns:
-
getEstimatedMinDaysToFulfill
- Specified by:
getEstimatedMinDaysToFulfill
in interfaceFulfillmentCalculator
-
getEstimatedMaxDaysToFulfill
- Specified by:
getEstimatedMaxDaysToFulfill
in interfaceFulfillmentCalculator
-
hasCalculatorConfig
public boolean hasCalculatorConfig()- Specified by:
hasCalculatorConfig
in interfaceFulfillmentCalculator
-
getFulfillmentCalculatorConfig
- Specified by:
getFulfillmentCalculatorConfig
in interfaceFulfillmentCalculator
-