public class SingleCodeCouponValidateInterceptor extends java.lang.Object implements ValidateInterceptor<SingleCodeCouponModel>
| Constructor and Description |
|---|
SingleCodeCouponValidateInterceptor() |
| Modifier and Type | Method and Description |
|---|---|
void |
onValidate(SingleCodeCouponModel coupon,
InterceptorContext ctx)
Called in the
modelService.saveAll() method. |
protected void |
validateMaxRedemptionsPerCustomer(SingleCodeCouponModel coupon) |
public void onValidate(SingleCodeCouponModel coupon, InterceptorContext ctx) throws InterceptorException
ValidateInterceptormodelService.saveAll() method. Validates the values of the given model.onValidate in interface ValidateInterceptor<SingleCodeCouponModel>coupon - the model which values has to be validatedctx - the InterceptorContextInterceptorException - if any values of the model are not valid.protected void validateMaxRedemptionsPerCustomer(SingleCodeCouponModel coupon) throws CouponInterceptorException
CouponInterceptorException - throws exception if MaxRedemptionsPerCustomer are less than 0 or greater than max allowed redemptionCopyright © 2018 SAP SE. All Rights Reserved.