Class SingleCodeCouponValidateInterceptor
- java.lang.Object
-
- de.hybris.platform.couponservices.interceptor.SingleCodeCouponValidateInterceptor
-
- All Implemented Interfaces:
Interceptor,ValidateInterceptor<SingleCodeCouponModel>
public class SingleCodeCouponValidateInterceptor extends java.lang.Object implements ValidateInterceptor<SingleCodeCouponModel>
validation interceptor for Single code coupon
-
-
Constructor Summary
Constructors Constructor Description SingleCodeCouponValidateInterceptor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected L10NServicegetL10NService()voidonValidate(SingleCodeCouponModel coupon, InterceptorContext ctx)Called in themodelService.saveAll()method.voidsetL10NService(L10NService l10NService)protected voidvalidateMaxRedemptionsPerCustomer(SingleCodeCouponModel coupon)
-
-
-
Method Detail
-
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
protected L10NService getL10NService()
-
setL10NService
public void setL10NService(L10NService l10NService)
-
-