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

java.lang.Object
  extended by org.broadleafcommerce.core.offer.service.discount.domain.AbstractPromotionRounding
      extended by org.broadleafcommerce.core.offer.service.discount.domain.PromotableOrderItemPriceDetailAdjustmentImpl
All Implemented Interfaces:
Serializable, OfferHolder, PromotableOrderItemPriceDetailAdjustment, PromotionRounding

public class PromotableOrderItemPriceDetailAdjustmentImpl
extends AbstractPromotionRounding
implements PromotableOrderItemPriceDetailAdjustment, OfferHolder

See Also:
Serialized Form

Field Summary
protected  Money adjustmentValue
           
protected  boolean appliedToSalePrice
           
protected  Offer offer
           
protected  PromotableCandidateItemOffer promotableCandidateItemOffer
           
protected  PromotableOrderItemPriceDetail promotableOrderItemPriceDetail
           
protected  Money retailAdjustmentValue
           
protected  Money saleAdjustmentValue
           
 
Fields inherited from class org.broadleafcommerce.core.offer.service.discount.domain.AbstractPromotionRounding
roundingMode, roundingScale, roundOfferValues
 
Constructor Summary
PromotableOrderItemPriceDetailAdjustmentImpl(OrderItemPriceDetailAdjustment itemAdjustment, PromotableOrderItemPriceDetail orderItemPriceDetail)
           
PromotableOrderItemPriceDetailAdjustmentImpl(PromotableCandidateItemOffer promotableCandidateItemOffer, PromotableOrderItemPriceDetail orderItemPriceDetail)
           
 
Method Summary
protected  void computeAdjustmentValues()
           
 PromotableOrderItemPriceDetailAdjustment copy()
          Copy this adjustment.
 void finalizeAdjustment(boolean useSalePrice)
          Sets the adjustment price based on the passed in parameter.
 Money getAdjustmentValue()
          Returns the value of this adjustment.
 BroadleafCurrency getCurrency()
           
 Offer getOffer()
          Returns the associated promotableCandidateItemOffer
 Long getOfferId()
          Returns the id of the contained offer.
 PromotableOrderItemPriceDetail getPromotableOrderItemPriceDetail()
          Returns the associated promotableOrderItemPriceDetail
 Money getRetailAdjustmentValue()
          Returns the value of this adjustment if only retail prices can be used.
 Money getSaleAdjustmentValue()
          Returns the value of this adjustment if sale prices can be used.
 boolean isAppliedToSalePrice()
          Returns true if the value was applied to the sale price.
 boolean isCombinable()
          Returns true if this adjustment represents a combinable offer.
 boolean isTotalitarian()
          Returns true if this adjustment represents a totalitarian offer.
 
Methods inherited from class org.broadleafcommerce.core.offer.service.discount.domain.AbstractPromotionRounding
getRoundingMode, getRoundingScale, isRoundOfferValues, setRoundingMode, setRoundingScale
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

promotableCandidateItemOffer

protected PromotableCandidateItemOffer promotableCandidateItemOffer

promotableOrderItemPriceDetail

protected PromotableOrderItemPriceDetail promotableOrderItemPriceDetail

saleAdjustmentValue

protected Money saleAdjustmentValue

retailAdjustmentValue

protected Money retailAdjustmentValue

adjustmentValue

protected Money adjustmentValue

appliedToSalePrice

protected boolean appliedToSalePrice

offer

protected Offer offer
Constructor Detail

PromotableOrderItemPriceDetailAdjustmentImpl

public PromotableOrderItemPriceDetailAdjustmentImpl(PromotableCandidateItemOffer promotableCandidateItemOffer,
                                                    PromotableOrderItemPriceDetail orderItemPriceDetail)

PromotableOrderItemPriceDetailAdjustmentImpl

public PromotableOrderItemPriceDetailAdjustmentImpl(OrderItemPriceDetailAdjustment itemAdjustment,
                                                    PromotableOrderItemPriceDetail orderItemPriceDetail)
Method Detail

computeAdjustmentValues

protected void computeAdjustmentValues()

getRetailAdjustmentValue

public Money getRetailAdjustmentValue()
Description copied from interface: PromotableOrderItemPriceDetailAdjustment
Returns the value of this adjustment if only retail prices can be used.

Specified by:
getRetailAdjustmentValue in interface PromotableOrderItemPriceDetailAdjustment
Returns:

getSaleAdjustmentValue

public Money getSaleAdjustmentValue()
Description copied from interface: PromotableOrderItemPriceDetailAdjustment
Returns the value of this adjustment if sale prices can be used.

Specified by:
getSaleAdjustmentValue in interface PromotableOrderItemPriceDetailAdjustment
Returns:

getCurrency

public BroadleafCurrency getCurrency()
Specified by:
getCurrency in interface OfferHolder

getPromotableOrderItemPriceDetail

public PromotableOrderItemPriceDetail getPromotableOrderItemPriceDetail()
Description copied from interface: PromotableOrderItemPriceDetailAdjustment
Returns the associated promotableOrderItemPriceDetail

Specified by:
getPromotableOrderItemPriceDetail in interface PromotableOrderItemPriceDetailAdjustment
Returns:

getOffer

public Offer getOffer()
Description copied from interface: PromotableOrderItemPriceDetailAdjustment
Returns the associated promotableCandidateItemOffer

Specified by:
getOffer in interface OfferHolder
Specified by:
getOffer in interface PromotableOrderItemPriceDetailAdjustment

isCombinable

public boolean isCombinable()
Description copied from interface: PromotableOrderItemPriceDetailAdjustment
Returns true if this adjustment represents a combinable offer.

Specified by:
isCombinable in interface PromotableOrderItemPriceDetailAdjustment

isTotalitarian

public boolean isTotalitarian()
Description copied from interface: PromotableOrderItemPriceDetailAdjustment
Returns true if this adjustment represents a totalitarian offer.

Specified by:
isTotalitarian in interface PromotableOrderItemPriceDetailAdjustment

getOfferId

public Long getOfferId()
Description copied from interface: PromotableOrderItemPriceDetailAdjustment
Returns the id of the contained offer.

Specified by:
getOfferId in interface PromotableOrderItemPriceDetailAdjustment
Returns:

getAdjustmentValue

public Money getAdjustmentValue()
Description copied from interface: PromotableOrderItemPriceDetailAdjustment
Returns the value of this adjustment. can be used.

Specified by:
getAdjustmentValue in interface PromotableOrderItemPriceDetailAdjustment
Returns:

isAppliedToSalePrice

public boolean isAppliedToSalePrice()
Description copied from interface: PromotableOrderItemPriceDetailAdjustment
Returns true if the value was applied to the sale price.

Specified by:
isAppliedToSalePrice in interface PromotableOrderItemPriceDetailAdjustment
Returns:

finalizeAdjustment

public void finalizeAdjustment(boolean useSalePrice)
Description copied from interface: PromotableOrderItemPriceDetailAdjustment
Sets the adjustment price based on the passed in parameter.

Specified by:
finalizeAdjustment in interface PromotableOrderItemPriceDetailAdjustment

copy

public PromotableOrderItemPriceDetailAdjustment copy()
Description copied from interface: PromotableOrderItemPriceDetailAdjustment
Copy this adjustment. Used when a detail that contains this adjustment needs to be split.

Specified by:
copy in interface PromotableOrderItemPriceDetailAdjustment
Returns:


Copyright © 2013. All Rights Reserved.