Package org.springmodules.validation.util.xml

Examples of org.springmodules.validation.util.xml.SubElementsIterator


        Element functionsElement = DomUtils.getSingleSubElement(element, VALIDATION_BEANS_NAMESPACE, ANNOTATION_HANDLERS_ELEMENT);
        if (functionsElement == null) {
            return;
        }

        Iterator handlerElements = new SubElementsIterator(functionsElement, VALIDATION_BEANS_NAMESPACE, HANDLER_ELEMENT);
        List propertyHandlers = new ArrayList();
        List classHandlers = new ArrayList();
        while(handlerElements.hasNext()) {
            Element handlerElement = (Element)handlerElements.next();
            String className = handlerElement.getAttribute(AnnotationBasedValidatorBeanDefinitionParser.CLASS_ATTR);
            Object handler = loadAndInstantiate(className);
            if (PropertyValidationAnnotationHandler.class.isInstance(handler)) {
                propertyHandlers.add(handler);
            } else if (ClassValidationAnnotationHandler.class.isInstance(handler)) {
View Full Code Here


    //=============================================== Helper Methods ===================================================

    protected void parseResourcesElements(Element element, BeanDefinitionBuilder loaderBuilder) {
        List resources = new ArrayList();
        for (Iterator subElements = new SubElementsIterator(element); subElements.hasNext();) {
            Element subElement = (Element)subElements.next();
            if (subElement.getLocalName().equals(RESOURCE_ELEMENT)) {
                resources.add(createResource(subElement));
            }
            else if(subElement.getLocalName().equals(RESOURCE_DIR_ELEMENT)) {
                resources.addAll(createResources(subElement));
View Full Code Here

        Element functionsElement = DomUtils.getSingleSubElement(element, VALIDATION_BEANS_NAMESPACE, ELEMENT_HANDLERS_ELEMENT);
        if (functionsElement == null) {
            return;
        }

        Iterator handlerElements = new SubElementsIterator(functionsElement, VALIDATION_BEANS_NAMESPACE, HANDLER_ELEMENT);
        List propertyHandlers = new ArrayList();
        List classHandlers = new ArrayList();
        while(handlerElements.hasNext()) {
            Element handlerElement = (Element)handlerElements.next();
            String className = handlerElement.getAttribute(CLASS_ATTR);
            Object handler = loadAndInstantiate(className);
            if (PropertyValidationElementHandler.class.isInstance(handler)) {
                propertyHandlers.add(handler);
            } else if (ClassValidationElementHandler.class.isInstance(handler)) {
View Full Code Here

    //=============================================== Helper Methods ===================================================

    protected void parseResourcesElements(Element element, BeanDefinitionBuilder loaderBuilder) {
        List resources = new ArrayList();
        for (Iterator subElements = new SubElementsIterator(element); subElements.hasNext();) {
            Element subElement = (Element) subElements.next();
            if (subElement.getLocalName().equals(RESOURCE_ELEMENT)) {
                resources.add(createResource(subElement));
            } else if (subElement.getLocalName().equals(RESOURCE_DIR_ELEMENT)) {
                resources.addAll(createResources(subElement));
            }
View Full Code Here

        Element functionsElement = DomUtils.getSingleSubElement(element, VALIDATION_BEANS_NAMESPACE, ELEMENT_HANDLERS_ELEMENT);
        if (functionsElement == null) {
            return;
        }

        Iterator handlerElements = new SubElementsIterator(functionsElement, VALIDATION_BEANS_NAMESPACE, HANDLER_ELEMENT);
        List propertyHandlers = new ArrayList();
        List classHandlers = new ArrayList();
        while (handlerElements.hasNext()) {
            Element handlerElement = (Element) handlerElements.next();
            String className = handlerElement.getAttribute(CLASS_ATTR);
            Object handler = loadAndInstantiate(className);
            if (PropertyValidationElementHandler.class.isInstance(handler)) {
                propertyHandlers.add(handler);
            } else if (ClassValidationElementHandler.class.isInstance(handler)) {
View Full Code Here

        Element functionsElement = DomUtils.getSingleSubElement(element, VALIDATION_BEANS_NAMESPACE, ANNOTATION_HANDLERS_ELEMENT);
        if (functionsElement == null) {
            return;
        }

        Iterator handlerElements = new SubElementsIterator(functionsElement, VALIDATION_BEANS_NAMESPACE, HANDLER_ELEMENT);
        List propertyHandlers = new ArrayList();
        List classHandlers = new ArrayList();
        while (handlerElements.hasNext()) {
            Element handlerElement = (Element) handlerElements.next();
            String className = handlerElement.getAttribute(AnnotationBasedValidatorBeanDefinitionParser.CLASS_ATTR);
            Object handler = loadAndInstantiate(className);
            if (PropertyValidationAnnotationHandler.class.isInstance(handler)) {
                propertyHandlers.add(handler);
            } else if (ClassValidationAnnotationHandler.class.isInstance(handler)) {
View Full Code Here

    //=============================================== Helper Methods ===================================================

    protected void parseResourcesElements(Element element, BeanDefinitionBuilder loaderBuilder) {
        List resources = new ArrayList();
        for (Iterator subElements = new SubElementsIterator(element); subElements.hasNext();) {
            Element subElement = (Element) subElements.next();
            if (subElement.getLocalName().equals(RESOURCE_ELEMENT)) {
                resources.add(createResource(subElement));
            } else if (subElement.getLocalName().equals(RESOURCE_DIR_ELEMENT)) {
                resources.addAll(createResources(subElement));
            }
View Full Code Here

        Element functionsElement = DomUtils.getSingleSubElement(element, VALIDATION_BEANS_NAMESPACE, ELEMENT_HANDLERS_ELEMENT);
        if (functionsElement == null) {
            return;
        }

        Iterator handlerElements = new SubElementsIterator(functionsElement, VALIDATION_BEANS_NAMESPACE, HANDLER_ELEMENT);
        List propertyHandlers = new ArrayList();
        List classHandlers = new ArrayList();
        while (handlerElements.hasNext()) {
            Element handlerElement = (Element) handlerElements.next();
            String className = handlerElement.getAttribute(CLASS_ATTR);
            Object handler = loadAndInstantiate(className);
            if (PropertyValidationElementHandler.class.isInstance(handler)) {
                propertyHandlers.add(handler);
            } else if (ClassValidationElementHandler.class.isInstance(handler)) {
View Full Code Here

TOP

Related Classes of org.springmodules.validation.util.xml.SubElementsIterator

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.