public class DroolsRuleValidateInterceptor extends Object implements ValidateInterceptor<DroolsRuleModel>
false:
Check that DroolsRule.code doesn't contain double-quote (") and that @ruleCode meta-data is present
in DroolsRule.drl and matches DroolsRule.code:
droolsruleengineservices.validate.droolsrule.rulecode
Check for DroolsRule.uuid doesn't contain double-quote(") and that it matches the DroolsRule.drl rule
declaration ( using double-quotes around the rule, e.g. rule "this is the rule uuid"):
droolsruleengineservices.validate.droolsrule.rulename
Check that DroolsRule.rulePackage attribute (if set) matches the package declaration in the
DroolsRule.drl content: droolsruleengineservices.validate.droolsrule.rulepackage
| Constructor and Description |
|---|
DroolsRuleValidateInterceptor() |
| Modifier and Type | Method and Description |
|---|---|
protected ConfigurationService |
getConfigurationService() |
protected BiPredicate<DroolsRuleModel,DroolsRuleModel> |
getSameNameAndPackageBiPredicate() |
void |
onValidate(DroolsRuleModel model,
InterceptorContext ctx)
Called in the
modelService.saveAll() method. |
void |
setConfigurationService(ConfigurationService configurationService) |
void |
setSameNameAndPackageBiPredicate(BiPredicate<DroolsRuleModel,DroolsRuleModel> sameNameAndPackageBiPredicate) |
public void onValidate(DroolsRuleModel model, InterceptorContext ctx) throws InterceptorException
ValidateInterceptormodelService.saveAll() method. Validates the values of the given model.onValidate in interface ValidateInterceptor<DroolsRuleModel>model - the model which values has to be validatedctx - the InterceptorContextInterceptorException - if any values of the model are not valid.protected BiPredicate<DroolsRuleModel,DroolsRuleModel> getSameNameAndPackageBiPredicate()
public void setSameNameAndPackageBiPredicate(BiPredicate<DroolsRuleModel,DroolsRuleModel> sameNameAndPackageBiPredicate)
protected ConfigurationService getConfigurationService()
public void setConfigurationService(ConfigurationService configurationService)
Copyright © 2017 SAP SE. All Rights Reserved.