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 org.broadleafcommerce.common.money.Moneyprotected booleanprotected Offerprotected PromotableCandidateItemOfferprotected PromotableOrderItemPriceDetailprotected org.broadleafcommerce.common.money.Moneyprotected org.broadleafcommerce.common.money.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, org.broadleafcommerce.common.money.Money retailAdjustmentValue, org.broadleafcommerce.common.money.Money saleAdjustmentValue) -
Method Summary
Modifier and TypeMethodDescriptioncopy()Copy this adjustment.voidfinalizeAdjustment(boolean useSalePrice) Sets the adjustment price based on the passed in parameter.org.broadleafcommerce.common.money.MoneyReturns the value of this adjustment.org.broadleafcommerce.common.currency.domain.BroadleafCurrencygetOffer()Returns the associated promotableCandidateItemOfferReturns the id of the contained offer.Returns the associated promotableOrderItemPriceDetailorg.broadleafcommerce.common.money.MoneyReturns the value of this adjustment if only retail prices can be used.org.broadleafcommerce.common.money.MoneyReturns 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
protected org.broadleafcommerce.common.money.Money saleAdjustmentValue -
retailAdjustmentValue
protected org.broadleafcommerce.common.money.Money retailAdjustmentValue -
adjustmentValue
protected org.broadleafcommerce.common.money.Money adjustmentValue -
appliedToSalePrice
protected boolean appliedToSalePrice -
offer
-
-
Constructor Details
-
PromotableOrderItemPriceDetailAdjustmentImpl
public PromotableOrderItemPriceDetailAdjustmentImpl(PromotableCandidateItemOffer promotableCandidateItemOffer, PromotableOrderItemPriceDetail orderItemPriceDetail, org.broadleafcommerce.common.money.Money retailAdjustmentValue, org.broadleafcommerce.common.money.Money saleAdjustmentValue) -
PromotableOrderItemPriceDetailAdjustmentImpl
public PromotableOrderItemPriceDetailAdjustmentImpl(OrderItemPriceDetailAdjustment itemAdjustment, PromotableOrderItemPriceDetail orderItemPriceDetail)
-
-
Method Details
-
getRetailAdjustmentValue
public org.broadleafcommerce.common.money.Money getRetailAdjustmentValue()Description copied from interface:PromotableOrderItemPriceDetailAdjustmentReturns the value of this adjustment if only retail prices can be used.- Specified by:
getRetailAdjustmentValuein interfacePromotableOrderItemPriceDetailAdjustment- Returns:
-
getSaleAdjustmentValue
public org.broadleafcommerce.common.money.Money getSaleAdjustmentValue()Description copied from interface:PromotableOrderItemPriceDetailAdjustmentReturns the value of this adjustment if sale prices can be used.- Specified by:
getSaleAdjustmentValuein interfacePromotableOrderItemPriceDetailAdjustment- Returns:
-
getCurrency
public org.broadleafcommerce.common.currency.domain.BroadleafCurrency 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
public org.broadleafcommerce.common.money.Money 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:
-