Class DefaultRuleBasedPromotionsContextValidator
- java.lang.Object
-
- de.hybris.platform.promotionengineservices.validators.impl.DefaultRuleBasedPromotionsContextValidator
-
- All Implemented Interfaces:
RuleBasedPromotionsContextValidator
public class DefaultRuleBasedPromotionsContextValidator extends java.lang.Object implements RuleBasedPromotionsContextValidator
Default(Drools specific) implementation for the RuleBasedPromotionsContextValidator.
-
-
Constructor Summary
Constructors Constructor Description DefaultRuleBasedPromotionsContextValidator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected CatalogVersionToRuleEngineContextMappingDaogetCatalogVersionToRuleEngineContextMappingDao()booleanisApplicable(RuleBasedPromotionModel ruleBasedPromotion, CatalogVersionModel catalogVersion, RuleType ruleType)finds rule based promotions for the given catalog versions and rule typeprotected booleanisNotLinkedWithDroolsRule(RuleBasedPromotionModel ruleBasedPromotion)protected booleanisOutdated(RuleBasedPromotionModel ruleBasedPromotion)protected java.util.function.Predicate<DroolsRuleEngineContextModel>isValidKieSessionPredicate()voidsetCatalogVersionToRuleEngineContextMappingDao(CatalogVersionToRuleEngineContextMappingDao catalogVersionToRuleEngineContextMappingDao)
-
-
-
Method Detail
-
isApplicable
public boolean isApplicable(RuleBasedPromotionModel ruleBasedPromotion, CatalogVersionModel catalogVersion, RuleType ruleType)
Description copied from interface:RuleBasedPromotionsContextValidatorfinds rule based promotions for the given catalog versions and rule type- Specified by:
isApplicablein interfaceRuleBasedPromotionsContextValidator- Parameters:
ruleBasedPromotion- the promotion that is a validation subjectcatalogVersion- the catalog version to look up rule based promotions forruleType- filters to return only mappings which rules module is of the given rule type- Returns:
- decision - true if applicable otherwise false
-
isOutdated
protected boolean isOutdated(RuleBasedPromotionModel ruleBasedPromotion)
-
isNotLinkedWithDroolsRule
protected boolean isNotLinkedWithDroolsRule(RuleBasedPromotionModel ruleBasedPromotion)
-
isValidKieSessionPredicate
protected java.util.function.Predicate<DroolsRuleEngineContextModel> isValidKieSessionPredicate()
-
getCatalogVersionToRuleEngineContextMappingDao
protected CatalogVersionToRuleEngineContextMappingDao getCatalogVersionToRuleEngineContextMappingDao()
-
setCatalogVersionToRuleEngineContextMappingDao
public void setCatalogVersionToRuleEngineContextMappingDao(CatalogVersionToRuleEngineContextMappingDao catalogVersionToRuleEngineContextMappingDao)
-
-