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 Details

    • ConversionStrategyValidateInterceptor

      public ConversionStrategyValidateInterceptor()
  • Method Details

    • afterPropertiesSet

      public void afterPropertiesSet()
      Specified by:
      afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
      See Also:
      • InitializingBean.afterPropertiesSet()
    • onValidate

      public void onValidate(Object model, InterceptorContext ctx) throws MediaConversionModelValidationException
      Called in the modelService.saveAll() method. Validates the values of the given model.
      Specified by:
      onValidate in interface ValidateInterceptor
      Parameters:
      model - the model which values has to be validated
      ctx - the InterceptorContext
      Throws:
      MediaConversionModelValidationException
      See Also:
    • getApplicationContext

      public org.springframework.context.ApplicationContext getApplicationContext()
    • setApplicationContext

      public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
      Specified by:
      setApplicationContext in interface org.springframework.context.ApplicationContextAware
      See Also:
      • ApplicationContextAware.setApplicationContext(ApplicationContext)