Uses of Class
com.broadleafcommerce.promotion.offer.web.context.EnhancedLineItem
Package
Description
-
Uses of EnhancedLineItem in com.broadleafcommerce.promotion.offer.domain
Modifier and TypeMethodDescriptionMarketingMessageRequest.getLineItems()
A list of hydratedEnhancedLineItem
s used by theMarketingMessageResolver
to retrieveMarketingMessage
sModifier and TypeMethodDescriptionvoid
MarketingMessageRequest.setLineItems
(List<EnhancedLineItem> lineItems) A list of hydratedEnhancedLineItem
s used by theMarketingMessageResolver
to retrieveMarketingMessage
s -
Uses of EnhancedLineItem in com.broadleafcommerce.promotion.offer.service
Modifier and TypeMethodDescriptionboolean
DefaultMarketingMessageOfferCandidateService.isCriteriaMatched
(@NonNull EnhancedLineItem item, @NonNull ItemCriteria criteria) boolean
MarketingMessageOfferCandidateService.isCriteriaMatched
(@NonNull EnhancedLineItem item, @NonNull ItemCriteria criteria) Determines whether theEnhancedLineItem
matches theItemCriteria
.protected boolean
DefaultMarketingMessageResolver.isItemQualifier
(Offer offer, EnhancedLineItem item) Checks if any of the rules inOffer.getItemQualifierCriteria()
matches the line item on this request in order to determine if the line item can be used to qualify for the offer.protected boolean
DefaultMarketingMessageResolver.isItemTarget
(Offer offer, EnhancedLineItem item) If this is an item offer, checks if any of the rules inOffer.getTargetItemCriteria()
matches the line item on this request in order to determine if the line item can be used as the target for the offer.Modifier and TypeMethodDescriptionDefaultMarketingMessageResolver.checkForMatchingProducts
(O offer, List<EnhancedLineItem> lineItems, boolean includeTargets, boolean includeQualifiers) -
Uses of EnhancedLineItem in com.broadleafcommerce.promotion.offer.service.dto
Modifier and TypeMethodDescriptionCandidateItemOffer.getCandidateQualifiersMap()
Map ofItemCriteriaRule
from anoffer's item qualifier criteria
to aCollection
ofEnhancedLineItem
that meet that criteria.CandidateOrderOffer.getCandidateQualifiersMap()
Map ofItemCriteriaRule
from anoffer's item qualifier criteria
to aCollection
ofEnhancedLineItem
that meet that criteria.CandidateItemOffer.getCandidateTargetsMap()
Map ofItemCriteriaRule
from anoffer's target item criteria
to aCollection
ofEnhancedLineItem
that meet that criteria.Modifier and TypeMethodDescriptionboolean
BaseCandidateOffer.isNotExcludedFromOffer
(EnhancedOrder order, EnhancedLineItem item) Returns true if the passed in item is NOT excluded from this offer.Modifier and TypeMethodDescriptionvoid
CandidateItemOffer.setCandidateQualifiersMap
(Map<ItemCriteriaRule, Collection<EnhancedLineItem>> candidateQualifiersMap) Map ofItemCriteriaRule
from anoffer's item qualifier criteria
to aCollection
ofEnhancedLineItem
that meet that criteria.void
CandidateOrderOffer.setCandidateQualifiersMap
(Map<ItemCriteriaRule, Collection<EnhancedLineItem>> candidateQualifiersMap) Map ofItemCriteriaRule
from anoffer's item qualifier criteria
to aCollection
ofEnhancedLineItem
that meet that criteria.void
CandidateItemOffer.setCandidateTargetsMap
(Map<ItemCriteriaRule, Collection<EnhancedLineItem>> candidateTargetsMap) Map ofItemCriteriaRule
from anoffer's target item criteria
to aCollection
ofEnhancedLineItem
that meet that criteria. -
Uses of EnhancedLineItem in com.broadleafcommerce.promotion.offer.service.engine
Modifier and TypeMethodDescriptionprotected com.broadleafcommerce.promotion.offer.client.web.context.discounts.ItemResponse<P>
DefaultOfferEngineResponseBuilder.getItemResponse
(@NonNull EnhancedLineItem lineItem, @NonNull OfferCodeData offerCodeData) Creates anOffer ItemResponse
for aline item
. -
Uses of EnhancedLineItem in com.broadleafcommerce.promotion.offer.service.engine.application.processor
Modifier and TypeMethodDescriptionprotected com.broadleafcommerce.promotion.offer.client.web.context.info.OfferItemDetail
DefaultItemOfferProcessor.createOfferItemDetailAndDetermineQualifierQuantity
(@NonNull CandidateItemOffer itemOffer, @NonNull EnhancedLineItem lineItem, OfferDiscount offerDiscount, int quantityPerUsage) Creates anOfferItemDetail
based on the given fields.protected boolean
DefaultItemOfferProcessor.itemHasQualifierOfferDetails
(@NonNull EnhancedLineItem item, @NonNull CandidateItemOffer itemOffer, OfferDiscount offerDiscount) Determines whether the givenEnhancedLineItem
has anyOfferItemDetails
that has anyOfferQualifiers
matching the givenCandidateItemOffer
. -
Uses of EnhancedLineItem in com.broadleafcommerce.promotion.offer.service.engine.application.processor.helper
Modifier and TypeMethodDescriptionprotected <P extends EnhancedLineItem>
booleanDefaultOrderAndItemOfferHelper.orderMeetsItemTotalRequirements
(javax.money.MonetaryAmount minTotal, Map<ItemCriteriaRule, Collection<P>> candidateItemsMap, boolean useSalePrice) Modifier and TypeMethodDescriptionprotected int
DefaultOrderAndItemOfferHelper.calculateNumberOfTimesCriteriaIsMet
(ItemCriteriaRule criteriaRule, Collection<EnhancedLineItem> lineItems) Calculates and returns the total number of times the givenEnhancedLineItems
are met with the givenItemCriteriaRule
.DefaultOrderAndItemOfferHelper.getTotalTimesCriteriaIsMetByCriteria
(Map<ItemCriteriaRule, Collection<EnhancedLineItem>> itemsMetByCriteriaRule) OrderAndItemOfferHelper.getTotalTimesCriteriaIsMetByCriteria
(Map<ItemCriteriaRule, Collection<EnhancedLineItem>> itemsMetByCriteriaRule) Gets a map of total number of times theItemCriteriaRule
is met byItemCriteriaRule
. -
Uses of EnhancedLineItem in com.broadleafcommerce.promotion.offer.service.engine.application.processor.helper.item
Modifier and TypeMethodDescriptionprotected EnhancedLineItem
DefaultQualifierAndTargetMarker.findRelatedQualifierRootAncestor
(EnhancedLineItem relatedQualifier) Repeatedly callsEnhancedOrderLineItem.getParent()
until finding the root parent (i.e., an item with no parent) of theitem qualifier
that needs to be related (e.g., ancestor or descendant) to its targets.Modifier and TypeMethodDescriptionprotected org.apache.commons.lang3.tuple.Pair<EnhancedLineItem,
Integer> DefaultQualifierAndTargetMarker.markRelatedQualifiersAndTargetsForItemCriteria
(CandidateItemOffer itemOffer, ItemCriteriaRule qualifierCriteria, Collection<? extends EnhancedLineItem> orderLineItems) Marks item qualifiers and the target items they qualify for a singleOffer.getItemQualifierCriteria()
to ensure that all qualifiers have targets and vice versa.Modifier and TypeMethodDescriptionjavax.money.MonetaryAmount
DefaultPotentialSavingsCalculator.calculateDiscountForItem
(CandidateItemOffer itemOffer, EnhancedLineItem item, int quantityToReceiveDiscount) javax.money.MonetaryAmount
PotentialSavingsCalculator.calculateDiscountForItem
(CandidateItemOffer itemOffer, EnhancedLineItem item, int quantityToReceiveDiscount) Calculates the potential discount of aCandidateItemOffer
for anEnhancedLineItem
.protected BigDecimal
DefaultPotentialSavingsCalculator.calculateWeightedPercent
(EnhancedLineItem item, javax.money.MonetaryAmount itemSavings, boolean useSalePrice) protected EnhancedLineItem
DefaultQualifierAndTargetMarker.findRelatedQualifierRootAncestor
(EnhancedLineItem relatedQualifier) Repeatedly callsEnhancedOrderLineItem.getParent()
until finding the root parent (i.e., an item with no parent) of theitem qualifier
that needs to be related (e.g., ancestor or descendant) to its targets.protected boolean
DefaultQualifierAndTargetMarker.isItemRelatedToQualifier
(EnhancedLineItem relatedQualifierRootAncestor, LineItemOfferDetail offerDetail) protected boolean
DefaultQualifierAndTargetMarker.markAllTargets
(CandidateItemOffer itemOffer, EnhancedLineItem relatedQualifier, boolean checkOnly) Marks all the items that match aOffer.getTargetItemCriteria()
.protected int
DefaultQualifierAndTargetMarker.markTargetsForCriteria
(CandidateItemOffer itemOffer, EnhancedLineItem relatedQualifier, boolean checkOnly, ItemCriteriaRule targetCriteria, Collection<? extends EnhancedLineItem> orderLineItems) Marks the targets related to the provideditem qualifier
(relatedQualifier
) to ensure that there are enough to use for the qualifier'sOffer
.Modifier and TypeMethodDescriptionprotected List<LineItemOfferDetail>
DefaultQualifierAndTargetMarker.buildOfferDetailList
(Collection<? extends EnhancedLineItem> orderLineItems) protected List<LineItemOfferDetail>
DefaultQualifierAndTargetMarker.getSortedItemOfferDetails
(Offer offer, Collection<? extends EnhancedLineItem> orderLineItems, boolean isForQualifiers) protected int
DefaultQualifierAndTargetMarker.markQualifiersForSingleCriteria
(CandidateItemOffer itemOffer, ItemCriteriaRule itemCriteria, Collection<? extends EnhancedLineItem> orderLineItems) Marks all the qualifiers for a singleOffer.getItemQualifierCriteria()
.protected org.apache.commons.lang3.tuple.Pair<EnhancedLineItem,
Integer> DefaultQualifierAndTargetMarker.markRelatedQualifiersAndTargetsForItemCriteria
(CandidateItemOffer itemOffer, ItemCriteriaRule qualifierCriteria, Collection<? extends EnhancedLineItem> orderLineItems) Marks item qualifiers and the target items they qualify for a singleOffer.getItemQualifierCriteria()
to ensure that all qualifiers have targets and vice versa.protected int
DefaultQualifierAndTargetMarker.markTargetsForCriteria
(CandidateItemOffer itemOffer, EnhancedLineItem relatedQualifier, boolean checkOnly, ItemCriteriaRule targetCriteria, Collection<? extends EnhancedLineItem> orderLineItems) Marks the targets related to the provideditem qualifier
(relatedQualifier
) to ensure that there are enough to use for the qualifier'sOffer
. -
Uses of EnhancedLineItem in com.broadleafcommerce.promotion.offer.service.engine.candidate
Modifier and TypeFieldDescriptionprotected static final Collector<ItemCriteriaRule,
?, Map<ItemCriteriaRule, Collection<EnhancedLineItem>>> DefaultOfferCandidateService.ITEM_CRITERIA_MAP_COLLECTOR
Modifier and TypeMethodDescriptionprotected Set<EnhancedLineItem>
DefaultOfferCandidateService.evaluateOrderForMatchingItems
(@NonNull List<EnhancedOrderLineItem> orderLineItems, @NonNull ItemCriteriaRule itemCriteriaRule, boolean allowMatchesOnNonDiscountableItems) Evaluates theItemCriteriaRule
against theOrder's line items
to determine if the order matches.Modifier and TypeMethodDescriptionprotected boolean
DefaultOfferCandidateService.isFreeGiftItem
(@NonNull EnhancedLineItem orderItem) Determines if the givenEnhancedLineItem
is a free gift item.protected boolean
DefaultOfferCandidateService.matchIsAllowedForItem
(@NonNull EnhancedLineItem orderItem, boolean allowMatchesOnNonDiscountableItems) Determine whether or not a match is allowed for the line item.Modifier and TypeMethodDescriptionprotected void
DefaultOfferCandidateService.addQualifiersToMap
(BaseCandidateOffer candidateOffer, Map<ItemCriteriaRule, Collection<EnhancedLineItem>> itemCriteriaMap) protected boolean
DefaultOfferCandidateService.evaluateOfferItemCriteriaAgainstOrder
(@NonNull EnhancedOrder order, @NonNull BaseCandidateOffer offer, @NonNull Map<ItemCriteriaRule, Collection<EnhancedLineItem>> itemCriteriaMap, String connectiveOperator, boolean allowMatchesOnNonDiscountableItems) Evaluates theItemCriteriaRules
from an order or order item targeting offer against theOrder
to determine whether the offer is applicable.protected boolean
DefaultOfferCandidateService.evaluateSubscriptionDiscountAgainstItems
(@NonNull Offer offer, @NonNull Map<ItemCriteriaRule, Collection<EnhancedLineItem>> itemCriteriaMap) protected boolean
DefaultOfferCandidateService.isMinSubtotalMet
(javax.money.MonetaryAmount minSubtotalRequired, Set<? extends EnhancedLineItem> itemsToSum) -
Uses of EnhancedLineItem in com.broadleafcommerce.promotion.offer.service.engine.proration
Modifier and TypeMethodDescriptionprotected com.broadleafcommerce.promotion.offer.client.web.context.info.LineItemRef
DefaultProrationService.createLineItemRef
(EnhancedLineItem lineItem) protected EnhancedProratedItemOfferAdjustment
DefaultProrationService.createProratedAdjustment
(Offer offer, EnhancedLineItem lineItem, LineItemOfferDetail parentDetail, javax.money.MonetaryAmount proratedAmt, int quantity) protected String
DefaultProrationService.getCustomLineItemType
(EnhancedLineItem lineItem) protected String
DefaultProrationService.getLineItemType
(EnhancedLineItem lineItem) Modifier and TypeMethodDescriptionDefaultProrationService.buildProratedOrderAdjustments
(OrderOfferAdjustment offerAdjustment, List<? extends EnhancedLineItem> lineItems, DiscountableItemInfo discountableItemInfo) ProrationService.buildProratedOrderAdjustments
(OrderOfferAdjustment offerAdjustment, List<? extends EnhancedLineItem> lineItems, DiscountableItemInfo discountableItemInfo) Builds a list ofEnhancedProratedOfferAdjustments
that prorates the adjustment value of the passed inOrderOfferAdjustment
to the passed in list of relevantEnhancedLineItem
sprotected javax.money.MonetaryAmount
DefaultProrationService.getDiscountableItemsTotal
(javax.money.MonetaryAmount startingAmount, List<? extends EnhancedLineItem> lineItems) Gets the discountable total for the givenEnhancedLineItems
.protected Set<EnhancedProratedOfferAdjustment>
DefaultProrationService.prorateAdjustmentAmongItems
(Offer offer, javax.money.MonetaryAmount adjustmentAmount, DiscountableItemInfo discountableItemInfo, List<? extends EnhancedLineItem> lineItems, boolean updateItem) Prorates the given adjustment across the givenEnhancedLineItems
. -
Uses of EnhancedLineItem in com.broadleafcommerce.promotion.offer.web.context
Modifier and TypeMethodDescriptionEnhancedOrder.getAllLineItems()
EnhancedOrder.getLineItems
(boolean isForFulfillment) -
Uses of EnhancedLineItem in com.broadleafcommerce.promotion.offer.web.context.info
Modifier and TypeMethodDescriptionItemOfferAdjustment.getLineItem()
LineItemOfferDetail.getLineItem()
TheEnhancedLineItem
affected byoffers
.Modifier and TypeMethodDescriptionvoid
LineItemOfferDetail.setLineItem
(EnhancedLineItem lineItem) TheEnhancedLineItem
affected byoffers
.