Class LocalizedMediaValidator
java.lang.Object
de.hybris.platform.cmsfacades.common.validator.impl.LocalizedMediaValidator
- All Implemented Interfaces:
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected CMSAdminSiteServiceprotected MediaServicevoidreject(String language, String fieldName, String errorCode, org.springframework.validation.Errors errors) Create a localized error message.voidsetCmsAdminSiteService(CMSAdminSiteService cmsAdminSiteService) voidsetMediaService(MediaService mediaService) voidvalidate(String language, String fieldName, String mediaCode, org.springframework.validation.Errors errors) Validate the attribute value.
-
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:LocalizedTypeValidatorValidate the attribute value.- Specified by:
validatein interfaceLocalizedTypeValidator- Parameters:
language- - the language of the error messagefieldName- - the name of the field under validationmediaCode- - the attribute value value in the given localeerrors- - the current errors context
-
reject
public void reject(String language, String fieldName, String errorCode, org.springframework.validation.Errors errors) Description copied from interface:LocalizedTypeValidatorCreate a localized error message.- Specified by:
rejectin interfaceLocalizedTypeValidator- Parameters:
language- - the language of the error messagefieldName- - the name of the field under validationerrorCode- - the error codeerrors- - the current errors context
-
getMediaService
-
setMediaService
-
getCmsAdminSiteService
-
setCmsAdminSiteService
-