org.broadleafcommerce.core.order.fulfillment.domain
Interface FulfillmentWeightBand

All Superinterfaces:
FulfillmentBand, Serializable
All Known Implementing Classes:
FulfillmentWeightBandImpl

public interface FulfillmentWeightBand
extends FulfillmentBand

This entity defines the bands that can be specified for BandedWeightFulfillmentOption. Bands work on the cumulated weight of an Order and should be calculated as follows:

  1. The weight of all of the OrderItems (via the relationship to Sku) in a FulfillmentGroup (which is obtained through their relationship with FulfillmentGroupItem are summed together
  2. The FulfillmentWeightBand should be looked up by getting the closest band less than the sum of the weights
  3. If FulfillmentBand.getResultAmountType() returns FulfillmentBandResultAmountType.RATE, then the cost for the fulfillment group is whatever is defined in FulfillmentBand.getResultAmount()
  4. If FulfillmentBand.getResultAmountType() returns FulfillmentBandResultAmountType.PERCENTAGE, then the fulfillment cost is the percentage obtained by FulfillmentBand.getResultAmount() * retailPriceTotal
  5. If two bands have the same weight, the cheapest resulting amount is used

Note: this implementation assumes that units of measurement (lb, kg, etc) are the same across the site implementation

Author:
Phillip Verheyden

Method Summary
 BigDecimal getMinimumWeight()
           
 BandedWeightFulfillmentOption getOption()
           
 WeightUnitOfMeasureType getWeightUnitOfMeasure()
           
 void setMinimumWeight(BigDecimal weight)
           
 void setOption(BandedWeightFulfillmentOption option)
           
 void setWeightUnitOfMeasure(WeightUnitOfMeasureType weightUnitOfMeasure)
           
 
Methods inherited from interface org.broadleafcommerce.core.order.fulfillment.domain.FulfillmentBand
getId, getResultAmount, getResultAmountType, setId, setResultAmount, setResultAmountType
 

Method Detail

getMinimumWeight

BigDecimal getMinimumWeight()

setMinimumWeight

void setMinimumWeight(BigDecimal weight)

getOption

BandedWeightFulfillmentOption getOption()

setOption

void setOption(BandedWeightFulfillmentOption option)

getWeightUnitOfMeasure

WeightUnitOfMeasureType getWeightUnitOfMeasure()

setWeightUnitOfMeasure

void setWeightUnitOfMeasure(WeightUnitOfMeasureType weightUnitOfMeasure)


Copyright © 2012. All Rights Reserved.