Class RuleEngineRuleValidateInterceptor
- java.lang.Object
-
- de.hybris.platform.ruleengine.dao.interceptors.RuleEngineRuleValidateInterceptor
-
- All Implemented Interfaces:
Interceptor,ValidateInterceptor<DroolsRuleModel>
public class RuleEngineRuleValidateInterceptor extends java.lang.Object implements ValidateInterceptor<DroolsRuleModel>
AbstractRuleEngineRuleModel validation interceptor. Makes sure we do not save the model state, which could lead to versioned instance inconsistency
-
-
Constructor Summary
Constructors Constructor Description RuleEngineRuleValidateInterceptor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected AbstractValidationResultgetValidationResult(DroolsRuleModel droolsRule, InterceptorContext ctx)protected RuleModelValidatorgetValidator()voidonValidate(DroolsRuleModel droolsRule, InterceptorContext ctx)Called in themodelService.saveAll()method.voidsetValidator(RuleModelValidator validator)
-
-
-
Method Detail
-
onValidate
public void onValidate(DroolsRuleModel droolsRule, InterceptorContext ctx) throws InterceptorException
Description copied from interface:ValidateInterceptorCalled in themodelService.saveAll()method. Validates the values of the given model.- Specified by:
onValidatein interfaceValidateInterceptor<DroolsRuleModel>- Parameters:
droolsRule- the model which values has to be validatedctx- theInterceptorContext- Throws:
InterceptorException- if any values of the model are not valid.
-
getValidationResult
protected AbstractValidationResult getValidationResult(DroolsRuleModel droolsRule, InterceptorContext ctx)
-
getValidator
protected RuleModelValidator getValidator()
-
setValidator
public void setValidator(RuleModelValidator validator)
-
-