Class EnhancedOrderLineItem
java.lang.Object
com.broadleafcommerce.promotion.offer.web.context.EnhancedLineItem
com.broadleafcommerce.promotion.offer.web.context.EnhancedOrderLineItem
- All Implemented Interfaces:
com.broadleafcommerce.promotion.offer.client.web.context.LineItem,com.broadleafcommerce.promotion.offer.client.web.context.OrderLineItem,Serializable
public class EnhancedOrderLineItem
extends EnhancedLineItem
implements com.broadleafcommerce.promotion.offer.client.web.context.OrderLineItem
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanbooleanNot part of the incoming or outgoing payloads but populated at the start of the offer engine in order to provide faster lookup during processing.com.broadleafcommerce.promotion.offer.client.web.context.discounts.ConvertedCurrencyDetailRepresents the details of the exchange rate used to convert aMonetaryAmountfrom one currency to another.Not part of the incoming or outgoing payloads but populated at the start of the offer engine in order to provide faster lookup during processing.javax.money.MonetaryAmountgetTotalPrice(boolean includeChildren) Gets the total combined price of this order item, including any adjustments.inthashCode()booleanisAParentOf(EnhancedOrderLineItem potentialChild) Determines whether this item is a direct parent or general ancestor of the given item.booleanWhether the adjustment amount was converted from another currency.booleanChanges the default implementation to first check for the presence of theparentLineNumberto determine if this item is a dependent.voidsetChildren(Set<EnhancedOrderLineItem> children) Not part of the incoming or outgoing payloads but populated at the start of the offer engine in order to provide faster lookup during processing.voidsetConvertedCurrencyDetail(com.broadleafcommerce.promotion.offer.client.web.context.discounts.ConvertedCurrencyDetail convertedCurrencyDetail) Represents the details of the exchange rate used to convert aMonetaryAmountfrom one currency to another.voidsetParent(EnhancedOrderLineItem parent) Not part of the incoming or outgoing payloads but populated at the start of the offer engine in order to provide faster lookup during processing.voidsetParentLineNumber(String parentLineNumber) toString()Methods inherited from class com.broadleafcommerce.promotion.offer.web.context.EnhancedLineItem
calculateTotalAdjustmentValue, calculateTotalWithAdjustments, calculateTotalWithAdjustments, calculateTotalWithAdjustmentsAsDouble, createNewDetail, finalizePrice, getAdjustedTotalWithoutFutureCredits, getAdjustedTotalWithoutFutureCredits, getAttributes, getAveragePrice, getAverageRecurringPrice, getCurrency, getEffectiveSegment, getExternalOfferDetails, getFinalPrice, getFinalRecurringPrice, getFinalTotalAdjustmentValue, getFulfillmentGroupRef, getFulfillmentPrice, getFutureCreditAdjustmentValue, getFutureCredits, getId, getLineNumber, getOfferDetails, getOnSale, getPrice, getPriceWithRecurring, getProratedAdjustments, getQuantity, getRecurringPrice, getRecurringPrice, getRecurringSavings, getSalePrice, getSalePriceWithRecurring, getSaleRecurringPrice, getSegment, getStandardPrice, getStandardPriceWithRecurring, getStandardRecurringPrice, getTotalPrice, getTotalPriceWithoutAdjustments, getTotalPriceWithoutAdjustments, getTotalRecurringForAYearOrNullIfNone, getTotalRecurringPrice, getTotalSaleRecurringForAYear, getTotalStandardPrice, getTotalStandardRecurringForAYear, getUnadjustedSalePrice, getUnitPriceWithoutAdjustments, hasAdjustments, hasRecurringPrice, hasSaleRecurringPrice, hasStandardRecurringPrice, initializePriceDetails, isDiscountable, isFreeTrialApplied, isOnSale, isSubscription, mergeDetails, mergeLikeDetails, resetOfferDetails, resetPriceDetails, setAttributes, setCurrency, setDiscountable, setExternalOfferDetails, setFinalPrice, setFinalRecurringPrice, setFulfillmentGroupRef, setFulfillmentPrice, setId, setLineNumber, setOfferDetails, setProratedAdjustments, setQuantity, setSalePrice, setSaleRecurringPrice, setSegment, setStandardPrice, setStandardRecurringPrice, setSubscriptionMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.broadleafcommerce.promotion.offer.client.web.context.LineItem
getAttributes, getLineNumber, getQuantity, getSalePrice, getSaleRecurringPrice, getServiceLevel, getStandardPrice, getStandardRecurringPrice, isDiscountable, isSubscription, setAttributes, setDiscountable, setLineNumber, setQuantity, setSalePrice, setSaleRecurringPrice, setStandardPrice, setStandardRecurringPrice, setSubscriptionMethods inherited from interface com.broadleafcommerce.promotion.offer.client.web.context.OrderLineItem
getFulfillmentGroupRef, getFulfillmentPrice, getSegment, setFulfillmentGroupRef, setFulfillmentPrice, setSegment
-
Constructor Details
-
EnhancedOrderLineItem
public EnhancedOrderLineItem()
-
-
Method Details
-
isAParentOf
Determines whether this item is a direct parent or general ancestor of the given item. This will repeatedly call each child'sisAParentOf(EnhancedOrderLineItem)if needed.- Parameters:
potentialChild- the item to determine whether this is a parent or ancestor- Returns:
- whether this item is a direct parent or general ancestor of the given item
-
getTotalPrice
public javax.money.MonetaryAmount getTotalPrice(boolean includeChildren) Gets the total combined price of this order item, including any adjustments.- Parameters:
includeChildren- whether to include dependent items in the total- Returns:
- the total combined price of this order item, including any adjustments.
-
isDependent
public boolean isDependent()Changes the default implementation to first check for the presence of theparentLineNumberto determine if this item is a dependent.- Overrides:
isDependentin classEnhancedLineItem- Returns:
- Whether this item is an Add-on/dependant type
-
isCurrencyConverted
public boolean isCurrencyConverted()Whether the adjustment amount was converted from another currency.- Since:
- Offer Services 3.2.0, Release Train 2.3.0
-
getParentLineNumber
- Specified by:
getParentLineNumberin interfacecom.broadleafcommerce.promotion.offer.client.web.context.OrderLineItem
-
getConvertedCurrencyDetail
public com.broadleafcommerce.promotion.offer.client.web.context.discounts.ConvertedCurrencyDetail getConvertedCurrencyDetail()Represents the details of the exchange rate used to convert aMonetaryAmountfrom one currency to another. This is used to describe the price fields on this line item if they were converted from a base currency.- Since:
- Offer Services 3.2.0, Release Train 2.3.0
-
getParent
Not part of the incoming or outgoing payloads but populated at the start of the offer engine in order to provide faster lookup during processing.- Returns:
- The parent order line item object if this is a dependent item
-
getChildren
Not part of the incoming or outgoing payloads but populated at the start of the offer engine in order to provide faster lookup during processing.- Returns:
- The dependent order line item objects if any
-
setParentLineNumber
- Specified by:
setParentLineNumberin interfacecom.broadleafcommerce.promotion.offer.client.web.context.OrderLineItem
-
setConvertedCurrencyDetail
public void setConvertedCurrencyDetail(com.broadleafcommerce.promotion.offer.client.web.context.discounts.ConvertedCurrencyDetail convertedCurrencyDetail) Represents the details of the exchange rate used to convert aMonetaryAmountfrom one currency to another. This is used to describe the price fields on this line item if they were converted from a base currency.- Since:
- Offer Services 3.2.0, Release Train 2.3.0
-
setParent
Not part of the incoming or outgoing payloads but populated at the start of the offer engine in order to provide faster lookup during processing.- Parameters:
parent- The parent order line item object if this is a dependent item
-
setChildren
Not part of the incoming or outgoing payloads but populated at the start of the offer engine in order to provide faster lookup during processing.- Parameters:
children- The dependent order line item objects if any
-
equals
- Overrides:
equalsin classEnhancedLineItem
-
canEqual
- Overrides:
canEqualin classEnhancedLineItem
-
hashCode
public int hashCode()- Overrides:
hashCodein classEnhancedLineItem
-
toString
- Overrides:
toStringin classEnhancedLineItem
-