org.springframework.batch.core.jsr.configuration.support

## Class BatchPropertyContext

- java.lang.Object
- - org.springframework.batch.core.jsr.configuration.support.BatchPropertyContext

-     public class BatchPropertyContext
      extends java.lang.Object

  Context object to hold parsed JSR-352 batch properties, mapping properties to beans / "batch artifacts". Used internally when parsing property tags from a batch configuration file and to obtain corresponding values when injecting into batch artifacts.

  Since:
    3.0
  Author:
    Chris Schaefer, Michael Minella

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `BatchPropertyContext()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.util.Properties` | `getArtifactProperties(java.lang.String artifactName)` Obtains the batch `Properties` for the provided artifact name.
    `java.util.Properties` | `getJobProperties()` Obtains the Job level properties.
    `java.util.Properties` | `getStepArtifactProperties(java.lang.String stepName, java.lang.String artifactName)` Obtains the batch `Properties` for the provided Step and artifact name.
    `java.util.Properties` | `getStepProperties(java.lang.String stepName)` Obtains the Step level properties for the provided Step name.
    `void` | `setArtifactProperties(java.util.Map<java.lang.String,java.util.Properties> properties)` Adds non-step artifact properties to the context.
    `void` | `setJobProperties(java.util.Properties properties)` Adds Job level properties to the context.
    `void` | `setStepArtifactProperties(java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.util.Properties>> properties)` Adds Step artifact properties to the context.
    `void` | `setStepProperties(java.util.Map<java.lang.String,java.util.Properties> properties)` Adds Step level properties to the context.
    `void` | `setStepProperties(java.lang.String stepName, java.util.Properties properties)` Convenience method to set step level properties.

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

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

- - ### Constructor Detail

    - #### BatchPropertyContext

          public BatchPropertyContext()

  - ### Method Detail

    - #### getJobProperties

          public java.util.Properties getJobProperties()

      Obtains the Job level properties.

      Returns:
        the Job level properties

    - #### setJobProperties

          public void setJobProperties(java.util.Properties properties)

      Adds Job level properties to the context.

      Parameters:
        `properties` - the job `Properties` to add

    - #### getStepProperties

          public java.util.Properties getStepProperties(java.lang.String stepName)

      Obtains the Step level properties for the provided Step name.

      Parameters:
        `stepName` - the Step name to obtain properties for
      Returns:
        the `Properties` for the Step

    - #### setStepProperties

          public void setStepProperties(java.util.Map<java.lang.String,java.util.Properties> properties)

      Adds Step level properties to the context.

      Parameters:
        `properties` - the step `Properties` to add

    - #### setStepProperties

          public void setStepProperties(java.lang.String stepName,
                                        java.util.Properties properties)

      Convenience method to set step level properties. Simply wraps the provided parameters and delegates to `setStepProperties(java.util.Map)`.

      Parameters:
        `stepName` - the step name to set `Properties` for
        `properties` - the `Properties` to set

    - #### getArtifactProperties

          public java.util.Properties getArtifactProperties(java.lang.String artifactName)

      Obtains the batch `Properties` for the provided artifact name.

      Parameters:
        `artifactName` - the batch artifact to obtain properties for
      Returns:
        the `Properties` for the provided batch artifact

    - #### setArtifactProperties

          public void setArtifactProperties(java.util.Map<java.lang.String,java.util.Properties> properties)

      Adds non-step artifact properties to the context.

      Parameters:
        `properties` - the artifact `Properties` to add

    - #### getStepArtifactProperties

          public java.util.Properties getStepArtifactProperties(java.lang.String stepName,
                                                                java.lang.String artifactName)

      Obtains the batch `Properties` for the provided Step and artifact name.

      Parameters:
        `stepName` - the Step name the artifact is associated with
        `artifactName` - the artifact name to obtain `Properties` for
      Returns:
        the `Properties` for the provided Step artifact

    - #### setStepArtifactProperties

          public void setStepArtifactProperties(java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.util.Properties>> properties)

      Adds Step artifact properties to the context.

      Parameters:
        `properties` - the step artifact `Properties` to add