Class ConversionStrategyValidateInterceptor
- java.lang.Object
-
- de.hybris.platform.mediaconversion.model.interceptors.ConversionStrategyValidateInterceptor
-
- All Implemented Interfaces:
Interceptor,ValidateInterceptor,org.springframework.beans.factory.Aware,org.springframework.beans.factory.InitializingBean,org.springframework.context.ApplicationContextAware
public class ConversionStrategyValidateInterceptor extends java.lang.Object implements ValidateInterceptor, org.springframework.context.ApplicationContextAware, org.springframework.beans.factory.InitializingBean
ValidateInterceptorchecking the value of theconversionStrategyattribute set on aConversionMediaFormatModel. The attribute's value must not be empty or null and must reflect a spring bean name, which is an instance ofMediaConversionStrategy. If this is not the case aMediaConversionModelValidationExceptionwill be emitted.
-
-
Constructor Summary
Constructors Constructor Description ConversionStrategyValidateInterceptor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidafterPropertiesSet()org.springframework.context.ApplicationContextgetApplicationContext()voidonValidate(java.lang.Object model, InterceptorContext ctx)Called in themodelService.saveAll()method.voidsetApplicationContext(org.springframework.context.ApplicationContext applicationContext)
-
-
-
Method Detail
-
afterPropertiesSet
public void afterPropertiesSet()
- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean- See Also:
InitializingBean.afterPropertiesSet()
-
onValidate
public void onValidate(java.lang.Object model, InterceptorContext ctx) throws MediaConversionModelValidationExceptionCalled in themodelService.saveAll()method. Validates the values of the given model.- Specified by:
onValidatein interfaceValidateInterceptor- Parameters:
model- the model which values has to be validatedctx- theInterceptorContext- Throws:
MediaConversionModelValidationException- See Also:
ValidateInterceptor.onValidate(Object, InterceptorContext)
-
getApplicationContext
public org.springframework.context.ApplicationContext getApplicationContext()
-
setApplicationContext
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
- Specified by:
setApplicationContextin interfaceorg.springframework.context.ApplicationContextAware- See Also:
ApplicationContextAware.setApplicationContext(ApplicationContext)
-
-