Class SingleCodeCouponValidateInterceptor
java.lang.Object
de.hybris.platform.couponservices.interceptor.SingleCodeCouponValidateInterceptor
- All Implemented Interfaces:
Interceptor,ValidateInterceptor<SingleCodeCouponModel>
public class SingleCodeCouponValidateInterceptor
extends Object
implements ValidateInterceptor<SingleCodeCouponModel>
validation interceptor for Single code coupon
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected L10NServicevoidonValidate(SingleCodeCouponModel coupon, InterceptorContext ctx) Called in themodelService.saveAll()method.voidsetL10NService(L10NService l10NService) protected void
-
Constructor Details
-
SingleCodeCouponValidateInterceptor
public SingleCodeCouponValidateInterceptor()
-
-
Method Details
-
onValidate
public void onValidate(SingleCodeCouponModel coupon, InterceptorContext ctx) throws InterceptorException Description copied from interface:ValidateInterceptorCalled in themodelService.saveAll()method. Validates the values of the given model.- Specified by:
onValidatein interfaceValidateInterceptor<SingleCodeCouponModel>- Parameters:
coupon- the model which values has to be validatedctx- theInterceptorContext- Throws:
InterceptorException- if any values of the model are not valid.
-
validateMaxRedemptionsPerCustomer
protected void validateMaxRedemptionsPerCustomer(SingleCodeCouponModel coupon) throws CouponInterceptorException - Throws:
CouponInterceptorException- throws exception if MaxRedemptionsPerCustomer are less than 0 or greater than max allowed redemption
-
getL10NService
-
setL10NService
-