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 Object
implements ValidateInterceptor, org.springframework.context.ApplicationContextAware, org.springframework.beans.factory.InitializingBean
ValidateInterceptor checking the value of the conversionStrategy attribute set on a
ConversionMediaFormatModel. The attribute's value must not be empty or null and must reflect a spring bean
name, which is an instance of MediaConversionStrategy. If this is not the case a
MediaConversionModelValidationException will be emitted.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidorg.springframework.context.ApplicationContextvoidonValidate(Object model, InterceptorContext ctx) Called in themodelService.saveAll()method.voidsetApplicationContext(org.springframework.context.ApplicationContext applicationContext)
-
Constructor Details
-
ConversionStrategyValidateInterceptor
public ConversionStrategyValidateInterceptor()
-
-
Method Details
-
afterPropertiesSet
public void afterPropertiesSet()- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean- See Also:
-
InitializingBean.afterPropertiesSet()
-
onValidate
public void onValidate(Object model, InterceptorContext ctx) throws MediaConversionModelValidationException Called 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:
-
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)
-