org.broadleafcommerce.core.offer.service.discount.domain
Interface PromotableCandidateItemOffer
- All Superinterfaces:
- Serializable
- All Known Implementing Classes:
- PromotableCandidateItemOfferImpl
public interface PromotableCandidateItemOffer
- extends Serializable
getCandidateQualifiersMap
HashMap<OfferItemCriteria,List<PromotableOrderItem>> getCandidateQualifiersMap()
setCandidateQualifiersMap
void setCandidateQualifiersMap(HashMap<OfferItemCriteria,List<PromotableOrderItem>> candidateItemsMap)
getCandidateTargets
List<PromotableOrderItem> getCandidateTargets()
setCandidateTargets
void setCandidateTargets(List<PromotableOrderItem> candidateTargets)
getPotentialSavings
Money getPotentialSavings()
setPotentialSavings
void setPotentialSavings(Money savings)
hasQualifyingItemCriteria
boolean hasQualifyingItemCriteria()
calculateSavingsForOrderItem
Money calculateSavingsForOrderItem(PromotableOrderItem orderItem,
int qtyToReceiveSavings)
- Public only for unit testing - not intended to be called
calculateMaximumNumberOfUses
int calculateMaximumNumberOfUses()
calculateTargetQuantityForTieredOffer
int calculateTargetQuantityForTieredOffer()
- Returns the number of item quantities that qualified as targets for
this promotion.
calculateMaxUsesForItemCriteria
int calculateMaxUsesForItemCriteria(OfferItemCriteria itemCriteria,
Offer promotion)
- Determines the max number of times this itemCriteria might apply. This calculation does
not take into account other promotions. It is useful only to assist in prioritizing the order to process
the promotions.
- Parameters:
itemCriteria - promotion -
- Returns:
getPriority
int getPriority()
getOffer
Offer getOffer()
getUses
int getUses()
addUse
void addUse()
resetUses
void resetUses()
- Resets the uses for this candidate offer item. This is mainly used in the case where we want to calculate savings
and then actually apply the promotion to an item. Both scenarios run through the same logic that add uses in order
to determine if various quantities of items can be targeted for a particular promotion.
- See Also:
ItemOfferProcessor#applyAndCompareOrderAndItemOffers(PromotableOrder, List, List)}
isLegacyOffer
boolean isLegacyOffer()
Copyright © 2013. All Rights Reserved.