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 Description BatchPropertyContext()
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Properties
getArtifactProperties(java.lang.String artifactName)
Obtains the batchProperties
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 batchProperties
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.lang.String stepName, java.util.Properties properties)
Convenience method to set step level properties.void
setStepProperties(java.util.Map<java.lang.String,java.util.Properties> properties)
Adds Step level properties to the context.
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 jobProperties
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 stepProperties
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 setProperties
forproperties
- theProperties
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 artifactProperties
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 withartifactName
- the artifact name to obtainProperties
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 artifactProperties
to add