Class DefaultRenderingComponentValidator

  • All Implemented Interfaces:
    org.springframework.validation.Validator

    public class DefaultRenderingComponentValidator
    extends java.lang.Object
    implements org.springframework.validation.Validator
    Validator to validate attributes used to extract a component for rendering.
    • Constructor Detail

      • DefaultRenderingComponentValidator

        public DefaultRenderingComponentValidator()
    • Method Detail

      • supports

        public boolean supports​(java.lang.Class<?> clazz)
        Specified by:
        supports in interface org.springframework.validation.Validator
      • validate

        public void validate​(java.lang.Object obj,
                             org.springframework.validation.Errors errors)
        Specified by:
        validate in interface org.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 value
        fieldName - the code name field
        errors - the Errors object
        predicate - the predicate
      • setCategoryCodeExistsPredicate

        public void setCategoryCodeExistsPredicate​(CategoryCodeExistsPredicate categoryCodeExistsPredicate)
      • setProductCodeExistsPredicate

        public void setProductCodeExistsPredicate​(ProductCodeExistsPredicate productCodeExistsPredicate)
      • setCatalogCodeExistsPredicate

        public void setCatalogCodeExistsPredicate​(CatalogCodeExistsPredicate catalogCodeExistsPredicate)