Uses of Class
com.broadleafcommerce.promotion.offer.service.dto.OfferProcessingContext
Package
Description
-
Uses of OfferProcessingContext in com.broadleafcommerce.promotion.offer.service.engine
Modifier and TypeMethodDescriptionDefaultOfferEngineService.prepareOfferProcessingContext
(EnhancedOrder order, CandidateOffers candidateOffers) This method takes in a set of candidate offers.OfferProcesingUtility.prepareOfferProcessingContext
(EnhancedOrder order, CandidateOffers candidateOffers) Modifier and TypeMethodDescriptionprotected void
OfferProcesingUtility.addNodes
(CompatiblePermutationNode parentNode, OfferProcessingContext context, List<Set<OfferCombinabilityCriteria>> offerTypeCriteria, LinkedHashSet<CompatiblePermutationNode> allNodesSet) void
DefaultOfferEngineService.applyAdjustments
(EnhancedOrder order, OfferProcessingContext processingContext) void
OfferEngineService.applyAdjustments
(EnhancedOrder order, OfferProcessingContext processingContext) Applies the offers to the order in a way that gives the best discount for the customer based on possible permutations.protected void
OfferProcesingUtility.buildCombinedOfferTypePermutations
(EnhancedOrder order, OfferProcessingContext context) Each offer type (e.g.void
DefaultOfferEngineService.populateProratedItemAdjustments
(EnhancedOrder order, OfferProcessingContext context) void
OfferEngineService.populateProratedItemAdjustments
(EnhancedOrder order, OfferProcessingContext context) For anyOffer
that has aDiscount.prorationType
ofProrationType.TARGET_AND_QUALIFIER
, this will populate all of theProratedItemOfferAdjustments
on theLineItemOfferDetails
mostly for the sake of reporting instruments.void
DefaultOfferEngineService.populateProratedOrderAdjustments
(EnhancedOrder order, OfferProcessingContext context) void
OfferEngineService.populateProratedOrderAdjustments
(EnhancedOrder order, OfferProcessingContext context) Populates all of theEnhancedProratedOfferAdjustments
for anyOffer
that has aDiscount.getTargetType()
ofDiscountTargetType.ORDER
and add them onto the individual discountableorder line items
.void
DefaultOfferEngineService.processOfferPermutations
(OfferProcessingContext context) -
Uses of OfferProcessingContext in com.broadleafcommerce.promotion.offer.service.engine.application
Modifier and TypeMethodDescriptionDefaultOfferApplicationService.applyAdjustments
(OfferProcessingContext context) OfferApplicationService.applyAdjustments
(OfferProcessingContext context) Applies the adjustments to the EnhancedOrder and returns the order with adjustments applied and totals updated.protected void
DefaultOfferApplicationService.applyFulfillmentGroupAdjustments
(OfferProcessingContext context) protected void
DefaultOfferApplicationService.applyFulfillmentItemAdjustments
(OfferProcessingContext context) protected void
DefaultOfferApplicationService.applyItemAdjustments
(OfferProcessingContext context) protected void
DefaultOfferApplicationService.applyOfferAdjustments
(OfferProcessingContext context) protected void
DefaultOfferApplicationService.prepareForItemOfferProcessing
(OfferProcessingContext context) Before scoring item offer permutations, it is helpful to prepare the list of offers by calculating potential savings, sorting, and enforcing in order max-uses rules.protected void
DefaultOfferApplicationService.processItemOfferEdgeCases
(OfferProcessingContext context) This method can be used to manipulate the list ofCombinedTypesOfferPermutation
s after the Item Offer Processing phase is complete.void
DefaultOfferApplicationService.processOfferPermutations
(OfferProcessingContext context) void
OfferApplicationService.processOfferPermutations
(OfferProcessingContext context) Calculates the value of each offer permutation and determines the best combination of all offer types.protected void
DefaultOfferApplicationService.scoreFulfillmentGroupOfferPermutations
(OfferProcessingContext context, CombinedTypesOfferPermutation combinedTypesOfferPermutation) protected void
DefaultOfferApplicationService.scoreFulfillmentItemOfferPermutations
(OfferProcessingContext context, CombinedTypesOfferPermutation combinedTypesOfferPermutation) protected void
DefaultOfferApplicationService.scoreItemOfferPermutations
(OfferProcessingContext context, CombinedTypesOfferPermutation combinedTypesOfferPermutation) protected void
DefaultOfferApplicationService.scoreOrderOfferPermutations
(OfferProcessingContext context, CombinedTypesOfferPermutation combinedTypesOfferPermutation) -
Uses of OfferProcessingContext in com.broadleafcommerce.promotion.offer.service.engine.application.processor
Modifier and TypeMethodDescriptionprotected void
DefaultItemOfferProcessor.addFreeGiftsToResult
(OfferProcessingContext context, ItemOfferPermutationResult result) protected void
DefaultOrderOfferProcessor.addVoucherToResult
(OfferProcessingContext context, OrderOfferPermutationResult result, CandidateOrderOffer orderOffer) void
DefaultFulfillmentGroupOfferProcessor.applyFulfillmentGroupAdjustments
(OfferProcessingContext context, Map<String, List<FulfillmentGroupAdjustment>> adjustmentsMap) void
FulfillmentGroupOfferProcessor.applyFulfillmentGroupAdjustments
(OfferProcessingContext context, Map<String, List<FulfillmentGroupAdjustment>> adjustments) void
DefaultItemOfferProcessor.applyItemAdjustments
(OfferProcessingContext context, ItemOfferPermutationResult result) void
ItemOfferProcessor.applyItemAdjustments
(OfferProcessingContext context, ItemOfferPermutationResult result) For item processing, the adjustments are stored onLineItemOfferDetail
records.void
DefaultOrderOfferProcessor.applyOrderAdjustments
(OfferProcessingContext context, OrderOfferPermutationResult orderOfferPermutationResult) void
OrderOfferProcessor.applyOrderAdjustments
(OfferProcessingContext context, OrderOfferPermutationResult result) protected DiscountableItemInfo
DefaultFulfillmentGroupOfferProcessor.calculateDiscountableItemTotal
(EnhancedFulfillmentGroup efg, CandidateFulfillmentGroupOffer co, OfferProcessingContext context, CombinedTypesOfferPermutation ctop) protected DiscountableItemInfo
DefaultFulfillmentGroupOfferProcessor.calculateDiscountableItemTotal
(EnhancedFulfillmentGroup efg, OfferProcessingContext context, CombinedTypesOfferPermutation ctop) Deprecated.protected DiscountableItemInfo
DefaultOrderOfferProcessor.calculateDiscountableItemTotal
(List<EnhancedOrderLineItem> relevantItems, CandidateOrderOffer orderOffer, OfferProcessingContext context, CombinedTypesOfferPermutation ctop, OrderOfferPermutationResult orderResult) protected Optional<javax.money.MonetaryAmount>
DefaultFulfillmentGroupOfferProcessor.computeAdjustmentValue
(javax.money.MonetaryAmount discountableTotal, CandidateFulfillmentGroupOffer fgOffer, CandidateFulfillmentGroup currentGroup, OfferProcessingContext context) Calculates the value of the adjustment .protected FulfillmentGroupOfferPermutationResult
DefaultFulfillmentGroupOfferProcessor.computeOfferPermutationValue
(OfferProcessingContext context, OffersPermutation<CandidateFulfillmentGroupOffer> offersPermutation, CombinedTypesOfferPermutation ctop) protected ItemOfferPermutationResult
DefaultItemOfferProcessor.computeOfferPermutationValue
(OfferProcessingContext context, List<CandidateItemOffer> candidateItemOffers, OrderTotals orderTotals) protected OrderOfferPermutationResult
DefaultOrderOfferProcessor.computeOfferPermutationValue
(OfferProcessingContext context, OffersPermutation<CandidateOrderOffer> offerPermutation, CombinedTypesOfferPermutation ctop) protected FulfillmentGroupAdjustment
DefaultFulfillmentGroupOfferProcessor.createFulfillmentGroupAdjustment
(OfferProcessingContext context, CandidateFulfillmentGroupOffer fulfillmentGroupOffer, CandidateFulfillmentGroup fulfillmentGroup, javax.money.MonetaryAmount amount) protected OrderOfferAdjustment
DefaultOrderOfferProcessor.createOrderOfferAdjustment
(OfferProcessingContext context, CandidateOrderOffer orderOffer, javax.money.MonetaryAmount amount) void
DefaultFulfillmentGroupOfferProcessor.findBestFulfillmentGroupOffersForPermutation
(OfferProcessingContext context, CombinedTypesOfferPermutation ctop) void
FulfillmentGroupOfferProcessor.findBestFulfillmentGroupOffersForPermutation
(OfferProcessingContext context, CombinedTypesOfferPermutation combinedPermutation) void
DefaultItemOfferProcessor.findBestItemOffersForPermutation
(OfferProcessingContext context, CombinedTypesOfferPermutation ctop) void
ItemOfferProcessor.findBestItemOffersForPermutation
(OfferProcessingContext context, CombinedTypesOfferPermutation combinedPermutation) void
DefaultOrderOfferProcessor.findBestOrderOffersForPermutation
(OfferProcessingContext context, CombinedTypesOfferPermutation ctop) void
OrderOfferProcessor.findBestOrderOffersForPermutation
(OfferProcessingContext context, CombinedTypesOfferPermutation combinedPermutation) protected List<CandidateItemOffer>
DefaultItemOfferProcessor.getCandidateItemOffers
(OfferProcessingContext context) -
Uses of OfferProcessingContext in com.broadleafcommerce.promotion.offer.service.engine.proration
Modifier and TypeMethodDescriptionvoid
DefaultProrationService.populateProratedOrderAdjustments
(EnhancedOrder order, OfferProcessingContext context) void
ProrationService.populateProratedOrderAdjustments
(EnhancedOrder order, OfferProcessingContext context) Populates all of theEnhancedProratedOfferAdjustments
for anyOffer
that has aDiscount.getTargetType()
ofDiscountTargetType.ORDER
and add them onto the individual discountablefulfillment items
, as well as populatingEnhancedFulfillmentGroup.getProratedFulfillmentAdjustments()
.