Package org.springmodules.validation.bean.conf.loader.xml.handler

Examples of org.springmodules.validation.bean.conf.loader.xml.handler.PropertyValidationElementHandler


            Node node = nodes.item(i);
            if (node.getNodeType() != Node.ELEMENT_NODE) {
                continue;
            }
            Element ruleDefinition = (Element) node;
            PropertyValidationElementHandler handler = handlerRegistry.findPropertyHandler(ruleDefinition, clazz, propertyDescriptor);
            if (handler == null) {
                logger.error("Could not handle element '" + ruleDefinition.getTagName() +
                    "'. Please make sure the proper validation rule definition handler is registered");
                throw new ValidationConfigurationException("Could not handle element '" + ruleDefinition.getTagName() + "'");
            }
            handler.handle(ruleDefinition, propertyName, configuration);
        }
    }
View Full Code Here


    /**
     * @see org.springmodules.validation.bean.conf.loader.xml.ValidationRuleElementHandlerRegistry#findPropertyHandler(org.w3c.dom.Element, Class, java.beans.PropertyDescriptor)
     */
    public PropertyValidationElementHandler findPropertyHandler(Element element, Class clazz, PropertyDescriptor descriptor) {
        for (Iterator iter = propertyHandlers.iterator(); iter.hasNext();) {
            PropertyValidationElementHandler handler = (PropertyValidationElementHandler) iter.next();
            if (handler.supports(element, clazz, descriptor)) {
                return handler;
            }
        }
        return null;
    }
View Full Code Here

            setExpressionParsers(handler);
            initLifecycle(handler);
        }

        for (Iterator iter = propertyHandlers.iterator(); iter.hasNext();) {
            PropertyValidationElementHandler handler = (PropertyValidationElementHandler) iter.next();
            setExpressionParsers(handler);
            initLifecycle(handler);
        }
    }
View Full Code Here

    /**
     * @see org.springmodules.validation.bean.conf.loader.xml.ValidationRuleElementHandlerRegistry#findPropertyHandler(org.w3c.dom.Element, Class, java.beans.PropertyDescriptor)
     */
    public PropertyValidationElementHandler findPropertyHandler(Element element, Class clazz, PropertyDescriptor descriptor) {
        for (Iterator iter = propertyHandlers.iterator(); iter.hasNext();) {
            PropertyValidationElementHandler handler = (PropertyValidationElementHandler)iter.next();
            if (handler.supports(element, clazz, descriptor)) {
                return handler;
            }
        }
        return null;
    }
View Full Code Here

            setExpressionParsers(handler);
            initLifecycle(handler);
        }

        for (Iterator iter = propertyHandlers.iterator(); iter.hasNext();) {
            PropertyValidationElementHandler handler = (PropertyValidationElementHandler)iter.next();
            setExpressionParsers(handler);
            initLifecycle(handler);
        }
    }
View Full Code Here

            Node node = nodes.item(i);
            if (node.getNodeType() != Node.ELEMENT_NODE) {
                continue;
            }
            Element ruleDefinition = (Element)node;
            PropertyValidationElementHandler handler = handlerRegistry.findPropertyHandler(ruleDefinition, clazz, propertyDescriptor);
            if (handler == null) {
                logger.error("Could not handle element '" + ruleDefinition.getTagName() +
                    "'. Please make sure the proper validation rule definition handler is registered");
                throw new ValidationConfigurationException("Could not handle element '" + ruleDefinition.getTagName() + "'");
            }
            handler.handle(ruleDefinition, propertyName, configuration);
        }
    }
View Full Code Here

    /**
     * @see org.springmodules.validation.bean.conf.loader.xml.ValidationRuleElementHandlerRegistry#findPropertyHandler(org.w3c.dom.Element, Class, java.beans.PropertyDescriptor)
     */
    public PropertyValidationElementHandler findPropertyHandler(Element element, Class clazz, PropertyDescriptor descriptor) {
        for (Iterator iter = propertyHandlers.iterator(); iter.hasNext();) {
            PropertyValidationElementHandler handler = (PropertyValidationElementHandler) iter.next();
            if (handler.supports(element, clazz, descriptor)) {
                return handler;
            }
        }
        return null;
    }
View Full Code Here

            setExpressionParsers(handler);
            initLifecycle(handler);
        }

        for (Iterator iter = propertyHandlers.iterator(); iter.hasNext();) {
            PropertyValidationElementHandler handler = (PropertyValidationElementHandler) iter.next();
            setExpressionParsers(handler);
            initLifecycle(handler);
        }
    }
View Full Code Here

            Node node = nodes.item(i);
            if (node.getNodeType() != Node.ELEMENT_NODE) {
                continue;
            }
            Element ruleDefinition = (Element) node;
            PropertyValidationElementHandler handler = handlerRegistry.findPropertyHandler(ruleDefinition, clazz, propertyDescriptor);
            if (handler == null) {
                logger.error("Could not handle element '" + ruleDefinition.getTagName() +
                    "'. Please make sure the proper validation rule definition handler is registered");
                throw new ValidationConfigurationException("Could not handle element '" + ruleDefinition.getTagName() + "'");
            }
            handler.handle(ruleDefinition, propertyName, configuration);
        }
    }
View Full Code Here

TOP

Related Classes of org.springmodules.validation.bean.conf.loader.xml.handler.PropertyValidationElementHandler

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.