org.broadleafcommerce.core.offer.service.discount.domain
Class PromotableCandidateOrderOfferImpl

java.lang.Object
  extended by org.broadleafcommerce.core.offer.service.discount.domain.PromotableCandidateOrderOfferImpl
All Implemented Interfaces:
Serializable, PromotableCandidateOrderOffer

public class PromotableCandidateOrderOfferImpl
extends Object
implements PromotableCandidateOrderOffer

See Also:
Serialized Form

Field Summary
protected  HashMap<OfferItemCriteria,List<PromotableOrderItem>> candidateQualifiersMap
           
protected  Offer offer
           
protected  Money potentialSavings
           
protected  PromotableOrder promotableOrder
           
 
Constructor Summary
PromotableCandidateOrderOfferImpl(PromotableOrder promotableOrder, Offer offer)
           
PromotableCandidateOrderOfferImpl(PromotableOrder promotableOrder, Offer offer, Money potentialSavings)
          Instead of calculating the potential savings, you can specify an override of this value.
 
Method Summary
protected  void calculatePotentialSavings()
           
 HashMap<OfferItemCriteria,List<PromotableOrderItem>> getCandidateQualifiersMap()
           
 BroadleafCurrency getCurrency()
           
 Offer getOffer()
           
 Money getPotentialSavings()
           
 int getPriority()
           
 PromotableOrder getPromotableOrder()
           
 boolean isCombinable()
           
 boolean isTotalitarian()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

candidateQualifiersMap

protected HashMap<OfferItemCriteria,List<PromotableOrderItem>> candidateQualifiersMap

offer

protected Offer offer

promotableOrder

protected PromotableOrder promotableOrder

potentialSavings

protected Money potentialSavings
Constructor Detail

PromotableCandidateOrderOfferImpl

public PromotableCandidateOrderOfferImpl(PromotableOrder promotableOrder,
                                         Offer offer)

PromotableCandidateOrderOfferImpl

public PromotableCandidateOrderOfferImpl(PromotableOrder promotableOrder,
                                         Offer offer,
                                         Money potentialSavings)
Instead of calculating the potential savings, you can specify an override of this value. This is currently coded only to work if the promotableOrder's isIncludeOrderAndItemAdjustments flag is true.

Parameters:
promotableOrder -
offer -
potentialSavings -
Method Detail

getCandidateQualifiersMap

public HashMap<OfferItemCriteria,List<PromotableOrderItem>> getCandidateQualifiersMap()
Specified by:
getCandidateQualifiersMap in interface PromotableCandidateOrderOffer

calculatePotentialSavings

protected void calculatePotentialSavings()

getOffer

public Offer getOffer()
Specified by:
getOffer in interface PromotableCandidateOrderOffer

getPromotableOrder

public PromotableOrder getPromotableOrder()
Specified by:
getPromotableOrder in interface PromotableCandidateOrderOffer

getCurrency

public BroadleafCurrency getCurrency()

getPotentialSavings

public Money getPotentialSavings()
Specified by:
getPotentialSavings in interface PromotableCandidateOrderOffer

isCombinable

public boolean isCombinable()
Specified by:
isCombinable in interface PromotableCandidateOrderOffer

isTotalitarian

public boolean isTotalitarian()
Specified by:
isTotalitarian in interface PromotableCandidateOrderOffer

getPriority

public int getPriority()
Specified by:
getPriority in interface PromotableCandidateOrderOffer


Copyright © 2013. All Rights Reserved.