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

java.lang.Object
  extended by org.broadleafcommerce.core.offer.service.discount.domain.PromotableFulfillmentGroupAdjustmentImpl
All Implemented Interfaces:
PromotableFulfillmentGroupAdjustment

public class PromotableFulfillmentGroupAdjustmentImpl
extends Object
implements PromotableFulfillmentGroupAdjustment


Field Summary
protected  FulfillmentGroupAdjustment delegate
           
protected  PromotableFulfillmentGroup fulfillmentGroup
           
protected  RoundingMode roundingMode
           
protected  int roundingScale
           
protected  boolean roundOfferValues
           
 
Constructor Summary
PromotableFulfillmentGroupAdjustmentImpl(FulfillmentGroupAdjustment fulfillmentGroupAdjustment, PromotableFulfillmentGroup fulfillmentGroup)
           
 
Method Summary
 void computeAdjustmentValue()
           
 FulfillmentGroupAdjustment getDelegate()
           
 FulfillmentGroup getFulfillmentGroup()
           
 Long getId()
           
 Offer getOffer()
           
 String getReason()
           
 Money getValue()
           
 void init(FulfillmentGroup fulfillmentGroup, Offer offer, String reason)
           
 boolean isRoundOfferValues()
          It is sometimes problematic to offer percentage-off offers with regards to rounding.
 void reset()
           
 void setId(Long id)
           
 void setReason(String reason)
           
 void setRoundingMode(RoundingMode roundingMode)
           
 void setRoundingScale(int roundingScale)
           
 void setValue(Money value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

fulfillmentGroup

protected PromotableFulfillmentGroup fulfillmentGroup

delegate

protected FulfillmentGroupAdjustment delegate

roundOfferValues

protected boolean roundOfferValues

roundingScale

protected int roundingScale

roundingMode

protected RoundingMode roundingMode
Constructor Detail

PromotableFulfillmentGroupAdjustmentImpl

public PromotableFulfillmentGroupAdjustmentImpl(FulfillmentGroupAdjustment fulfillmentGroupAdjustment,
                                                PromotableFulfillmentGroup fulfillmentGroup)
Method Detail

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 © 2012. All Rights Reserved.