org.broadleafcommerce.core.offer.service.discount.domain
Interface PromotableCandidateItemOffer

All Superinterfaces:
Serializable
All Known Implementing Classes:
PromotableCandidateItemOfferImpl

public interface PromotableCandidateItemOffer
extends Serializable


Method Summary
 void addUse()
           
 int calculateMaximumNumberOfUses()
           
 int calculateMaxUsesForItemCriteria(OfferItemCriteria itemCriteria, Offer promotion)
          Determines the max number of times this itemCriteria might apply.
 Money calculateSavingsForOrderItem(PromotableOrderItem orderItem, int qtyToReceiveSavings)
          Public only for unit testing - not intended to be called
 int calculateTargetQuantityForTieredOffer()
          Returns the number of item quantities that qualified as targets for this promotion.
 HashMap<OfferItemCriteria,List<PromotableOrderItem>> getCandidateQualifiersMap()
           
 List<PromotableOrderItem> getCandidateTargets()
           
 Offer getOffer()
           
 Money getPotentialSavings()
           
 int getPriority()
           
 int getUses()
           
 boolean hasQualifyingItemCriteria()
           
 boolean isLegacyOffer()
           
 void setCandidateQualifiersMap(HashMap<OfferItemCriteria,List<PromotableOrderItem>> candidateItemsMap)
           
 void setCandidateTargets(List<PromotableOrderItem> candidateTargets)
           
 void setPotentialSavings(Money savings)
           
 

Method Detail

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()

isLegacyOffer

boolean isLegacyOffer()


Copyright © 2013. All Rights Reserved.