|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.broadleafcommerce.core.pricing.service.fulfillment.provider.BandedFulfillmentPricingProvider
public class BandedFulfillmentPricingProvider
Used in conjunction with BandedPriceFulfillmentOption and BandedWeightFulfillmentOption.
If 2 bands are configured equal to each other (meaning, there are 2 FulfillmentPriceBands that have the
same retail price minimum or 2 FulfillmentWeightBands that have the same minimum weight),
this will choose the cheaper rate of the 2
If the retail total does not fall within a configured price band, the total cost of fulfillment is zero
Note: For BandedWeightFulfillmentOption, this assumes that all of your weights have the same units
BandedPriceFulfillmentOption}, {@link FulfillmentPriceBand}| Field Summary | |
|---|---|
protected static org.apache.commons.logging.Log |
LOG
|
| Constructor Summary | |
|---|---|
BandedFulfillmentPricingProvider()
|
|
| Method Summary | |
|---|---|
FulfillmentGroup |
calculateCostForFulfillmentGroup(FulfillmentGroup fulfillmentGroup)
Calculates the total cost for this FulfillmentGroup. |
boolean |
canCalculateCostForFulfillmentGroup(FulfillmentGroup fulfillmentGroup,
FulfillmentOption option)
Whether or not this processor can provide a cost calculate for the given FulfillmentGroup and the given FulfillmentOption. |
protected BigDecimal |
convertWeight(BigDecimal weight,
WeightUnitOfMeasureType type)
Default implementation is to convert everything to pounds for consistent weight types |
FulfillmentEstimationResponse |
estimateCostForFulfillmentGroup(FulfillmentGroup fulfillmentGroup,
Set<FulfillmentOption> options)
Estimates the cost for the fulfilling the given fulfillment group Estimates the cost for the fulfilling the given fulfillment group with the given options. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final org.apache.commons.logging.Log LOG
| Constructor Detail |
|---|
public BandedFulfillmentPricingProvider()
| Method Detail |
|---|
public boolean canCalculateCostForFulfillmentGroup(FulfillmentGroup fulfillmentGroup,
FulfillmentOption option)
FulfillmentPricingProvider
canCalculateCostForFulfillmentGroup in interface FulfillmentPricingProvideroption - - the candidate option a user might select based on the estimate
FulfillmentPricingService}, {@link FulfillmentOption}
public FulfillmentGroup calculateCostForFulfillmentGroup(FulfillmentGroup fulfillmentGroup)
throws FulfillmentPriceException
FulfillmentPricingProviderFulfillmentGroup.getFulfillmentOption(). This method is invoked
during the pricing workflow and will only be called if FulfillmentPricingProvider.canCalculateCostForFulfillmentGroup(FulfillmentGroup, FulfillmentOption)
returns true. This should call FulfillmentGroup.setShippingPrice(org.broadleafcommerce.common.money.Money) to
set the shipping price on fulfillmentGroup
calculateCostForFulfillmentGroup in interface FulfillmentPricingProviderfulfillmentGroup - - the FulfillmentGroup to calculate costs for
FulfillmentGroup with correct pricing. This is typically fulfillmentGroup after it
has been modified
FulfillmentPriceException
public FulfillmentEstimationResponse estimateCostForFulfillmentGroup(FulfillmentGroup fulfillmentGroup,
Set<FulfillmentOption> options)
throws FulfillmentPriceException
FulfillmentPricingProviderFulfillmentPricingProvider.canCalculateCostForFulfillmentGroup(org.broadleafcommerce.core.order.domain.FulfillmentGroup, org.broadleafcommerce.core.order.domain.FulfillmentOption)
to return true. This method may return null or it may return a non-null response with an empty map, indicating that no price estimate was available for the options given. This
method SHOULD NOT throw an exception if it encounters a FulfillmentOption that it can not price. It should simply ignore that option.
estimateCostForFulfillmentGroup in interface FulfillmentPricingProviderfulfillmentGroup - - the group to estimate fulfillment costs foroptions - - the candidate options that a user might select
FulfillmentPricingProvider.calculateCostForFulfillmentGroup(FulfillmentGroup) is invoked during the pricing workflow
FulfillmentPriceExceptionFulfillmentPricingService}, {@link FulfillmentOption}
protected BigDecimal convertWeight(BigDecimal weight,
WeightUnitOfMeasureType type)
weight - type -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||