org.apache.xbean.spring.context.v2
Class XBeanXmlBeanDefinitionReader

java.lang.Object
  extended by org.springframework.beans.factory.support.AbstractBeanDefinitionReader
      extended by org.springframework.beans.factory.xml.XmlBeanDefinitionReader
          extended by org.apache.xbean.spring.context.v2.XBeanXmlBeanDefinitionReader
All Implemented Interfaces:
org.springframework.beans.factory.support.BeanDefinitionReader

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
XBeanXmlBeanDefinitionReader(SpringApplicationContext applicationContext, org.springframework.beans.factory.support.BeanDefinitionRegistry beanFactory, 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
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(Document doc, org.springframework.core.io.Resource resource)
          
 
Methods inherited from class org.springframework.beans.factory.xml.XmlBeanDefinitionReader
createBeanDefinitionDocumentReader, createReaderContext, detectValidationMode, doLoadBeanDefinitions, loadBeanDefinitions, loadBeanDefinitions, loadBeanDefinitions, loadBeanDefinitions, setDocumentLoader, setDocumentReaderClass, setEntityResolver, setErrorHandler, setEventListener, setNamespaceAware, setNamespaceHandlerResolver, setParserClass, setProblemReporter, setSourceExtractor, setValidating, setValidationMode, setValidationModeName
 
Methods inherited from class org.springframework.beans.factory.support.AbstractBeanDefinitionReader
getBeanClassLoader, getBeanFactory, getBeanNameGenerator, getResourceLoader, loadBeanDefinitions, loadBeanDefinitions, loadBeanDefinitions, setBeanClassLoader, setBeanNameGenerator, 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,
                                    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(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


Copyright © 2005-2009 The Apache Software Foundation. All Rights Reserved.