Class DefaultMarketingMessageOfferCandidateService<P extends Offer>
java.lang.Object
com.broadleafcommerce.promotion.offer.service.DefaultMarketingMessageOfferCandidateService<P>
- All Implemented Interfaces:
MarketingMessageOfferCandidateService<P>
public class DefaultMarketingMessageOfferCandidateService<P extends Offer>
extends Object
implements MarketingMessageOfferCandidateService<P>
- Author:
- Samarth Dhruva (samarthd)
-
Field Summary
Modifier and TypeFieldDescriptionprotected final OfferCandidateService<P>
protected final com.broadleafcommerce.rulesengine.expression.service.RuleEvaluationService
-
Constructor Summary
ConstructorDescriptionDefaultMarketingMessageOfferCandidateService
(OfferCandidateService<P> offerCandidateService, com.broadleafcommerce.rulesengine.expression.service.RuleEvaluationService ruleEvaluationService) -
Method Summary
Modifier and TypeMethodDescriptionboolean
isCriteriaMatched
(@NonNull EnhancedLineItem item, @NonNull ItemCriteria criteria) Determines whether theEnhancedLineItem
matches theItemCriteria
.
-
Field Details
-
offerCandidateService
-
ruleEvaluationService
protected final com.broadleafcommerce.rulesengine.expression.service.RuleEvaluationService ruleEvaluationService
-
-
Constructor Details
-
DefaultMarketingMessageOfferCandidateService
public DefaultMarketingMessageOfferCandidateService(OfferCandidateService<P> offerCandidateService, com.broadleafcommerce.rulesengine.expression.service.RuleEvaluationService ruleEvaluationService)
-
-
Method Details
-
isCriteriaMatched
public boolean isCriteriaMatched(@NonNull @NonNull EnhancedLineItem item, @NonNull @NonNull ItemCriteria criteria) Description copied from interface:MarketingMessageOfferCandidateService
Determines whether theEnhancedLineItem
matches theItemCriteria
. Since there's no order yet, usually, this will only check theItemCriteriaRule#getRule()
rule expression} for eachrule
and not thenumber of matches required
.- Specified by:
isCriteriaMatched
in interfaceMarketingMessageOfferCandidateService<P extends Offer>
- Parameters:
item
- Item to determine whether it matches the criteriacriteria
- Criteria to match- Returns:
- Whether
item
matchescriteria
.
-