Class FulfillmentCalculatorConfig
java.lang.Object
com.broadleafcommerce.fulfillment.domain.FulfillmentCalculatorConfig
- All Implemented Interfaces:
com.broadleafcommerce.data.tracking.core.ContextStateAware
public class FulfillmentCalculatorConfig
extends Object
implements com.broadleafcommerce.data.tracking.core.ContextStateAware
Fulfillment pricing configurations that apply to this whole context (tenant or application).
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanbooleanThe latest date this config should be used.The earliest date this config should be used.Indicates which field on the item should be used to determine price band, e.g.Indicate if and how this calculator handles multiple items.Indicate if the calculator should return a fixed price or multiply by a set rate.com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextStateA subset ofTrackinginformation to expose the context state for this object.javax.money.CurrencyUnitThe currency that this calculator operates in.Indicate the destination country that this calculator can handle.Indicate how the fulfillment's destination should be determined.Maximum allowed dimension value.Unit of measure of the dimension restriction amount.Typical max number of days for the customer to receive inventory with this option.Typical min number of days for the customer to receive inventory with this option.Indicates geographic zones for destinations that this configuration can handle.Indicates geographic zones for origins that this configuration can handle.The bands to determine fulfillment price.The Fulfillment Type that this calculator operates on.getId()Unique id of this calculator.The Location Number of an InventoryLocation in the system to use as the origin for this calculator.The Inventory Types that this calculator can process.getName()User defined name for the calculator.Indicate how the fulfillment's origination location should be determined.The execution priority of this calculator config.The Service Level that this calculator operates on.Maximum allowed weight value.Unit of measure of the weight restriction amount.The unit of measure to use for weight price tiers.inthashCode()booleanisActive()Indicates if this calculator should be used for fulfillment calculations.booleanIndicate if there is a restriction on item dimensions.booleanIndicate if there is a restriction on item weight.voidsetActive(boolean active) Indicates if this calculator should be used for fulfillment calculations.voidsetActiveEndDate(Instant activeEndDate) The latest date this config should be used.voidsetActiveStartDate(Instant activeStartDate) The earliest date this config should be used.voidsetBandField(BandField bandField) Indicates which field on the item should be used to determine price band, e.g.voidsetCalculationMethod(CalculationMethod calculationMethod) Indicate if and how this calculator handles multiple items.voidsetCalculatorOperation(CalculatorOperation calculatorOperation) Indicate if the calculator should return a fixed price or multiply by a set rate.voidsetContextState(com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState contextState) A subset ofTrackinginformation to expose the context state for this object.voidsetCurrency(javax.money.CurrencyUnit currency) The currency that this calculator operates in.voidsetDestinationCountryCode(String destinationCountryCode) Indicate the destination country that this calculator can handle.voidsetDestinationType(FulfillmentDestinationType destinationType) Indicate how the fulfillment's destination should be determined.voidsetDimensionRestriction(boolean dimensionRestriction) Indicate if there is a restriction on item dimensions.voidsetDimensionRestrictionAmount(Double dimensionRestrictionAmount) Maximum allowed dimension value.voidsetDimensionRestrictionUnit(String dimensionRestrictionUnit) Unit of measure of the dimension restriction amount.voidsetEstimatedMaxDaysToFulfill(Integer estimatedMaxDaysToFulfill) Typical max number of days for the customer to receive inventory with this option.voidsetEstimatedMinDaysToFulfill(Integer estimatedMinDaysToFulfill) Typical min number of days for the customer to receive inventory with this option.voidsetFulfillmentDestination(FulfillmentDestination fulfillmentDestination) Indicates geographic zones for destinations that this configuration can handle.voidsetFulfillmentOrigin(FulfillmentOrigin fulfillmentOrigin) Indicates geographic zones for origins that this configuration can handle.voidsetFulfillmentPriceTiers(List<FulfillmentPriceTier> fulfillmentPriceTiers) The bands to determine fulfillment price.voidsetFulfillmentType(String fulfillmentType) The Fulfillment Type that this calculator operates on.voidUnique id of this calculator.voidsetInventoryLocation(String inventoryLocation) The Location Number of an InventoryLocation in the system to use as the origin for this calculator.voidsetInventoryType(String inventoryType) The Inventory Types that this calculator can process.voidUser defined name for the calculator.voidsetOriginType(FulfillmentOriginType originType) Indicate how the fulfillment's origination location should be determined.voidsetPriority(Integer priority) The execution priority of this calculator config.voidsetServiceLevel(String serviceLevel) The Service Level that this calculator operates on.voidsetWeightRestriction(boolean weightRestriction) Indicate if there is a restriction on item weight.voidsetWeightRestrictionAmount(Double weightRestrictionAmount) Maximum allowed weight value.voidsetWeightRestrictionUnit(String weightRestrictionUnit) Unit of measure of the weight restriction amount.voidsetWeightUnit(String weightUnit) The unit of measure to use for weight price tiers.toString()
-
Constructor Details
-
FulfillmentCalculatorConfig
public FulfillmentCalculatorConfig()
-
-
Method Details
-
getId
Unique id of this calculator.- Returns:
- The unique id of this calculator.
-
getName
User defined name for the calculator.- Returns:
- A user defined name for the calculator.
-
getFulfillmentType
The Fulfillment Type that this calculator operates on. For example, SHIP or PICKUP. This corresponds tocom.broadleafcommerce.order.common.domain.enums.FulfillmentType.- Returns:
- The FulfillmentType that this calculator operates on.
-
getServiceLevel
The Service Level that this calculator operates on. For example, STANDARD or EXPRESS.- Returns:
- The Service Level that this calculator operates on.
-
isActive
public boolean isActive()Indicates if this calculator should be used for fulfillment calculations.- Returns:
- Indicates if this calculator should be used for fulfillment calculations.
-
getEstimatedMinDaysToFulfill
Typical min number of days for the customer to receive inventory with this option. Must be greater than or equal to zero. -
getEstimatedMaxDaysToFulfill
Typical max number of days for the customer to receive inventory with this option. -
getCurrency
public javax.money.CurrencyUnit getCurrency()The currency that this calculator operates in.- Returns:
- The currency that this calculator operates in.
-
getDestinationType
Indicate how the fulfillment's destination should be determined.- Returns:
- The
FulfillmentDestinationTypefor this calculator.
-
getFulfillmentDestination
Indicates geographic zones for destinations that this configuration can handle. Only necessary when usingFulfillmentDestinationType.FULFILLMENT_DESTINATION.- Returns:
- The
FulfillmentDestinationfor this calculator.
-
getDestinationCountryCode
Indicate the destination country that this calculator can handle. Only necessary when usingFulfillmentDestinationType.COUNTRY_CODE.- Returns:
- The country code to use for the fulfillment destination
-
getOriginType
Indicate how the fulfillment's origination location should be determined.- Returns:
- The
FulfillmentOriginTypefor this calculator.
-
getInventoryLocation
The Location Number of an InventoryLocation in the system to use as the origin for this calculator. Only necessary when usingFulfillmentOriginType.INVENTORY_LOCATION.- Returns:
- The Location Number associated with this calculator.
- See Also:
-
com.broadleafcommerce.inventory.domain.InventoryLocation#locationNumber
-
getFulfillmentOrigin
Indicates geographic zones for origins that this configuration can handle. Only necessary when usingFulfillmentOriginType.FULFILLMENT_ORIGIN.- Returns:
- The
FulfillmentOriginfor this calculator.
-
getCalculationMethod
Indicate if and how this calculator handles multiple items.- Returns:
- The
CalculationMethodfor this config.
-
getCalculatorOperation
Indicate if the calculator should return a fixed price or multiply by a set rate. -
getBandField
Indicates which field on the item should be used to determine price band, e.g. item price or item weight.- Returns:
- The
BandFieldto use for banding.
-
getWeightUnit
The unit of measure to use for weight price tiers.- Returns:
- The unit of measure to use for weight price tiers.
-
getFulfillmentPriceTiers
The bands to determine fulfillment price.- Returns:
- The bands to determine fulfillment price.
-
getInventoryType
The Inventory Types that this calculator can process. "ANY" indicates the calculator can handle any inventory type. Some calculators may only target InventoryType#PHYSICAL or InventoryType#VIRTUAL types. The calculator value will be used to filter eligible items based on theFulfillmentPricingItem.inventoryType -
getPriority
The execution priority of this calculator config.- Returns:
- The execution priority of this calculator config.
-
getActiveStartDate
The earliest date this config should be used.- Returns:
- The earliest date this config should be used.
-
getActiveEndDate
The latest date this config should be used.- Returns:
- The latest date this config should be used.
-
isDimensionRestriction
public boolean isDimensionRestriction()Indicate if there is a restriction on item dimensions. -
getDimensionRestrictionAmount
Maximum allowed dimension value. -
getDimensionRestrictionUnit
Unit of measure of the dimension restriction amount. -
isWeightRestriction
public boolean isWeightRestriction()Indicate if there is a restriction on item weight. -
getWeightRestrictionAmount
Maximum allowed weight value. -
getWeightRestrictionUnit
Unit of measure of the weight restriction amount. -
getContextState
public com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState getContextState()A subset ofTrackinginformation to expose the context state for this object.- Specified by:
getContextStatein interfacecom.broadleafcommerce.data.tracking.core.ContextStateAware- Returns:
- a subset of
Trackinginformation to expose the context state for this object
-
setId
Unique id of this calculator.- Parameters:
id- The unique id of this calculator.
-
setName
User defined name for the calculator.- Parameters:
name- A user defined name for the calculator.
-
setFulfillmentType
The Fulfillment Type that this calculator operates on. For example, SHIP or PICKUP. This corresponds tocom.broadleafcommerce.order.common.domain.enums.FulfillmentType.- Parameters:
fulfillmentType- The FulfillmentType that this calculator operates on.
-
setServiceLevel
The Service Level that this calculator operates on. For example, STANDARD or EXPRESS.- Parameters:
serviceLevel- The Service Level that this calculator operates on.
-
setActive
public void setActive(boolean active) Indicates if this calculator should be used for fulfillment calculations.- Parameters:
active- Indicates if this calculator should be used for fulfillment calculations.
-
setEstimatedMinDaysToFulfill
Typical min number of days for the customer to receive inventory with this option. Must be greater than or equal to zero. -
setEstimatedMaxDaysToFulfill
Typical max number of days for the customer to receive inventory with this option. -
setCurrency
public void setCurrency(javax.money.CurrencyUnit currency) The currency that this calculator operates in.- Parameters:
currency- The currency that this calculator operates in.
-
setDestinationType
Indicate how the fulfillment's destination should be determined.- Parameters:
destinationType- TheFulfillmentDestinationTypefor this calculator.
-
setFulfillmentDestination
Indicates geographic zones for destinations that this configuration can handle. Only necessary when usingFulfillmentDestinationType.FULFILLMENT_DESTINATION.- Parameters:
fulfillmentDestination- TheFulfillmentDestinationfor this calculator.
-
setDestinationCountryCode
Indicate the destination country that this calculator can handle. Only necessary when usingFulfillmentDestinationType.COUNTRY_CODE.- Parameters:
countryCode- The country code to use for the fulfillment destination
-
setOriginType
Indicate how the fulfillment's origination location should be determined.- Parameters:
originType- TheFulfillmentOriginTypefor this calculator.
-
setInventoryLocation
The Location Number of an InventoryLocation in the system to use as the origin for this calculator. Only necessary when usingFulfillmentOriginType.INVENTORY_LOCATION.- Parameters:
inventoryLocation- The Location Number of an InventoryLocation in the system.- See Also:
-
com.broadleafcommerce.inventory.domain.InventoryLocation#locationNumber
-
setFulfillmentOrigin
Indicates geographic zones for origins that this configuration can handle. Only necessary when usingFulfillmentOriginType.FULFILLMENT_ORIGIN.- Parameters:
fulfillmentOrigin- TheFulfillmentOriginfor this calculator.
-
setCalculationMethod
Indicate if and how this calculator handles multiple items.- Parameters:
calculationMethod- TheCalculationMethodfor this config.
-
setCalculatorOperation
Indicate if the calculator should return a fixed price or multiply by a set rate. -
setBandField
Indicates which field on the item should be used to determine price band, e.g. item price or item weight.- Parameters:
bandField- TheBandFieldto use for banding.
-
setWeightUnit
The unit of measure to use for weight price tiers.- Parameters:
weightUnit- The unit of measure to use for weight price tiers.
-
setFulfillmentPriceTiers
The bands to determine fulfillment price.- Parameters:
fulfillmentPriceTiers- The bands to determine fulfillment price.
-
setInventoryType
The Inventory Types that this calculator can process. "ANY" indicates the calculator can handle any inventory type. Some calculators may only target InventoryType#PHYSICAL or InventoryType#VIRTUAL types. The calculator value will be used to filter eligible items based on theFulfillmentPricingItem.inventoryType -
setPriority
The execution priority of this calculator config.- Parameters:
priority- The execution priority of this calculator config.
-
setActiveStartDate
The earliest date this config should be used.- Parameters:
activeStartDate- The earliest date this config should be used.
-
setActiveEndDate
The latest date this config should be used.- Parameters:
activeEndDate- The latest date this config should be used.
-
setDimensionRestriction
public void setDimensionRestriction(boolean dimensionRestriction) Indicate if there is a restriction on item dimensions. -
setDimensionRestrictionAmount
Maximum allowed dimension value. -
setDimensionRestrictionUnit
Unit of measure of the dimension restriction amount. -
setWeightRestriction
public void setWeightRestriction(boolean weightRestriction) Indicate if there is a restriction on item weight. -
setWeightRestrictionAmount
Maximum allowed weight value. -
setWeightRestrictionUnit
Unit of measure of the weight restriction amount. -
setContextState
public void setContextState(com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState contextState) A subset ofTrackinginformation to expose the context state for this object.- Specified by:
setContextStatein interfacecom.broadleafcommerce.data.tracking.core.ContextStateAware- Parameters:
contextState- a subset ofTrackinginformation to expose the context state for this object
-
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-