org.broadleafcommerce.core.offer.service.discount.domain
Class PromotableFulfillmentGroupAdjustmentImpl
java.lang.Object
org.broadleafcommerce.core.offer.service.discount.domain.PromotableFulfillmentGroupAdjustmentImpl
- All Implemented Interfaces:
- PromotableFulfillmentGroupAdjustment
public class PromotableFulfillmentGroupAdjustmentImpl
- extends Object
- implements PromotableFulfillmentGroupAdjustment
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
fulfillmentGroup
protected PromotableFulfillmentGroup fulfillmentGroup
delegate
protected FulfillmentGroupAdjustment delegate
roundOfferValues
protected boolean roundOfferValues
roundingScale
protected int roundingScale
roundingMode
protected RoundingMode roundingMode
PromotableFulfillmentGroupAdjustmentImpl
public PromotableFulfillmentGroupAdjustmentImpl(FulfillmentGroupAdjustment fulfillmentGroupAdjustment,
PromotableFulfillmentGroup fulfillmentGroup)
reset
public void reset()
- Specified by:
reset in interface PromotableFulfillmentGroupAdjustment
getDelegate
public FulfillmentGroupAdjustment getDelegate()
- Specified by:
getDelegate in interface PromotableFulfillmentGroupAdjustment
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 PromotableFulfillmentGroupAdjustment
getId
public Long getId()
setId
public void setId(Long id)
getOffer
public Offer getOffer()
getFulfillmentGroup
public FulfillmentGroup getFulfillmentGroup()
getReason
public String getReason()
setReason
public void setReason(String reason)
init
public void init(FulfillmentGroup fulfillmentGroup,
Offer offer,
String reason)
setValue
public void setValue(Money value)
getValue
public Money getValue()
- Specified by:
getValue in interface PromotableFulfillmentGroupAdjustment
Copyright © 2013. All Rights Reserved.