org.broadleafcommerce.core.offer.service.discount.domain
Class PromotableOrderAdjustmentImpl
java.lang.Object
org.broadleafcommerce.core.offer.service.discount.domain.PromotableOrderAdjustmentImpl
- All Implemented Interfaces:
- PromotableOrderAdjustment
public class PromotableOrderAdjustmentImpl
- extends Object
- implements PromotableOrderAdjustment
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
delegate
protected OrderAdjustment delegate
order
protected PromotableOrder order
roundOfferValues
protected boolean roundOfferValues
roundingScale
protected int roundingScale
roundingMode
protected RoundingMode roundingMode
PromotableOrderAdjustmentImpl
public PromotableOrderAdjustmentImpl(OrderAdjustment orderAdjustment,
PromotableOrder order)
reset
public void reset()
- Specified by:
reset in interface PromotableOrderAdjustment
getDelegate
public OrderAdjustment getDelegate()
- Specified by:
getDelegate in interface PromotableOrderAdjustment
isRoundOfferValues
public boolean isRoundOfferValues()
- It is sometimes problematic to offer percentage-off offers with regards to rounding. For example,
consider an item that costs 9.99 and has a 50% promotion. To be precise, the offer value is 4.995,
but this may be a strange value to display to the user depending on the currency being used.
setRoundingScale
public void setRoundingScale(int roundingScale)
- Parameters:
roundingScale - - See Also:
isRoundOfferValues()
setRoundingMode
public void setRoundingMode(RoundingMode roundingMode)
- Parameters:
roundingMode - - See Also:
isRoundOfferValues()
computeAdjustmentValue
public void computeAdjustmentValue()
- Specified by:
computeAdjustmentValue in interface PromotableOrderAdjustment
getValue
public Money getValue()
- Specified by:
getValue in interface PromotableOrderAdjustment
Copyright © 2013. All Rights Reserved.