org.broadleafcommerce.core.offer.service.discount.domain
Class PromotableOrderItemAdjustmentImpl
java.lang.Object
org.broadleafcommerce.core.offer.service.discount.domain.PromotableOrderItemAdjustmentImpl
- All Implemented Interfaces:
- PromotableOrderItemAdjustment
public class PromotableOrderItemAdjustmentImpl
- extends Object
- implements PromotableOrderItemAdjustment
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
orderItem
protected PromotableOrderItem orderItem
delegate
protected OrderItemAdjustment delegate
roundOfferValues
protected boolean roundOfferValues
roundingScale
protected int roundingScale
roundingMode
protected RoundingMode roundingMode
PromotableOrderItemAdjustmentImpl
public PromotableOrderItemAdjustmentImpl(OrderItemAdjustment orderItemAdjustment,
PromotableOrderItem orderItem)
reset
public void reset()
- Specified by:
reset in interface PromotableOrderItemAdjustment
getDelegate
public OrderItemAdjustment getDelegate()
- Specified by:
getDelegate in interface PromotableOrderItemAdjustment
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()
computeAdjustmentValues
public void computeAdjustmentValues()
- Specified by:
computeAdjustmentValues in interface PromotableOrderItemAdjustment
getRetailPriceValue
public Money getRetailPriceValue()
- Specified by:
getRetailPriceValue in interface PromotableOrderItemAdjustment
getSalesPriceValue
public Money getSalesPriceValue()
- Specified by:
getSalesPriceValue in interface PromotableOrderItemAdjustment
Copyright © 2013. All Rights Reserved.