org.mule.extras.spring.config
Class MuleBeanDefinitionReader

java.lang.Object
  extended by org.springframework.beans.factory.support.AbstractBeanDefinitionReader
      extended by org.springframework.beans.factory.xml.XmlBeanDefinitionReader
          extended by org.mule.extras.spring.config.MuleBeanDefinitionReader
All Implemented Interfaces:
org.springframework.beans.factory.support.BeanDefinitionReader

public class MuleBeanDefinitionReader
extends org.springframework.beans.factory.xml.XmlBeanDefinitionReader

MuleBeanDefinitionReader Is a custom Spring Bean reader that will apply a transformation to Mule Xml configuration files before loading bean definitions allowing Mule Xml config to be parsed as Spring configuration.


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
MuleBeanDefinitionReader(org.springframework.beans.factory.support.BeanDefinitionRegistry beanDefinitionRegistry, int configCount)
           
 
Method Summary
protected  EntityResolver createEntityResolver()
           
protected  EntityResolver createSpringEntityResolver()
          Creates an EntityResolver the same way Spring's XmlBeanDefinitionReader would create it.
static Transformer createTransformer(Source source)
           
protected  Source createXslSource()
           
protected  org.springframework.core.io.ClassPathResource getXslResource()
           
 boolean isFirstContext()
           
 int registerBeanDefinitions(Document document, org.springframework.core.io.Resource resource)
           
protected  Document transformDocument(Document document)
           
 
Methods inherited from class org.springframework.beans.factory.xml.XmlBeanDefinitionReader
createBeanDefinitionDocumentReader, createDefaultNamespaceHandlerResolver, createReaderContext, detectValidationMode, doLoadBeanDefinitions, getEntityResolver, 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, getRegistry, getResourceLoader, loadBeanDefinitions, 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

MuleBeanDefinitionReader

public MuleBeanDefinitionReader(org.springframework.beans.factory.support.BeanDefinitionRegistry beanDefinitionRegistry,
                                int configCount)
Method Detail

registerBeanDefinitions

public int registerBeanDefinitions(Document document,
                                   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

createTransformer

public static Transformer createTransformer(Source source)
                                     throws TransformerConfigurationException
Throws:
TransformerConfigurationException

transformDocument

protected Document transformDocument(Document document)
                              throws IOException,
                                     TransformerException
Throws:
IOException
TransformerException

createXslSource

protected Source createXslSource()
                          throws IOException
Throws:
IOException

getXslResource

protected org.springframework.core.io.ClassPathResource getXslResource()

createEntityResolver

protected EntityResolver createEntityResolver()

createSpringEntityResolver

protected EntityResolver createSpringEntityResolver()
Creates an EntityResolver the same way Spring's XmlBeanDefinitionReader would create it. It has to be created here because the EntityResolver created by XmlBeanDefinitionReader is not accessible from this class.

Returns:
See Also:
XmlBeanDefinitionReader.XmlBeanDefinitionReader(BeanDefinitionRegistry)

isFirstContext

public boolean isFirstContext()


Copyright © 2003-2008 MuleSource, Inc.. All Rights Reserved.