Class XBeanXmlBeanDefinitionReader

  • All Implemented Interfaces:
    org.springframework.beans.factory.support.BeanDefinitionReader, org.springframework.core.env.EnvironmentCapable

    public class XBeanXmlBeanDefinitionReader
    extends org.springframework.beans.factory.xml.XmlBeanDefinitionReader
    XBeanXmlBeanDefinitionReader extends XmlBeanDefinitionReader adds support for SpringXMLPreprocessors which can modify the DOM before it is passed to Spring for reading. This allows for extra information to be added into the Spring configuration file that is processed and removed before Spring sees the xml.
    Since:
    2.0
    Version:
    $Id$
    Author:
    Dain Sundstrom
    • Field Summary

      • Fields inherited from class org.springframework.beans.factory.xml.XmlBeanDefinitionReader

        VALIDATION_AUTO, VALIDATION_DTD, VALIDATION_NONE, VALIDATION_XSD
      • Fields inherited from class org.springframework.beans.factory.support.AbstractBeanDefinitionReader

        logger
    • Constructor Summary

      Constructors 
      Constructor Description
      XBeanXmlBeanDefinitionReader​(SpringApplicationContext applicationContext, org.springframework.beans.factory.support.BeanDefinitionRegistry beanFactory, java.util.List xmlPreprocessors)
      Creates a XBeanXmlBeanDefinitionReader for the specified applicationContext and beanFactory which will apply the xmlPreprocessors before passing the DOM to Spring for processing.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected org.springframework.beans.factory.xml.NamespaceHandlerResolver createDefaultNamespaceHandlerResolver()  
      org.springframework.context.ApplicationContext getApplicationContext()
      Gets the application context for which the bean definitons will be loaded.
      int registerBeanDefinitions​(org.w3c.dom.Document doc, org.springframework.core.io.Resource resource)
      • Methods inherited from class org.springframework.beans.factory.xml.XmlBeanDefinitionReader

        createBeanDefinitionDocumentReader, createReaderContext, detectValidationMode, doLoadBeanDefinitions, doLoadDocument, getEntityResolver, getNamespaceHandlerResolver, getValidationMode, getValidationModeForResource, isNamespaceAware, loadBeanDefinitions, loadBeanDefinitions, loadBeanDefinitions, loadBeanDefinitions, setDocumentLoader, setDocumentReaderClass, setEntityResolver, setErrorHandler, setEventListener, setNamespaceAware, setNamespaceHandlerResolver, setProblemReporter, setSourceExtractor, setValidating, setValidationMode, setValidationModeName
      • Methods inherited from class org.springframework.beans.factory.support.AbstractBeanDefinitionReader

        getBeanClassLoader, getBeanFactory, getBeanNameGenerator, getEnvironment, getRegistry, getResourceLoader, loadBeanDefinitions, loadBeanDefinitions, loadBeanDefinitions, loadBeanDefinitions, setBeanClassLoader, setBeanNameGenerator, setEnvironment, setResourceLoader
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • XBeanXmlBeanDefinitionReader

        public XBeanXmlBeanDefinitionReader​(SpringApplicationContext applicationContext,
                                            org.springframework.beans.factory.support.BeanDefinitionRegistry beanFactory,
                                            java.util.List xmlPreprocessors)
        Creates a XBeanXmlBeanDefinitionReader for the specified applicationContext and beanFactory which will apply the xmlPreprocessors before passing the DOM to Spring for processing.
        Parameters:
        applicationContext - the application context for which the bean definitons will be loaded
        beanFactory - the beanFactory that services will be loaded
        xmlPreprocessors - the preprocessors to apply the DOM before passing to Spring for processing
    • Method Detail

      • getApplicationContext

        public org.springframework.context.ApplicationContext getApplicationContext()
        Gets the application context for which the bean definitons will be loaded.
        Returns:
        the application context for which the bean definitons will be loaded
      • registerBeanDefinitions

        public int registerBeanDefinitions​(org.w3c.dom.Document doc,
                                           org.springframework.core.io.Resource resource)
                                    throws org.springframework.beans.BeansException
        Overrides:
        registerBeanDefinitions in class org.springframework.beans.factory.xml.XmlBeanDefinitionReader
        Throws:
        org.springframework.beans.BeansException
      • createDefaultNamespaceHandlerResolver

        protected org.springframework.beans.factory.xml.NamespaceHandlerResolver createDefaultNamespaceHandlerResolver()
        Overrides:
        createDefaultNamespaceHandlerResolver in class org.springframework.beans.factory.xml.XmlBeanDefinitionReader