Package org.apache.cxf.bus.spring

# Class ControlledValidationXmlBeanDefinitionReader

java.lang.Object
org.springframework.beans.factory.support.AbstractBeanDefinitionReader
org.springframework.beans.factory.xml.XmlBeanDefinitionReader
org.apache.cxf.bus.spring.ControlledValidationXmlBeanDefinitionReader

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

public class ControlledValidationXmlBeanDefinitionReader extends org.springframework.beans.factory.xml.XmlBeanDefinitionReader
CXF reads a series of Spring XML files as part of initialization. The time it takes to parse them, especially if validating, builds up. The XML files shipped in a release in the JARs are valid and invariant. To speed things up, this class implements two levels of optimization. When a CXF distribution is fully-packaged, each of the Spring XML bus extension .xml files is accompanied by a FastInfoset '.fixml' file. These read much more rapidly. When one of those is present, this classs reads it instead of reading the XML text file. Absent a .fixml file, this class uses WoodStox instead of Xerces (or whatever the JDK is providing). The Woodstox optimization also applies to user cxf.xml or cxf-servlet.xml files if the user has disabled XML validation of Spring files with the org.apache.cxf.spring.validation.mode system property. Note that the fastInfoset optimization is only applied for the methods here that start from a Resource. If this is called with an InputSource, that optimization is not applied, since we can't reliably know the location of the XML.

- ## 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
  `ControlledValidationXmlBeanDefinitionReader(org.springframework.beans.factory.support.BeanDefinitionRegistry beanFactory)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `protected int`
  `doLoadBeanDefinitions(InputSource inputSource, org.springframework.core.io.Resource resource)`
  `int`
  `loadBeanDefinitions(org.springframework.core.io.support.EncodedResource encodedResource)`
  `void`
  `setValidationMode(int validationMode)`

  ### Methods inherited from class org.springframework.beans.factory.xml.XmlBeanDefinitionReader

  `createBeanDefinitionDocumentReader, createDefaultNamespaceHandlerResolver, createReaderContext, detectValidationMode, doLoadDocument, getEntityResolver, getNamespaceHandlerResolver, getValidationMode, getValidationModeForResource, isNamespaceAware, loadBeanDefinitions, loadBeanDefinitions, loadBeanDefinitions, registerBeanDefinitions, setDocumentLoader, setDocumentReaderClass, setEntityResolver, setErrorHandler, setEventListener, setNamespaceAware, setNamespaceHandlerResolver, setProblemReporter, setSourceExtractor, setValidating, 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 Details

  - ### ControlledValidationXmlBeanDefinitionReader

    public ControlledValidationXmlBeanDefinitionReader(org.springframework.beans.factory.support.BeanDefinitionRegistry beanFactory)
    Parameters:
      `beanFactory` -

- ## Method Details

  - ### doLoadBeanDefinitions

    protected int doLoadBeanDefinitions(InputSource inputSource, org.springframework.core.io.Resource resource)
    Overrides:
      `doLoadBeanDefinitions` in class `org.springframework.beans.factory.xml.XmlBeanDefinitionReader`

  - ### setValidationMode

    public void setValidationMode(int validationMode)
    Overrides:
      `setValidationMode` in class `org.springframework.beans.factory.xml.XmlBeanDefinitionReader`

  - ### loadBeanDefinitions

    public int loadBeanDefinitions(org.springframework.core.io.support.EncodedResource encodedResource)
    Overrides:
      `loadBeanDefinitions` in class `org.springframework.beans.factory.xml.XmlBeanDefinitionReader`