org.springframework.batch.core.jsr.configuration.xml

## Class JsrBeanDefinitionDocumentReader

- java.lang.Object
- - org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader
  - - org.springframework.batch.core.jsr.configuration.xml.JsrBeanDefinitionDocumentReader

- All Implemented Interfaces:
    org.springframework.beans.factory.xml.BeanDefinitionDocumentReader

      public class JsrBeanDefinitionDocumentReader
      extends org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader

  `DefaultBeanDefinitionDocumentReader` extension to hook into the pre processing of the provided XML document, ensuring any references to property operators such as jobParameters and jobProperties are resolved prior to loading the context. Since we know these initial values upfront, doing this transformation allows us to ensure values are retrieved in their resolved form prior to loading the context and property operators can be used on any element. This document reader will also look for references to artifacts by the same name and create new bean definitions to provide the ability to create new instances.

  Since:
    3.0
  Author:
    Chris Schaefer, Mahmoud Ben Hassine

- - ### Field Summary

    - ### Fields inherited from class org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader

      `ALIAS_ATTRIBUTE, ALIAS_ELEMENT, BEAN_ELEMENT, IMPORT_ELEMENT, logger, NAME_ATTRIBUTE, NESTED_BEANS_ELEMENT, PROFILE_ATTRIBUTE, RESOURCE_ATTRIBUTE`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `JsrBeanDefinitionDocumentReader()` Creates a new `JsrBeanDefinitionDocumentReader` instance.
    `JsrBeanDefinitionDocumentReader(org.springframework.beans.factory.support.BeanDefinitionRegistry beanDefinitionRegistry)` Create a new `JsrBeanDefinitionDocumentReader` instance with the provided `BeanDefinitionRegistry`.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected java.util.Properties` | `getJobParameters()`
    `protected java.util.Properties` | `getJobProperties()`
    `protected void` | `initProperties(org.w3c.dom.Element root)`
    `protected void` | `preProcessXml(org.w3c.dom.Element root)`

    - ### Methods inherited from class org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader

      `createDelegate, doRegisterBeanDefinitions, extractSource, getReaderContext, importBeanDefinitionResource, parseBeanDefinitions, postProcessXml, processAliasRegistration, processBeanDefinition, registerBeanDefinitions`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### JsrBeanDefinitionDocumentReader

          public JsrBeanDefinitionDocumentReader()

      Creates a new `JsrBeanDefinitionDocumentReader` instance.

    - #### JsrBeanDefinitionDocumentReader

          public JsrBeanDefinitionDocumentReader(org.springframework.beans.factory.support.BeanDefinitionRegistry beanDefinitionRegistry)

      Create a new `JsrBeanDefinitionDocumentReader` instance with the provided `BeanDefinitionRegistry`.

      Parameters:
        `beanDefinitionRegistry` - the `BeanDefinitionRegistry` to use

  - ### Method Detail

    - #### preProcessXml

          protected void preProcessXml(org.w3c.dom.Element root)

      Overrides:
        `preProcessXml` in class `org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader`

    - #### initProperties

          protected void initProperties(org.w3c.dom.Element root)

    - #### getJobParameters

          protected java.util.Properties getJobParameters()

    - #### getJobProperties

          protected java.util.Properties getJobProperties()