Class DefaultRenderingComponentValidator
- java.lang.Object
-
- de.hybris.platform.cmsfacades.rendering.validators.component.DefaultRenderingComponentValidator
-
- All Implemented Interfaces:
org.springframework.validation.Validator
public class DefaultRenderingComponentValidator extends java.lang.Object implements org.springframework.validation.ValidatorValidator to validate attributes used to extract a component for rendering.
-
-
Constructor Summary
Constructors Constructor Description DefaultRenderingComponentValidator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcheckCode(java.lang.String codeValue, java.lang.String fieldName, org.springframework.validation.Errors errors, java.util.function.Predicate<java.lang.String> predicate)Verifies whether the code exists using provided predicate.protected CatalogCodeExistsPredicategetCatalogCodeExistsPredicate()protected CategoryCodeExistsPredicategetCategoryCodeExistsPredicate()protected ProductCodeExistsPredicategetProductCodeExistsPredicate()voidsetCatalogCodeExistsPredicate(CatalogCodeExistsPredicate catalogCodeExistsPredicate)voidsetCategoryCodeExistsPredicate(CategoryCodeExistsPredicate categoryCodeExistsPredicate)voidsetProductCodeExistsPredicate(ProductCodeExistsPredicate productCodeExistsPredicate)booleansupports(java.lang.Class<?> clazz)voidvalidate(java.lang.Object obj, org.springframework.validation.Errors errors)
-
-
-
Method Detail
-
supports
public boolean supports(java.lang.Class<?> clazz)
- Specified by:
supportsin interfaceorg.springframework.validation.Validator
-
validate
public void validate(java.lang.Object obj, org.springframework.validation.Errors errors)- Specified by:
validatein interfaceorg.springframework.validation.Validator
-
checkCode
protected void checkCode(java.lang.String codeValue, java.lang.String fieldName, org.springframework.validation.Errors errors, java.util.function.Predicate<java.lang.String> predicate)Verifies whether the code exists using provided predicate.- Parameters:
codeValue- the code valuefieldName- the code name fielderrors- theErrorsobjectpredicate- the predicate
-
getCategoryCodeExistsPredicate
protected CategoryCodeExistsPredicate getCategoryCodeExistsPredicate()
-
setCategoryCodeExistsPredicate
public void setCategoryCodeExistsPredicate(CategoryCodeExistsPredicate categoryCodeExistsPredicate)
-
getProductCodeExistsPredicate
protected ProductCodeExistsPredicate getProductCodeExistsPredicate()
-
setProductCodeExistsPredicate
public void setProductCodeExistsPredicate(ProductCodeExistsPredicate productCodeExistsPredicate)
-
getCatalogCodeExistsPredicate
protected CatalogCodeExistsPredicate getCatalogCodeExistsPredicate()
-
setCatalogCodeExistsPredicate
public void setCatalogCodeExistsPredicate(CatalogCodeExistsPredicate catalogCodeExistsPredicate)
-
-