Interface ItemOfferProcessor
- All Superinterfaces:
BaseProcessor,OrderOfferProcessor
- All Known Implementing Classes:
ItemOfferProcessorImpl
- Author:
- jfischer
-
Method Summary
Modifier and TypeMethodDescriptionvoidapplyAllItemOffers(List<PromotableCandidateItemOffer> itemOffers, PromotableOrder order) Private method that takes a list of sorted CandidateItemOffers and determines if each offer can be applied based on the restrictions (stackable and/or combinable) on that offer.voidapplyAndCompareOrderAndItemOffers(PromotableOrder order, List<PromotableCandidateOrderOffer> qualifiedOrderOffers, List<PromotableCandidateItemOffer> qualifiedItemOffers) voidfilterItemLevelOffer(PromotableOrder order, List<PromotableCandidateItemOffer> qualifiedItemOffers, Offer offer) Review an item level offer against the list of discountable items from the order.voidfilterOffers(PromotableOrder order, List<Offer> filteredOffers, List<PromotableCandidateOrderOffer> qualifiedOrderOffers, List<PromotableCandidateItemOffer> qualifiedItemOffers) Methods inherited from interface org.broadleafcommerce.core.offer.service.processor.BaseProcessor
filterOffersMethods inherited from interface org.broadleafcommerce.core.offer.service.processor.OrderOfferProcessor
applyAllOrderOffers, couldOfferApplyToOrder, executeExpression, filterOrderLevelOffer, getPromotableItemFactory, removeTrailingNotCombinableOrderOffers, setOfferDao, setOrderItemDao, setPromotableItemFactory, synchronizeAdjustmentsAndPrices
-
Method Details
-
filterItemLevelOffer
void filterItemLevelOffer(PromotableOrder order, List<PromotableCandidateItemOffer> qualifiedItemOffers, Offer offer) Review an item level offer against the list of discountable items from the order. If the offer applies, add it to the qualifiedItemOffers list.- Parameters:
order- the BLC orderqualifiedItemOffers- the container list for any qualified offersoffer- the offer in question
-
applyAllItemOffers
Private method that takes a list of sorted CandidateItemOffers and determines if each offer can be applied based on the restrictions (stackable and/or combinable) on that offer. OrderItemAdjustments are create on the OrderItem for each applied CandidateItemOffer. An offer with stackable equals false cannot be applied to an OrderItem that already contains an OrderItemAdjustment. An offer with combinable equals false cannot be applied to an OrderItem if that OrderItem already contains an OrderItemAdjustment, unless the offer is the same offer as the OrderItemAdjustment offer.- Parameters:
itemOffers- a sorted list of CandidateItemOffer
-
applyAndCompareOrderAndItemOffers
void applyAndCompareOrderAndItemOffers(PromotableOrder order, List<PromotableCandidateOrderOffer> qualifiedOrderOffers, List<PromotableCandidateItemOffer> qualifiedItemOffers) -
filterOffers
void filterOffers(PromotableOrder order, List<Offer> filteredOffers, List<PromotableCandidateOrderOffer> qualifiedOrderOffers, List<PromotableCandidateItemOffer> qualifiedItemOffers)
-