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
FieldsModifier and TypeFieldDescriptionprotected final OfferCandidateService<P>protected final com.broadleafcommerce.rulesengine.expression.service.RuleEvaluationService -
Constructor Summary
ConstructorsConstructorDescriptionDefaultMarketingMessageOfferCandidateService(OfferCandidateService<P> offerCandidateService, com.broadleafcommerce.rulesengine.expression.service.RuleEvaluationService ruleEvaluationService) -
Method Summary
Modifier and TypeMethodDescriptionbooleanisCriteriaMatched(@NonNull EnhancedLineItem item, @NonNull ItemCriteria criteria) Determines whether theEnhancedLineItemmatches 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:MarketingMessageOfferCandidateServiceDetermines whether theEnhancedLineItemmatches theItemCriteria. Since there's no order yet, usually, this will only check theItemCriteriaRule#getRule()rule expression} for eachruleand not thenumber of matches required.- Specified by:
isCriteriaMatchedin interfaceMarketingMessageOfferCandidateService<P extends Offer>- Parameters:
item- Item to determine whether it matches the criteriacriteria- Criteria to match- Returns:
- Whether
itemmatchescriteria.
-