Class PromotableOrderItemPriceDetailAdjustmentImpl
java.lang.Object
org.broadleafcommerce.core.offer.service.discount.domain.AbstractPromotionRounding
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:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Moneyprotected booleanprotected Offerprotected PromotableCandidateItemOfferprotected PromotableOrderItemPriceDetailprotected Moneyprotected MoneyFields inherited from class org.broadleafcommerce.core.offer.service.discount.domain.AbstractPromotionRounding
roundingMode, roundingScale -
Constructor Summary
ConstructorsConstructorDescriptionPromotableOrderItemPriceDetailAdjustmentImpl(OrderItemPriceDetailAdjustment itemAdjustment, PromotableOrderItemPriceDetail orderItemPriceDetail) PromotableOrderItemPriceDetailAdjustmentImpl(PromotableCandidateItemOffer promotableCandidateItemOffer, PromotableOrderItemPriceDetail orderItemPriceDetail, Money retailAdjustmentValue, Money saleAdjustmentValue) -
Method Summary
Modifier and TypeMethodDescriptioncopy()Copy this adjustment.voidfinalizeAdjustment(boolean useSalePrice) Sets the adjustment price based on the passed in parameter.Returns the value of this adjustment.getOffer()Returns the associated promotableCandidateItemOfferReturns the id of the contained offer.Returns the associated promotableOrderItemPriceDetailReturns the value of this adjustment if only retail prices can be used.Returns the value of this adjustment if sale prices can be used.booleanReturns true if the value was applied to the sale price.booleanReturns true if this adjustment represents a combinable offer.booleanReturns true if this adjustment represents a totalitarian offer.Methods inherited from class org.broadleafcommerce.core.offer.service.discount.domain.AbstractPromotionRounding
getRoundingMode, getRoundingScale, setRoundingMode, setRoundingScale
-
Field Details
-
promotableCandidateItemOffer
-
promotableOrderItemPriceDetail
-
saleAdjustmentValue
-
retailAdjustmentValue
-
adjustmentValue
-
appliedToSalePrice
protected boolean appliedToSalePrice -
offer
-
-
Constructor Details
-
PromotableOrderItemPriceDetailAdjustmentImpl
public PromotableOrderItemPriceDetailAdjustmentImpl(PromotableCandidateItemOffer promotableCandidateItemOffer, PromotableOrderItemPriceDetail orderItemPriceDetail, Money retailAdjustmentValue, Money saleAdjustmentValue) -
PromotableOrderItemPriceDetailAdjustmentImpl
public PromotableOrderItemPriceDetailAdjustmentImpl(OrderItemPriceDetailAdjustment itemAdjustment, PromotableOrderItemPriceDetail orderItemPriceDetail)
-
-
Method Details
-
getRetailAdjustmentValue
Description copied from interface:PromotableOrderItemPriceDetailAdjustmentReturns the value of this adjustment if only retail prices can be used.- Specified by:
getRetailAdjustmentValuein interfacePromotableOrderItemPriceDetailAdjustment- Returns:
-
getSaleAdjustmentValue
Description copied from interface:PromotableOrderItemPriceDetailAdjustmentReturns the value of this adjustment if sale prices can be used.- Specified by:
getSaleAdjustmentValuein interfacePromotableOrderItemPriceDetailAdjustment- Returns:
-
getCurrency
- Specified by:
getCurrencyin interfaceOfferHolder
-
getPromotableOrderItemPriceDetail
Description copied from interface:PromotableOrderItemPriceDetailAdjustmentReturns the associated promotableOrderItemPriceDetail- Specified by:
getPromotableOrderItemPriceDetailin interfacePromotableOrderItemPriceDetailAdjustment- Returns:
-
getOffer
Description copied from interface:PromotableOrderItemPriceDetailAdjustmentReturns the associated promotableCandidateItemOffer- Specified by:
getOfferin interfaceOfferHolder- Specified by:
getOfferin interfacePromotableOrderItemPriceDetailAdjustment
-
isCombinable
public boolean isCombinable()Description copied from interface:PromotableOrderItemPriceDetailAdjustmentReturns true if this adjustment represents a combinable offer.- Specified by:
isCombinablein interfacePromotableOrderItemPriceDetailAdjustment
-
isTotalitarian
public boolean isTotalitarian()Description copied from interface:PromotableOrderItemPriceDetailAdjustmentReturns true if this adjustment represents a totalitarian offer.- Specified by:
isTotalitarianin interfacePromotableOrderItemPriceDetailAdjustment
-
getOfferId
Description copied from interface:PromotableOrderItemPriceDetailAdjustmentReturns the id of the contained offer.- Specified by:
getOfferIdin interfacePromotableOrderItemPriceDetailAdjustment- Returns:
-
getAdjustmentValue
Description copied from interface:PromotableOrderItemPriceDetailAdjustmentReturns the value of this adjustment. can be used.- Specified by:
getAdjustmentValuein interfacePromotableOrderItemPriceDetailAdjustment- Returns:
-
isAppliedToSalePrice
public boolean isAppliedToSalePrice()Description copied from interface:PromotableOrderItemPriceDetailAdjustmentReturns true if the value was applied to the sale price.- Specified by:
isAppliedToSalePricein interfacePromotableOrderItemPriceDetailAdjustment- Returns:
-
finalizeAdjustment
public void finalizeAdjustment(boolean useSalePrice) Description copied from interface:PromotableOrderItemPriceDetailAdjustmentSets the adjustment price based on the passed in parameter.- Specified by:
finalizeAdjustmentin interfacePromotableOrderItemPriceDetailAdjustment
-
copy
Description copied from interface:PromotableOrderItemPriceDetailAdjustmentCopy this adjustment. Used when a detail that contains this adjustment needs to be split.- Specified by:
copyin interfacePromotableOrderItemPriceDetailAdjustment- Returns:
-