Class DefaultCMSLinkComponentValidator
java.lang.Object
de.hybris.platform.cmsfacades.cmsitems.validator.DefaultCMSLinkComponentValidator
- All Implemented Interfaces:
Validator<CMSLinkComponentModel>
public class DefaultCMSLinkComponentValidator
extends Object
implements Validator<CMSLinkComponentModel>
Default implementation of the validator for
CMSLinkComponentModel-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected CommonI18NServiceprotected LanguageFacadeprotected ValidationErrorsProviderprotected voidAdds a new invalid url error in the list of errors.voidsetCommonI18NService(CommonI18NService commonI18NService) voidsetLanguageFacade(LanguageFacade languageFacade) voidsetValidationErrorsProvider(ValidationErrorsProvider validationErrorsProvider) voidvalidate(CMSLinkComponentModel validatee) Method to perform validation on a given object.protected voidverifyNameField(CMSLinkComponentModel validatee) Verifies whether the name for the component is provided.protected voidVerifies that one of the following is specified: category, content page, product or urlprotected voidverifyUrl(CMSLinkComponentModel validatee) Verifies whether the provided url is valid or not.
-
Constructor Details
-
DefaultCMSLinkComponentValidator
public DefaultCMSLinkComponentValidator()
-
-
Method Details
-
validate
Description copied from interface:ValidatorMethod to perform validation on a given object.- Specified by:
validatein interfaceValidator<CMSLinkComponentModel>- Parameters:
validatee- the inpected object being validated.
-
verifyUrl
Verifies whether the provided url is valid or not. If not an error is added to the list of errors.- Parameters:
validatee- the component to validate.
-
provideUrlValidationError
protected void provideUrlValidationError()Adds a new invalid url error in the list of errors. -
verifyNameField
Verifies whether the name for the component is provided.- Parameters:
validatee- the component to validate
-
verifyOnlyOneTypeProvided
Verifies that one of the following is specified: category, content page, product or url- Parameters:
target- - the link component dto
-
getValidationErrorsProvider
-
setValidationErrorsProvider
-
getLanguageFacade
-
setLanguageFacade
-
getCommonI18NService
-
setCommonI18NService
-