Class 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
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethodDescription
      java.util.PropertiesgetArtifactProperties​(java.lang.String artifactName)
      Obtains the batch Properties for the provided artifact name.
      java.util.PropertiesgetJobProperties()
      Obtains the Job level properties.
      java.util.PropertiesgetStepArtifactProperties​(java.lang.String stepName, java.lang.String artifactName)
      Obtains the batch Properties for the provided Step and artifact name.
      java.util.PropertiesgetStepProperties​(java.lang.String stepName)
      Obtains the Step level properties for the provided Step name.
      voidsetArtifactProperties​(java.util.Map<java.lang.String,​java.util.Properties> properties)
      Adds non-step artifact properties to the context.
      voidsetJobProperties​(java.util.Properties properties)
      Adds Job level properties to the context.
      voidsetStepArtifactProperties​(java.util.Map<java.lang.String,​java.util.Map<java.lang.String,​java.util.Properties>> properties)
      Adds Step artifact properties to the context.
      voidsetStepProperties​(java.lang.String stepName, java.util.Properties properties)
      Convenience method to set step level properties.
      voidsetStepProperties​(java.util.Map<java.lang.String,​java.util.Properties> properties)
      Adds Step level properties to the context.
      • 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