Class MultiCodeCouponValidateInterceptor
- java.lang.Object
-
- de.hybris.platform.couponservices.interceptor.MultiCodeCouponValidateInterceptor
-
- All Implemented Interfaces:
Interceptor
,ValidateInterceptor<MultiCodeCouponModel>
,org.springframework.beans.factory.InitializingBean
public class MultiCodeCouponValidateInterceptor extends java.lang.Object implements ValidateInterceptor<MultiCodeCouponModel>, org.springframework.beans.factory.InitializingBean
validation interceptor for Multi-code coupon
-
-
Constructor Summary
Constructors Constructor Description MultiCodeCouponValidateInterceptor()
-
Method Summary
-
-
-
Method Detail
-
onValidate
public void onValidate(@Nonnull MultiCodeCouponModel coupon, InterceptorContext ctx) throws InterceptorException
Description copied from interface:ValidateInterceptor
Called in themodelService.saveAll()
method. Validates the values of the given model.- Specified by:
onValidate
in interfaceValidateInterceptor<MultiCodeCouponModel>
- Parameters:
coupon
- the model which values has to be validatedctx
- theInterceptorContext
- Throws:
InterceptorException
- if any values of the model are not valid.
-
checkRemovalOfGeneratedCodes
protected void checkRemovalOfGeneratedCodes(MultiCodeCouponModel coupon, InterceptorContext ctx) throws CouponInterceptorException
- Throws:
CouponInterceptorException
- throws exception if trying to remove generated codes from multi-code coupon
-
checkSeedNumberIsNotDecremented
protected void checkSeedNumberIsNotDecremented(MultiCodeCouponModel coupon, InterceptorContext ctx) throws CouponInterceptorException
- Throws:
CouponInterceptorException
-
afterPropertiesSet
public void afterPropertiesSet()
- Specified by:
afterPropertiesSet
in interfaceorg.springframework.beans.factory.InitializingBean
-
getEquivalenceWrappedSet
protected java.util.Set<com.google.common.base.Equivalence.Wrapper<MediaModel>> getEquivalenceWrappedSet(java.util.Collection<MediaModel> seedCollection, com.google.common.base.Equivalence<MediaModel> eq)
-
checkActiveCoupon
protected boolean checkActiveCoupon(MultiCodeCouponModel coupon, InterceptorContext ctx)
-
isCodeGenerationConfigurationChanged
protected boolean isCodeGenerationConfigurationChanged(MultiCodeCouponModel model, InterceptorContext ctx)
-
getOriginal
protected <T> T getOriginal(MultiCodeCouponModel coupon, InterceptorContext ctx, java.lang.String attributeQualifier)
-
getConfigurationService
protected ConfigurationService getConfigurationService()
-
setConfigurationService
public void setConfigurationService(ConfigurationService configurationService)
-
-