Class PromotionSourceRuleValidateInterceptor
java.lang.Object
de.hybris.platform.promotionengineservices.interceptors.PromotionSourceRuleValidateInterceptor
- All Implemented Interfaces:
Interceptor,ValidateInterceptor<PromotionSourceRuleModel>
public class PromotionSourceRuleValidateInterceptor
extends Object
implements ValidateInterceptor<PromotionSourceRuleModel>
Validates the PromotionSourceRuleModel item type. Limiting the maximum numbers of condition and action for performance perspective
works only when promotionengineservices.maximum.limitation.perrule.enable = true
You can configure the maximum numbers via below properties
promotionengineservices.maximum.conditions.perrule=10
promotionengineservices.maximum.actions.perrule=2
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected ConfigurationServicevoidonValidate(PromotionSourceRuleModel model, InterceptorContext ctx) Called in themodelService.saveAll()method.voidsetConfigurationService(ConfigurationService configurationService) protected voidprotected void
-
Constructor Details
-
PromotionSourceRuleValidateInterceptor
public PromotionSourceRuleValidateInterceptor()
-
-
Method Details
-
onValidate
public void onValidate(PromotionSourceRuleModel model, InterceptorContext ctx) throws InterceptorException Description copied from interface:ValidateInterceptorCalled in themodelService.saveAll()method. Validates the values of the given model.- Specified by:
onValidatein interfaceValidateInterceptor<PromotionSourceRuleModel>- Parameters:
model- the model which values has to be validatedctx- theInterceptorContext- Throws:
InterceptorException- if any values of the model are not valid.
-
validateCondition
- Throws:
InterceptorException
-
validateAction
- Throws:
InterceptorException
-
getConfigurationService
-
setConfigurationService
-