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

  - ### Method Summary

    Methods
    Modifier and Type | Method and 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, getEntityResolver, 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 Detail

    - #### ControlledValidationXmlBeanDefinitionReader

          public ControlledValidationXmlBeanDefinitionReader(org.springframework.beans.factory.support.BeanDefinitionRegistry beanFactory)

      Parameters:
        `beanFactory` -

  - ### Method Detail

    - #### doLoadBeanDefinitions

          protected int doLoadBeanDefinitions(InputSource inputSource,
                                  org.springframework.core.io.Resource resource)
                                       throws org.springframework.beans.factory.BeanDefinitionStoreException

      Overrides:
        `doLoadBeanDefinitions` in class `org.springframework.beans.factory.xml.XmlBeanDefinitionReader`
      Throws:
        `org.springframework.beans.factory.BeanDefinitionStoreException`

    - #### 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)
                                  throws org.springframework.beans.factory.BeanDefinitionStoreException

      Overrides:
        `loadBeanDefinitions` in class `org.springframework.beans.factory.xml.XmlBeanDefinitionReader`
      Throws:
        `org.springframework.beans.factory.BeanDefinitionStoreException`

Apache CXF