public class PromotableCandidateItemOfferImpl extends AbstractPromotionRounding implements PromotableCandidateItemOffer, OfferHolder
| Modifier and Type | Field and Description |
|---|---|
protected HashMap<OfferPriceData,List<PromotableOrderItem>> |
candidateFixedTargetsMap |
protected HashMap<OfferItemCriteria,List<PromotableOrderItem>> |
candidateQualifiersMap |
protected HashMap<OfferItemCriteria,List<PromotableOrderItem>> |
candidateTargetsMap |
protected List<PromotableOrderItem> |
legacyCandidateTargets |
protected int |
minimumTargetsRequired |
protected Offer |
offer |
protected Money |
originalPrice |
protected Money |
potentialSavings |
protected Money |
potentialSavingsQtyOne |
protected PromotableOrder |
promotableOrder |
protected boolean |
useQtyOnlyTierCalculation |
protected int |
uses |
protected BigDecimal |
weightedPercentSaved |
roundingMode, roundingScale, roundOfferValues| Constructor and Description |
|---|
PromotableCandidateItemOfferImpl(PromotableOrder promotableOrder,
Offer offer) |
PromotableCandidateItemOfferImpl(PromotableOrder promotableOrder,
Offer offer,
boolean useQtyOnlyTierCalculation) |
getRoundingMode, getRoundingScale, isRoundOfferValues, setRoundingMode, setRoundingScaleclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetRoundingMode, getRoundingScale, isRoundOfferValuesprotected Offer offer
protected PromotableOrder promotableOrder
protected Money potentialSavings
protected Money potentialSavingsQtyOne
protected BigDecimal weightedPercentSaved
protected Money originalPrice
protected int uses
protected boolean useQtyOnlyTierCalculation
protected HashMap<OfferItemCriteria,List<PromotableOrderItem>> candidateQualifiersMap
protected HashMap<OfferItemCriteria,List<PromotableOrderItem>> candidateTargetsMap
protected HashMap<OfferPriceData,List<PromotableOrderItem>> candidateFixedTargetsMap
protected List<PromotableOrderItem> legacyCandidateTargets
protected int minimumTargetsRequired
public PromotableCandidateItemOfferImpl(PromotableOrder promotableOrder, Offer offer)
public PromotableCandidateItemOfferImpl(PromotableOrder promotableOrder, Offer offer, boolean useQtyOnlyTierCalculation)
public BroadleafCurrency getCurrency()
getCurrency in interface OfferHolderpublic int calculateTargetQuantityForTieredOffer()
calculateTargetQuantityForTieredOffer in interface PromotableCandidateItemOfferpublic Money getPotentialSavings()
getPotentialSavings in interface PromotableCandidateItemOfferpublic void setPotentialSavings(Money potentialSavings)
setPotentialSavings in interface PromotableCandidateItemOfferpublic Money getPotentialSavingsQtyOne()
getPotentialSavingsQtyOne in interface PromotableCandidateItemOfferpublic void setPotentialSavingsQtyOne(Money potentialSavingsQtyOne)
setPotentialSavingsQtyOne in interface PromotableCandidateItemOfferpublic boolean hasQualifyingItemCriteria()
hasQualifyingItemCriteria in interface PromotableCandidateItemOfferpublic int calculateMaximumNumberOfUses()
calculateMaximumNumberOfUses in interface PromotableCandidateItemOfferpublic int calculateMaxUsesForItemCriteria(OfferItemCriteria itemCriteria, Offer promotion)
PromotableCandidateItemOffercalculateMaxUsesForItemCriteria in interface PromotableCandidateItemOfferpublic HashMap<OfferItemCriteria,List<PromotableOrderItem>> getCandidateQualifiersMap()
getCandidateQualifiersMap in interface PromotableCandidateItemOfferpublic void setCandidateQualifiersMap(HashMap<OfferItemCriteria,List<PromotableOrderItem>> candidateItemsMap)
setCandidateQualifiersMap in interface PromotableCandidateItemOfferpublic HashMap<OfferItemCriteria,List<PromotableOrderItem>> getCandidateTargetsMap()
getCandidateTargetsMap in interface PromotableCandidateItemOfferpublic void setCandidateTargetsMap(HashMap<OfferItemCriteria,List<PromotableOrderItem>> candidateItemsMap)
setCandidateTargetsMap in interface PromotableCandidateItemOfferpublic HashMap<OfferPriceData,List<PromotableOrderItem>> getCandidateFixedTargetsMap()
getCandidateFixedTargetsMap in interface PromotableCandidateItemOfferpublic void setCandidateFixedTargetsMap(HashMap<OfferPriceData,List<PromotableOrderItem>> candidateFixedTargetsMap)
setCandidateFixedTargetsMap in interface PromotableCandidateItemOfferpublic int getPriority()
getPriority in interface PromotableCandidateItemOfferpublic Offer getOffer()
getOffer in interface OfferHoldergetOffer in interface PromotableCandidateItemOfferpublic int getUses()
getUses in interface PromotableCandidateItemOfferpublic void addUse()
addUse in interface PromotableCandidateItemOfferpublic void resetUses()
PromotableCandidateItemOfferresetUses in interface PromotableCandidateItemOfferItemOfferProcessor#applyAndCompareOrderAndItemOffers(PromotableOrder, List, List)}public List<PromotableOrderItem> getLegacyCandidateTargets()
getLegacyCandidateTargets in interface PromotableCandidateItemOfferpublic void setLegacyCandidateTargets(List<PromotableOrderItem> candidateTargets)
setLegacyCandidateTargets in interface PromotableCandidateItemOfferpublic BigDecimal getWeightedPercentSaved()
getWeightedPercentSaved in interface PromotableCandidateItemOfferpublic void setWeightedPercentSaved(BigDecimal weightedPercentSaved)
setWeightedPercentSaved in interface PromotableCandidateItemOfferpublic Money getOriginalPrice()
getOriginalPrice in interface PromotableCandidateItemOfferpublic void setOriginalPrice(Money originalPrice)
setOriginalPrice in interface PromotableCandidateItemOfferpublic void setMinimumTargetsRequired(Integer minimumTargetsRequired)
setMinimumTargetsRequired in interface PromotableCandidateItemOfferMiniumTargetsRequiredpublic int getMinimumRequiredTargetQuantity()
getMinimumRequiredTargetQuantity in interface PromotableCandidateItemOfferMinimumTargetsRequiredpublic boolean isUseQtyOnlyTierCalculation()
PromotableCandidateItemOfferPromotableCandidateItemOffer.calculateTargetQuantityForTieredOffer() will use only the
quantity in cart for determining which tier level to apply for a group of qualifying items. This mode
is disabled by default. To turn it back on, use
`use.quantity.only.tier.calculation=true` in your `common-shared.properties`.
Otherwise, the default behavior is to factor in the number of iterations that the qualifying items have been
applied.isUseQtyOnlyTierCalculation in interface PromotableCandidateItemOfferPromotableCandidateItemOffer#calculateTargetQuantityForTieredOffer()}public void setUseQtyOnlyTierCalculation(boolean useQtyOnlyTierCalculation)
PromotableCandidateItemOfferPromotableCandidateItemOffer.calculateTargetQuantityForTieredOffer() will use only the
quantity in cart for determining which tier level to apply for a group of qualifying items. This mode
is disabled by default. To turn it back on, use
`use.quantity.only.tier.calculation=true` in your `common-shared.properties`.
Otherwise, the default behavior is to factor in the number of iterations that the qualifying items have been
applied.setUseQtyOnlyTierCalculation in interface PromotableCandidateItemOfferPromotableCandidateItemOffer#calculateTargetQuantityForTieredOffer()}Copyright © 2019. All rights reserved.