Interface OrderAndItemOfferHelper
-
- All Known Implementing Classes:
DefaultOrderAndItemOfferHelper
public interface OrderAndItemOfferHelperThis class contains methods with usage shared byItemOfferProcessorandOrderOfferProcessor.- Author:
- Nathan Moore (nathanmoore).
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description com.broadleafcommerce.common.extension.TypeFactorygetOfferFactory()com.broadleafcommerce.rulesengine.expression.service.RuleEvaluationServicegetRuleEvaluationService()Map<ItemCriteriaRule,Integer>getTotalTimesCriteriaIsMetByCriteria(Map<ItemCriteriaRule,Collection<EnhancedLineItem>> itemsMetByCriteriaRule)Gets a map of total number of times theItemCriteriaRuleis met byItemCriteriaRule.booleanorderMeetsQualifyingTotalRequirements(BaseCandidateOffer candidateOffer)As offers are applied, recheck to ensure that the next offer in the collection of candidates can be applied based on the total of item qualifier prices.booleanorderMeetsSubtotalRequirements(EnhancedOrder order, BaseCandidateOffer candidateOffer)As offers are applied, recheck to ensure that the next offer in the collection of candidates can be applied based on the order subtotal.booleanorderMeetsTargetTotalRequirements(CandidateItemOffer itemOffer)As offers are applied, recheck to ensure that the next offer in the collection of candidates can be applied based on the total of target item prices.
-
-
-
Method Detail
-
orderMeetsQualifyingTotalRequirements
boolean orderMeetsQualifyingTotalRequirements(@NonNull BaseCandidateOffer candidateOffer)As offers are applied, recheck to ensure that the next offer in the collection of candidates can be applied based on the total of item qualifier prices.- Parameters:
candidateOffer-candidate offerto verify that it can be applied based on the total of item qualifier prices.- Returns:
- whether the offer can be applied based on the total of item qualifier prices.
-
orderMeetsTargetTotalRequirements
boolean orderMeetsTargetTotalRequirements(@NonNull CandidateItemOffer itemOffer)As offers are applied, recheck to ensure that the next offer in the collection of candidates can be applied based on the total of target item prices.- Parameters:
itemOffer-candidate offerto verify that it can be applied based on the total of target item prices.- Returns:
- whether the offer can be applied based on the total of target item prices.
-
orderMeetsSubtotalRequirements
boolean orderMeetsSubtotalRequirements(@NonNull EnhancedOrder order, @NonNull BaseCandidateOffer candidateOffer)As offers are applied, recheck to ensure that the next offer in the collection of candidates can be applied based on the order subtotal.- Parameters:
order-EnhancedOrderagainst whose subtotal to verify the candidate offer's applicabilitycandidateOffer-candidate offerto verify that it can be applied based on the order subtotal.- Returns:
- whether the offer can be applied based on the order subtotal.
-
getTotalTimesCriteriaIsMetByCriteria
Map<ItemCriteriaRule,Integer> getTotalTimesCriteriaIsMetByCriteria(@NonNull Map<ItemCriteriaRule,Collection<EnhancedLineItem>> itemsMetByCriteriaRule)
Gets a map of total number of times theItemCriteriaRuleis met byItemCriteriaRule.- Parameters:
itemsMetByCriteriaRule- a map ofEnhancedLineItemsthat meet theItemCriteriaRule- Returns:
- a map of total number of times the
ItemCriteriaRuleis met byItemCriteriaRule
-
getRuleEvaluationService
com.broadleafcommerce.rulesengine.expression.service.RuleEvaluationService getRuleEvaluationService()
- Returns:
- an instance of
RuleEvaluationService.
-
getOfferFactory
com.broadleafcommerce.common.extension.TypeFactory getOfferFactory()
- Returns:
- an instance of
TypeFactorythat creates offer domain objects
-
-