Class LocalizedMediaValidator

java.lang.Object
de.hybris.platform.cmsfacades.common.validator.impl.LocalizedMediaValidator
All Implemented Interfaces:
LocalizedTypeValidator

public class LocalizedMediaValidator extends Object implements LocalizedTypeValidator
Default validator to use for validating localized attributes of type media. This implementation uses the MediaService and the CMSAdminSiteService to verify whether a given media is valid or not.
  • Constructor Details

    • LocalizedMediaValidator

      public LocalizedMediaValidator()
  • Method Details

    • validate

      public void validate(String language, String fieldName, String mediaCode, org.springframework.validation.Errors errors)
      Description copied from interface: LocalizedTypeValidator
      Validate the attribute value.
      Specified by:
      validate in interface LocalizedTypeValidator
      Parameters:
      language - - the language of the error message
      fieldName - - the name of the field under validation
      mediaCode - - the attribute value value in the given locale
      errors - - the current errors context
    • reject

      public void reject(String language, String fieldName, String errorCode, org.springframework.validation.Errors errors)
      Description copied from interface: LocalizedTypeValidator
      Create a localized error message.
      Specified by:
      reject in interface LocalizedTypeValidator
      Parameters:
      language - - the language of the error message
      fieldName - - the name of the field under validation
      errorCode - - the error code
      errors - - the current errors context
    • getMediaService

      protected MediaService getMediaService()
    • setMediaService

      public void setMediaService(MediaService mediaService)
    • getCmsAdminSiteService

      protected CMSAdminSiteService getCmsAdminSiteService()
    • setCmsAdminSiteService

      public void setCmsAdminSiteService(CMSAdminSiteService cmsAdminSiteService)