diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/package.html b/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/package.html
deleted file mode 100644
index 9a914b226..000000000
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/package.html
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-Interfaces and generic implementations of configuration concerns.
-
-
-
diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/DuplicateJobConfigurationException.java b/spring-batch-core/src/main/java/org/springframework/batch/core/domain/DuplicateJobException.java
similarity index 72%
rename from spring-batch-core/src/main/java/org/springframework/batch/core/configuration/DuplicateJobConfigurationException.java
rename to spring-batch-core/src/main/java/org/springframework/batch/core/domain/DuplicateJobException.java
index f763afa2c..f02bd8ed8 100644
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/DuplicateJobConfigurationException.java
+++ b/spring-batch-core/src/main/java/org/springframework/batch/core/domain/DuplicateJobException.java
@@ -13,21 +13,21 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.springframework.batch.core.configuration;
+package org.springframework.batch.core.domain;
/**
* Checked exception that indicates a name clash when registering
- * {@link JobConfiguration} instances.
+ * {@link Job} instances.
*
* @author Dave Syer
*
*/
-public class DuplicateJobConfigurationException extends JobConfigurationException {
+public class DuplicateJobException extends JobException {
/**
* Create an exception with the given message.
*/
- public DuplicateJobConfigurationException(String msg) {
+ public DuplicateJobException(String msg) {
super(msg);
}
@@ -35,7 +35,7 @@ public class DuplicateJobConfigurationException extends JobConfigurationExceptio
* @param msg The message to send to caller
* @param e the cause of the exception
*/
- public DuplicateJobConfigurationException(String msg, Throwable e) {
+ public DuplicateJobException(String msg, Throwable e) {
super(msg, e);
}
diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/JobConfiguration.java b/spring-batch-core/src/main/java/org/springframework/batch/core/domain/Job.java
similarity index 70%
rename from spring-batch-core/src/main/java/org/springframework/batch/core/configuration/JobConfiguration.java
rename to spring-batch-core/src/main/java/org/springframework/batch/core/domain/Job.java
index a25c4168e..9ee347777 100644
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/JobConfiguration.java
+++ b/spring-batch-core/src/main/java/org/springframework/batch/core/domain/Job.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package org.springframework.batch.core.configuration;
+package org.springframework.batch.core.domain;
import java.util.ArrayList;
import java.util.List;
@@ -23,17 +23,17 @@ import org.springframework.beans.factory.BeanNameAware;
import org.springframework.util.ClassUtils;
/**
- * Batch domain object representing a job configuration. JobConfiguration is an
- * explicit abstraction representing the configuration of a job specified by a
- * developer. It should be noted that restart policy is applied to the job as a
- * whole and not to a step.
+ * Batch domain object representing a job. Job is an explicit abstraction
+ * representing the configuration of a job specified by a developer. It should
+ * be noted that restart policy is applied to the job as a whole and not to a
+ * step.
*
* @author Lucas Ward
* @author Dave Syer
*/
-public class JobConfiguration implements BeanNameAware {
+public class Job implements BeanNameAware {
- private List stepConfigurations = new ArrayList();
+ private List steps = new ArrayList();
private String name;
@@ -44,7 +44,7 @@ public class JobConfiguration implements BeanNameAware {
/**
* Default constructor.
*/
- public JobConfiguration() {
+ public Job() {
super();
}
@@ -54,7 +54,7 @@ public class JobConfiguration implements BeanNameAware {
*
* @param name
*/
- public JobConfiguration(String name) {
+ public Job(String name) {
super();
this.name = name;
}
@@ -69,7 +69,7 @@ public class JobConfiguration implements BeanNameAware {
* @see org.springframework.beans.factory.BeanNameAware#setBeanName(java.lang.String)
*/
public void setBeanName(String name) {
- if (this.name==null) {
+ if (this.name == null) {
this.name = name;
}
}
@@ -88,17 +88,17 @@ public class JobConfiguration implements BeanNameAware {
return name;
}
- public List getStepConfigurations() {
- return stepConfigurations;
+ public List getSteps() {
+ return steps;
}
- public void setSteps(List stepConfigurations) {
- this.stepConfigurations.clear();
- this.stepConfigurations.addAll(stepConfigurations);
+ public void setSteps(List steps) {
+ this.steps.clear();
+ this.steps.addAll(steps);
}
- public void addStep(StepConfiguration stepConfiguration) {
- this.stepConfigurations.add(stepConfiguration);
+ public void addStep(Step step) {
+ this.steps.add(step);
}
public int getStartLimit() {
@@ -116,8 +116,8 @@ public class JobConfiguration implements BeanNameAware {
public boolean isRestartable() {
return restartable;
}
-
+
public String toString() {
- return ClassUtils.getShortName(JobConfiguration.class) + ": [name="+name+"]";
+ return ClassUtils.getShortName(Job.class) + ": [name=" + name + "]";
}
}
diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/JobConfigurationException.java b/spring-batch-core/src/main/java/org/springframework/batch/core/domain/JobException.java
similarity index 72%
rename from spring-batch-core/src/main/java/org/springframework/batch/core/configuration/JobConfigurationException.java
rename to spring-batch-core/src/main/java/org/springframework/batch/core/domain/JobException.java
index b0413aed9..8aa31cf83 100644
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/JobConfigurationException.java
+++ b/spring-batch-core/src/main/java/org/springframework/batch/core/domain/JobException.java
@@ -13,21 +13,21 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.springframework.batch.core.configuration;
+package org.springframework.batch.core.domain;
/**
- * Base class for checked exceptions related to {@link JobConfiguration}
+ * Base class for checked exceptions related to {@link Job}
* creation, registration or use.
*
* @author Dave Syer
*
*/
-public class JobConfigurationException extends Exception {
+public class JobException extends Exception {
/**
* Create an exception with the given message.
*/
- public JobConfigurationException(String msg) {
+ public JobException(String msg) {
super(msg);
}
@@ -35,7 +35,7 @@ public class JobConfigurationException extends Exception {
* @param msg The message to send to caller
* @param e the cause of the exception
*/
- public JobConfigurationException(String msg, Throwable e) {
+ public JobException(String msg, Throwable e) {
super(msg, e);
}
diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/domain/JobInstance.java b/spring-batch-core/src/main/java/org/springframework/batch/core/domain/JobInstance.java
index a3dfadded..03baada78 100644
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/domain/JobInstance.java
+++ b/spring-batch-core/src/main/java/org/springframework/batch/core/domain/JobInstance.java
@@ -31,7 +31,7 @@ import java.util.List;
*/
public class JobInstance extends Entity {
- private List steps = new ArrayList();
+ private List stepInstances = new ArrayList();
private JobIdentifier identifier;
@@ -65,16 +65,16 @@ public class JobInstance extends Entity {
this.status = status;
}
- public List getSteps() {
- return steps;
+ public List getStepInstances() {
+ return stepInstances;
}
- public void setSteps(List steps) {
- this.steps = steps;
+ public void setStepInstances(List stepInstances) {
+ this.stepInstances = stepInstances;
}
- public void addStep(StepInstance step) {
- this.steps.add(step);
+ public void addStepInstance(StepInstance stepInstance) {
+ this.stepInstances.add(stepInstance);
}
public int getJobExecutionCount() {
diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/JobConfigurationLocator.java b/spring-batch-core/src/main/java/org/springframework/batch/core/domain/JobLocator.java
similarity index 62%
rename from spring-batch-core/src/main/java/org/springframework/batch/core/configuration/JobConfigurationLocator.java
rename to spring-batch-core/src/main/java/org/springframework/batch/core/domain/JobLocator.java
index 8ee6bb0b1..f0f8dde5a 100644
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/JobConfigurationLocator.java
+++ b/spring-batch-core/src/main/java/org/springframework/batch/core/domain/JobLocator.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.springframework.batch.core.configuration;
+package org.springframework.batch.core.domain;
/**
* A runtime service locator interface for retrieving job configurations by
@@ -22,17 +22,17 @@ package org.springframework.batch.core.configuration;
* @author Dave Syer
*
*/
-public interface JobConfigurationLocator {
+public interface JobLocator {
/**
- * Locates a {@link JobConfiguration} at runtime.
+ * Locates a {@link Job} at runtime.
*
- * @param name the name of the {@link JobConfiguration} which should be
+ * @param name the name of the {@link Job} which should be
* unique
- * @return a {@link JobConfiguration} identified by the given name
+ * @return a {@link Job} identified by the given name
*
- * @throws NoSuchJobConfigurationException if the required configuratio can
+ * @throws NoSuchJobException if the required configuratio can
* not be found.
*/
- JobConfiguration getJobConfiguration(String name) throws NoSuchJobConfigurationException;
+ Job getJob(String name) throws NoSuchJobException;
}
diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/JobConfigurationRegistry.java b/spring-batch-core/src/main/java/org/springframework/batch/core/domain/JobRegistry.java
similarity index 57%
rename from spring-batch-core/src/main/java/org/springframework/batch/core/configuration/JobConfigurationRegistry.java
rename to spring-batch-core/src/main/java/org/springframework/batch/core/domain/JobRegistry.java
index 67e009e11..b5b4f1f5f 100644
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/JobConfigurationRegistry.java
+++ b/spring-batch-core/src/main/java/org/springframework/batch/core/domain/JobRegistry.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.springframework.batch.core.configuration;
+package org.springframework.batch.core.domain;
/**
* A runtime service registry interface for registering job configurations by
@@ -22,23 +22,23 @@ package org.springframework.batch.core.configuration;
* @author Dave Syer
*
*/
-public interface JobConfigurationRegistry extends JobConfigurationLocator {
+public interface JobRegistry extends JobLocator {
/**
- * Registers a {@link JobConfiguration} at runtime.
+ * Registers a {@link Job} at runtime.
*
- * @param jobConfiguration the {@link JobConfiguration} to be registered
+ * @param jobConfiguration the {@link Job} to be registered
*
- * @throws DuplicateJobConfigurationException if a configuration with the
+ * @throws DuplicateJobException if a configuration with the
* same name has already been registered.
*/
- void register(JobConfiguration jobConfiguration) throws DuplicateJobConfigurationException;
+ void register(Job jobConfiguration) throws DuplicateJobException;
/**
- * Unregisters a previously registered {@link JobConfiguration}. If it was
+ * Unregisters a previously registered {@link Job}. If it was
* not previously registered there is no error.
*
- * @param jobConfiguration the {@link JobConfiguration} to unregister.
+ * @param jobConfiguration the {@link Job} to unregister.
*/
- void unregister(JobConfiguration jobConfiguration);
+ void unregister(Job jobConfiguration);
}
diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/ListableJobConfigurationRegistry.java b/spring-batch-core/src/main/java/org/springframework/batch/core/domain/ListableJobRegistry.java
similarity index 74%
rename from spring-batch-core/src/main/java/org/springframework/batch/core/configuration/ListableJobConfigurationRegistry.java
rename to spring-batch-core/src/main/java/org/springframework/batch/core/domain/ListableJobRegistry.java
index 73ec2df56..19ae5a8c2 100644
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/ListableJobConfigurationRegistry.java
+++ b/spring-batch-core/src/main/java/org/springframework/batch/core/domain/ListableJobRegistry.java
@@ -13,23 +13,23 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.springframework.batch.core.configuration;
+package org.springframework.batch.core.domain;
import java.util.Collection;
/**
- * A listable extension of {@link JobConfigurationRegistry}.
+ * A listable extension of {@link JobRegistry}.
*
* @author Dave Syer
*
*/
-public interface ListableJobConfigurationRegistry extends JobConfigurationRegistry {
+public interface ListableJobRegistry extends JobRegistry {
/**
* Provides the currently registered configurations. The return value is
* unmodifiable and disconnected from the underlying registry storage.
*
- * @return a collection of {@link JobConfiguration} instances. Empty if none
+ * @return a collection of {@link Job} instances. Empty if none
* are registered.
*/
Collection getJobConfigurations();
diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/NoSuchJobConfigurationException.java b/spring-batch-core/src/main/java/org/springframework/batch/core/domain/NoSuchJobException.java
similarity index 69%
rename from spring-batch-core/src/main/java/org/springframework/batch/core/configuration/NoSuchJobConfigurationException.java
rename to spring-batch-core/src/main/java/org/springframework/batch/core/domain/NoSuchJobException.java
index a58401d23..eb267ba6e 100644
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/NoSuchJobConfigurationException.java
+++ b/spring-batch-core/src/main/java/org/springframework/batch/core/domain/NoSuchJobException.java
@@ -13,22 +13,22 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.springframework.batch.core.configuration;
+package org.springframework.batch.core.domain;
/**
- * Checked exception to indicate that a required {@link JobConfiguration} is not
+ * Checked exception to indicate that a required {@link Job} is not
* available.
*
* @author Dave Syer
*
*/
-public class NoSuchJobConfigurationException extends JobConfigurationException {
+public class NoSuchJobException extends JobException {
/**
* Create an exception with the given message.
*/
- public NoSuchJobConfigurationException(String msg) {
+ public NoSuchJobException(String msg) {
super(msg);
}
@@ -36,7 +36,7 @@ public class NoSuchJobConfigurationException extends JobConfigurationException {
* @param msg The message to send to caller
* @param e the cause of the exception
*/
- public NoSuchJobConfigurationException(String msg, Throwable e) {
+ public NoSuchJobException(String msg, Throwable e) {
super(msg, e);
}
}
diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/StepConfiguration.java b/spring-batch-core/src/main/java/org/springframework/batch/core/domain/Step.java
similarity index 87%
rename from spring-batch-core/src/main/java/org/springframework/batch/core/configuration/StepConfiguration.java
rename to spring-batch-core/src/main/java/org/springframework/batch/core/domain/Step.java
index d4035205a..e26e79608 100644
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/StepConfiguration.java
+++ b/spring-batch-core/src/main/java/org/springframework/batch/core/domain/Step.java
@@ -13,13 +13,13 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.springframework.batch.core.configuration;
+package org.springframework.batch.core.domain;
import org.springframework.batch.core.tasklet.Tasklet;
/**
* Batch domain interface representing the configuration of a step. As with the
- * (@link JobConfiguration), step configuration is meant to explicitly represent
+ * (@link Job), step configuration is meant to explicitly represent
* a the configuration of a step by a developer. This allows for the separation
* of what a developer configures from the myriad of concerns required for
* executing a job.
@@ -27,7 +27,7 @@ import org.springframework.batch.core.tasklet.Tasklet;
* @author Dave Syer
*
*/
-public interface StepConfiguration {
+public interface Step {
/**
* @return the name of this step configuration.
diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/StepConfigurationSupport.java b/spring-batch-core/src/main/java/org/springframework/batch/core/domain/StepSupport.java
similarity index 88%
rename from spring-batch-core/src/main/java/org/springframework/batch/core/configuration/StepConfigurationSupport.java
rename to spring-batch-core/src/main/java/org/springframework/batch/core/domain/StepSupport.java
index 089d1c2b6..31237181d 100644
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/StepConfigurationSupport.java
+++ b/spring-batch-core/src/main/java/org/springframework/batch/core/domain/StepSupport.java
@@ -13,19 +13,19 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.springframework.batch.core.configuration;
+package org.springframework.batch.core.domain;
import org.springframework.batch.core.tasklet.Tasklet;
import org.springframework.beans.factory.BeanNameAware;
/**
* Basic no-op support implementation for use as base class for
- * {@link StepConfiguration}.
+ * {@link Step}.
*
* @author Dave Syer
*
*/
-public class StepConfigurationSupport implements StepConfiguration,
+public class StepSupport implements Step,
BeanNameAware {
private String name;
@@ -35,16 +35,16 @@ public class StepConfigurationSupport implements StepConfiguration,
private boolean saveRestartData = false;
/**
- * Default constructor for {@link StepConfigurationSupport}.
+ * Default constructor for {@link StepSupport}.
*/
- public StepConfigurationSupport() {
+ public StepSupport() {
super();
}
/**
* @param string
*/
- public StepConfigurationSupport(String string) {
+ public StepSupport(String string) {
super();
this.name = string;
}
diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/executor/JobExecutor.java b/spring-batch-core/src/main/java/org/springframework/batch/core/executor/JobExecutor.java
index b2e8a81c1..a2d693262 100644
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/executor/JobExecutor.java
+++ b/spring-batch-core/src/main/java/org/springframework/batch/core/executor/JobExecutor.java
@@ -16,21 +16,21 @@
package org.springframework.batch.core.executor;
-import org.springframework.batch.core.configuration.JobConfiguration;
+import org.springframework.batch.core.domain.Job;
import org.springframework.batch.core.domain.JobExecution;
import org.springframework.batch.io.exception.BatchCriticalException;
import org.springframework.batch.repeat.ExitStatus;
/**
- * Interface for running a job from its configuration.
+ * Interface for running a job.
*
* @author Lucas Ward
* @author Dave Syer
- * @see JobConfiguration
+ * @see Job
* @see JobExecution
*/
public interface JobExecutor {
- public ExitStatus run(JobConfiguration configuration, JobExecution execution) throws BatchCriticalException;
+ public ExitStatus run(Job job, JobExecution execution) throws BatchCriticalException;
}
diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/executor/StepExecutor.java b/spring-batch-core/src/main/java/org/springframework/batch/core/executor/StepExecutor.java
index deaa993e0..a675c3ed4 100644
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/executor/StepExecutor.java
+++ b/spring-batch-core/src/main/java/org/springframework/batch/core/executor/StepExecutor.java
@@ -16,7 +16,7 @@
package org.springframework.batch.core.executor;
-import org.springframework.batch.core.configuration.StepConfiguration;
+import org.springframework.batch.core.domain.Step;
import org.springframework.batch.core.domain.StepExecution;
import org.springframework.batch.io.exception.BatchCriticalException;
import org.springframework.batch.repeat.ExitStatus;
@@ -25,7 +25,7 @@ import org.springframework.batch.repeat.ExitStatus;
* Interface for processing a step. Implementations are free to process the step
* and return when finished, or to schedule the step for processing
* concurrently, or in the future. The status of the execution should be
- * trackable with the step execution. The configuration should be treated as
+ * trackable with the step execution. The step should be treated as
* immutable.
*
* Because step execution parameters and policies can vary from step to step, a
@@ -39,13 +39,13 @@ import org.springframework.batch.repeat.ExitStatus;
public interface StepExecutor {
/**
- * Process the step according to the given configuration. Implementations
+ * Process the step according to the given step. Implementations
* can be expected to modify their state when this method is called, to take
- * account of any policy information in the configuration. Thus it is not
+ * account of any policy information in the step. Thus it is not
* safe to re-use an instance of {@link StepExecutor} to process multiple
* concurrent executions.
*
- * @param configuration
+ * @param step
* the configuration to use when running the step. Contains a
* recipe for the business logic of an individual processing
* operation. Also used to determine policies for commit
@@ -59,7 +59,7 @@ public interface StepExecutor {
* if there is a problem that needs to be signalled to the
* caller
*/
- ExitStatus process(StepConfiguration configuration,
+ ExitStatus process(Step step,
StepExecution stepExecution) throws StepInterruptedException,
BatchCriticalException;
@@ -69,5 +69,5 @@ public interface StepExecutor {
*
* @param configuration
*/
- void applyConfiguration(StepConfiguration configuration);
+ void applyConfiguration(Step configuration);
}
diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/executor/StepExecutorFactory.java b/spring-batch-core/src/main/java/org/springframework/batch/core/executor/StepExecutorFactory.java
index ff9365191..03d93f0b2 100644
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/executor/StepExecutorFactory.java
+++ b/spring-batch-core/src/main/java/org/springframework/batch/core/executor/StepExecutorFactory.java
@@ -15,14 +15,14 @@
*/
package org.springframework.batch.core.executor;
-import org.springframework.batch.core.configuration.StepConfiguration;
+import org.springframework.batch.core.domain.Step;
/**
* Factory interface for creating or locating {@link StepExecutor} instances.
* Because step execution parameters and policies can vary from step to step, a
* {@link StepExecutor} should be created by the caller using a
* {@link StepExecutorFactory}. The factory is responsible for ensuring that
- * the returned instance is appropriate for the configuration supplied. If the
+ * the returned instance is appropriate for the step supplied. If the
* {@link StepExecutor} instance is stateful (which is normal) the factory
* should return a different instance for each call.
*
@@ -32,13 +32,13 @@ import org.springframework.batch.core.configuration.StepConfiguration;
public interface StepExecutorFactory {
/**
- * Use the configuration given to create or locate a suitable
+ * Use the step given to create or locate a suitable
* {@link StepExecutor}.
*
- * @param configuration a {@link StepConfiguration} instance.
+ * @param step a {@link Step} instance.
* @return a {@link StepExecutor} that can be used to execute a step with
- * the given configuration
+ * the given step
*/
- StepExecutor getExecutor(StepConfiguration configuration);
+ StepExecutor getExecutor(Step step);
}
diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/repository/JobRepository.java b/spring-batch-core/src/main/java/org/springframework/batch/core/repository/JobRepository.java
index b4e473161..e4018d82a 100644
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/repository/JobRepository.java
+++ b/spring-batch-core/src/main/java/org/springframework/batch/core/repository/JobRepository.java
@@ -16,7 +16,7 @@
package org.springframework.batch.core.repository;
-import org.springframework.batch.core.configuration.JobConfiguration;
+import org.springframework.batch.core.domain.Job;
import org.springframework.batch.core.domain.JobExecution;
import org.springframework.batch.core.domain.JobIdentifier;
import org.springframework.batch.core.domain.JobInstance;
@@ -65,7 +65,7 @@ public interface JobRepository {
* job instance that would otherwise be returned
*
*/
- public JobExecution findOrCreateJob(JobConfiguration jobConfiguration,
+ public JobExecution findOrCreateJob(Job job,
JobIdentifier jobIdentifier)
throws JobExecutionAlreadyRunningException;
@@ -78,7 +78,7 @@ public interface JobRepository {
* @param job
* @see JobInstance
*/
- public void update(JobInstance job);
+ public void update(JobInstance jobInstance);
/**
* Save or Update a {@link JobExecution}. If no ID is found a new instance
@@ -104,7 +104,7 @@ public interface JobRepository {
* @param step
* @see StepInstance
*/
- public void update(StepInstance step);
+ public void update(StepInstance stepInstance);
/**
* Save or Update a StepExecution. If no ID is found a new instance will be
diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/runtime/JobIdentifierFactory.java b/spring-batch-core/src/main/java/org/springframework/batch/core/runtime/JobIdentifierFactory.java
index 10649d100..c2ffdaf54 100644
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/runtime/JobIdentifierFactory.java
+++ b/spring-batch-core/src/main/java/org/springframework/batch/core/runtime/JobIdentifierFactory.java
@@ -19,7 +19,7 @@ package org.springframework.batch.core.runtime;
import org.springframework.batch.core.domain.JobIdentifier;
/**
- * A factory for {@link JobIdentifier} instances. A job configuration can be
+ * A factory for {@link JobIdentifier} instances. A job can be
* executed with many possible runtime parameters, which identify the instance
* of the job. This factory allows job identifiers to be created with different
* properties according to the {@link JobIdentifier} strategy required. For
@@ -37,7 +37,7 @@ public interface JobIdentifierFactory {
* Get a new {@link JobIdentifier} instance.
*
* @param name
- * the name of the job configuration.
+ * the name of the job.
* @return a {@link JobIdentifier} with the same name.
*/
public JobIdentifier getJobIdentifier(String name);
diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/tasklet/Tasklet.java b/spring-batch-core/src/main/java/org/springframework/batch/core/tasklet/Tasklet.java
index 835a40d3b..dff120d71 100644
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/tasklet/Tasklet.java
+++ b/spring-batch-core/src/main/java/org/springframework/batch/core/tasklet/Tasklet.java
@@ -16,7 +16,7 @@
package org.springframework.batch.core.tasklet;
-import org.springframework.batch.core.configuration.StepConfiguration;
+import org.springframework.batch.core.domain.Step;
import org.springframework.batch.repeat.ExitStatus;
/**
@@ -32,7 +32,7 @@ import org.springframework.batch.repeat.ExitStatus;
* of this interface useful for differentiating different batch job types, or
* for creating more flexibility within their batch jobs.
*
- * @see StepConfiguration
+ * @see Step
* @author Lucas Ward
* @author Dave Syer
*
diff --git a/spring-batch-core/src/test/java/org/springframework/batch/core/configuration/JobConfigurationExceptionTests.java b/spring-batch-core/src/test/java/org/springframework/batch/core/configuration/DuplicateJobExceptionTests.java
similarity index 80%
rename from spring-batch-core/src/test/java/org/springframework/batch/core/configuration/JobConfigurationExceptionTests.java
rename to spring-batch-core/src/test/java/org/springframework/batch/core/configuration/DuplicateJobExceptionTests.java
index 0d238482b..8e111833a 100644
--- a/spring-batch-core/src/test/java/org/springframework/batch/core/configuration/JobConfigurationExceptionTests.java
+++ b/spring-batch-core/src/test/java/org/springframework/batch/core/configuration/DuplicateJobExceptionTests.java
@@ -16,20 +16,20 @@
package org.springframework.batch.core.configuration;
import org.springframework.batch.core.AbstractExceptionTests;
-import org.springframework.batch.core.configuration.JobConfigurationException;
+import org.springframework.batch.core.domain.DuplicateJobException;
/**
* @author Dave Syer
*
*/
-public class JobConfigurationExceptionTests extends AbstractExceptionTests {
+public class DuplicateJobExceptionTests extends AbstractExceptionTests {
/*
* (non-Javadoc)
* @see org.springframework.batch.io.exception.AbstractExceptionTests#getException(java.lang.String)
*/
public Exception getException(String msg) throws Exception {
- return new JobConfigurationException(msg);
+ return new DuplicateJobException(msg);
}
/*
@@ -38,7 +38,7 @@ public class JobConfigurationExceptionTests extends AbstractExceptionTests {
* java.lang.Throwable)
*/
public Exception getException(String msg, Throwable t) throws Exception {
- return new JobConfigurationException(msg, t);
+ return new DuplicateJobException(msg, t);
}
}
diff --git a/spring-batch-core/src/test/java/org/springframework/batch/core/configuration/NoSuchJobConfigurationExceptionTests.java b/spring-batch-core/src/test/java/org/springframework/batch/core/configuration/JobExceptionTests.java
similarity index 79%
rename from spring-batch-core/src/test/java/org/springframework/batch/core/configuration/NoSuchJobConfigurationExceptionTests.java
rename to spring-batch-core/src/test/java/org/springframework/batch/core/configuration/JobExceptionTests.java
index 81a8948de..4631c6f2a 100644
--- a/spring-batch-core/src/test/java/org/springframework/batch/core/configuration/NoSuchJobConfigurationExceptionTests.java
+++ b/spring-batch-core/src/test/java/org/springframework/batch/core/configuration/JobExceptionTests.java
@@ -16,20 +16,20 @@
package org.springframework.batch.core.configuration;
import org.springframework.batch.core.AbstractExceptionTests;
-import org.springframework.batch.core.configuration.NoSuchJobConfigurationException;
+import org.springframework.batch.core.domain.JobException;
/**
* @author Dave Syer
*
*/
-public class NoSuchJobConfigurationExceptionTests extends AbstractExceptionTests {
+public class JobExceptionTests extends AbstractExceptionTests {
/*
* (non-Javadoc)
* @see org.springframework.batch.io.exception.AbstractExceptionTests#getException(java.lang.String)
*/
public Exception getException(String msg) throws Exception {
- return new NoSuchJobConfigurationException(msg);
+ return new JobException(msg);
}
/*
@@ -38,7 +38,7 @@ public class NoSuchJobConfigurationExceptionTests extends AbstractExceptionTests
* java.lang.Throwable)
*/
public Exception getException(String msg, Throwable t) throws Exception {
- return new NoSuchJobConfigurationException(msg, t);
+ return new JobException(msg, t);
}
}
diff --git a/spring-batch-core/src/test/java/org/springframework/batch/core/configuration/JobConfigurationTests.java b/spring-batch-core/src/test/java/org/springframework/batch/core/configuration/JobTests.java
similarity index 57%
rename from spring-batch-core/src/test/java/org/springframework/batch/core/configuration/JobConfigurationTests.java
rename to spring-batch-core/src/test/java/org/springframework/batch/core/configuration/JobTests.java
index 778b62cf0..51ccfe9ae 100644
--- a/spring-batch-core/src/test/java/org/springframework/batch/core/configuration/JobConfigurationTests.java
+++ b/spring-batch-core/src/test/java/org/springframework/batch/core/configuration/JobTests.java
@@ -17,28 +17,31 @@ package org.springframework.batch.core.configuration;
import java.util.Collections;
+import org.springframework.batch.core.domain.Job;
+import org.springframework.batch.core.domain.StepSupport;
+
import junit.framework.TestCase;
/**
* @author Dave Syer
*
*/
-public class JobConfigurationTests extends TestCase {
+public class JobTests extends TestCase {
- JobConfiguration configuration = new JobConfiguration("job");
+ Job configuration = new Job("job");
/**
* Test method for
- * {@link org.springframework.batch.core.configuration.JobConfiguration#JobConfiguration()}.
+ * {@link org.springframework.batch.core.domain.Job#JobConfiguration()}.
*/
public void testJobConfiguration() {
- configuration = new JobConfiguration();
+ configuration = new Job();
assertNull(configuration.getName());
}
/**
* Test method for
- * {@link org.springframework.batch.core.configuration.JobConfiguration#setBeanName(java.lang.String)}.
+ * {@link org.springframework.batch.core.domain.Job#setBeanName(java.lang.String)}.
*/
public void testSetBeanName() {
configuration.setBeanName("foo");
@@ -47,10 +50,10 @@ public class JobConfigurationTests extends TestCase {
/**
* Test method for
- * {@link org.springframework.batch.core.configuration.JobConfiguration#setBeanName(java.lang.String)}.
+ * {@link org.springframework.batch.core.domain.Job#setBeanName(java.lang.String)}.
*/
public void testSetBeanNameWithNullName() {
- configuration = new JobConfiguration(null);
+ configuration = new Job(null);
assertEquals(null, configuration.getName());
configuration.setBeanName("foo");
assertEquals("foo", configuration.getName());
@@ -58,25 +61,25 @@ public class JobConfigurationTests extends TestCase {
/**
* Test method for
- * {@link org.springframework.batch.core.configuration.JobConfiguration#setSteps(java.util.List)}.
+ * {@link org.springframework.batch.core.domain.Job#setSteps(java.util.List)}.
*/
public void testSetSteps() {
- configuration.setSteps(Collections.singletonList(new StepConfigurationSupport("step")));
- assertEquals(1, configuration.getStepConfigurations().size());
+ configuration.setSteps(Collections.singletonList(new StepSupport("step")));
+ assertEquals(1, configuration.getSteps().size());
}
/**
* Test method for
- * {@link org.springframework.batch.core.configuration.JobConfiguration#addStep(org.springframework.batch.core.configuration.StepConfiguration)}.
+ * {@link org.springframework.batch.core.domain.Job#addStepInstance(org.springframework.batch.core.configuration.StepConfiguration)}.
*/
public void testAddStep() {
- configuration.addStep(new StepConfigurationSupport("step"));
- assertEquals(1, configuration.getStepConfigurations().size());
+ configuration.addStep(new StepSupport("step"));
+ assertEquals(1, configuration.getSteps().size());
}
/**
* Test method for
- * {@link org.springframework.batch.core.configuration.JobConfiguration#setStartLimit(int)}.
+ * {@link org.springframework.batch.core.domain.Job#setStartLimit(int)}.
*/
public void testSetStartLimit() {
assertEquals(Integer.MAX_VALUE, configuration.getStartLimit());
@@ -86,7 +89,7 @@ public class JobConfigurationTests extends TestCase {
/**
* Test method for
- * {@link org.springframework.batch.core.configuration.JobConfiguration#setRestartable(boolean)}.
+ * {@link org.springframework.batch.core.domain.Job#setRestartable(boolean)}.
*/
public void testSetRestartable() {
assertFalse(configuration.isRestartable());
diff --git a/spring-batch-core/src/test/java/org/springframework/batch/core/configuration/DuplicateJobConfigurationExceptionTests.java b/spring-batch-core/src/test/java/org/springframework/batch/core/configuration/NoSuchJobExceptionTests.java
similarity index 78%
rename from spring-batch-core/src/test/java/org/springframework/batch/core/configuration/DuplicateJobConfigurationExceptionTests.java
rename to spring-batch-core/src/test/java/org/springframework/batch/core/configuration/NoSuchJobExceptionTests.java
index d3dfeef11..aa6dcf4c0 100644
--- a/spring-batch-core/src/test/java/org/springframework/batch/core/configuration/DuplicateJobConfigurationExceptionTests.java
+++ b/spring-batch-core/src/test/java/org/springframework/batch/core/configuration/NoSuchJobExceptionTests.java
@@ -16,20 +16,20 @@
package org.springframework.batch.core.configuration;
import org.springframework.batch.core.AbstractExceptionTests;
-import org.springframework.batch.core.configuration.DuplicateJobConfigurationException;
+import org.springframework.batch.core.domain.NoSuchJobException;
/**
* @author Dave Syer
*
*/
-public class DuplicateJobConfigurationExceptionTests extends AbstractExceptionTests {
+public class NoSuchJobExceptionTests extends AbstractExceptionTests {
/*
* (non-Javadoc)
* @see org.springframework.batch.io.exception.AbstractExceptionTests#getException(java.lang.String)
*/
public Exception getException(String msg) throws Exception {
- return new DuplicateJobConfigurationException(msg);
+ return new NoSuchJobException(msg);
}
/*
@@ -38,7 +38,7 @@ public class DuplicateJobConfigurationExceptionTests extends AbstractExceptionTe
* java.lang.Throwable)
*/
public Exception getException(String msg, Throwable t) throws Exception {
- return new DuplicateJobConfigurationException(msg, t);
+ return new NoSuchJobException(msg, t);
}
}
diff --git a/spring-batch-core/src/test/java/org/springframework/batch/core/configuration/SpringBeanJobConfigurationTests.java b/spring-batch-core/src/test/java/org/springframework/batch/core/configuration/SpringBeanJobTests.java
similarity index 88%
rename from spring-batch-core/src/test/java/org/springframework/batch/core/configuration/SpringBeanJobConfigurationTests.java
rename to spring-batch-core/src/test/java/org/springframework/batch/core/configuration/SpringBeanJobTests.java
index 689e9a088..77c35ff50 100644
--- a/spring-batch-core/src/test/java/org/springframework/batch/core/configuration/SpringBeanJobConfigurationTests.java
+++ b/spring-batch-core/src/test/java/org/springframework/batch/core/configuration/SpringBeanJobTests.java
@@ -18,17 +18,18 @@ package org.springframework.batch.core.configuration;
import junit.framework.TestCase;
+import org.springframework.batch.core.domain.Job;
import org.springframework.beans.factory.config.ConstructorArgumentValues;
import org.springframework.beans.factory.support.ChildBeanDefinition;
import org.springframework.beans.factory.support.RootBeanDefinition;
import org.springframework.context.support.GenericApplicationContext;
import org.springframework.context.support.StaticApplicationContext;
-public class SpringBeanJobConfigurationTests extends TestCase {
+public class SpringBeanJobTests extends TestCase {
public void testBeanName() throws Exception {
StaticApplicationContext context = new StaticApplicationContext();
- JobConfiguration configuration = new JobConfiguration();
+ Job configuration = new Job();
context.getAutowireCapableBeanFactory().initializeBean(configuration,
"bean");
assertNotNull(configuration.getName());
@@ -43,8 +44,8 @@ public class SpringBeanJobConfigurationTests extends TestCase {
ConstructorArgumentValues args = new ConstructorArgumentValues();
args.addGenericArgumentValue("foo");
context.registerBeanDefinition("bean", new RootBeanDefinition(
- JobConfiguration.class, args, null));
- JobConfiguration configuration = (JobConfiguration) context
+ Job.class, args, null));
+ Job configuration = (Job) context
.getBean("bean");
assertNotNull(configuration.getName());
assertEquals("foo", configuration.getName());
@@ -57,9 +58,9 @@ public class SpringBeanJobConfigurationTests extends TestCase {
ConstructorArgumentValues args = new ConstructorArgumentValues();
args.addGenericArgumentValue("bar");
context.registerBeanDefinition("parent", new RootBeanDefinition(
- JobConfiguration.class, args, null));
+ Job.class, args, null));
context.registerBeanDefinition("bean", new ChildBeanDefinition("parent"));
- JobConfiguration configuration = (JobConfiguration) context
+ Job configuration = (Job) context
.getBean("bean");
assertNotNull(configuration.getName());
assertEquals("bar", configuration.getName());
diff --git a/spring-batch-core/src/test/java/org/springframework/batch/core/configuration/StepConfigurationSupportTests.java b/spring-batch-core/src/test/java/org/springframework/batch/core/configuration/StepSupportTests.java
similarity index 67%
rename from spring-batch-core/src/test/java/org/springframework/batch/core/configuration/StepConfigurationSupportTests.java
rename to spring-batch-core/src/test/java/org/springframework/batch/core/configuration/StepSupportTests.java
index 1df36a26a..b4cf1c847 100644
--- a/spring-batch-core/src/test/java/org/springframework/batch/core/configuration/StepConfigurationSupportTests.java
+++ b/spring-batch-core/src/test/java/org/springframework/batch/core/configuration/StepSupportTests.java
@@ -17,6 +17,7 @@ package org.springframework.batch.core.configuration;
import junit.framework.TestCase;
+import org.springframework.batch.core.domain.StepSupport;
import org.springframework.batch.core.tasklet.Tasklet;
import org.springframework.batch.repeat.ExitStatus;
@@ -24,27 +25,27 @@ import org.springframework.batch.repeat.ExitStatus;
* @author Dave Syer
*
*/
-public class StepConfigurationSupportTests extends TestCase {
+public class StepSupportTests extends TestCase {
- private StepConfigurationSupport configuration = new StepConfigurationSupport("step");
+ private StepSupport configuration = new StepSupport("step");
/**
- * Test method for {@link org.springframework.batch.core.configuration.StepConfigurationSupport#StepConfigurationSupport()}.
+ * Test method for {@link org.springframework.batch.core.domain.StepSupport#StepConfigurationSupport()}.
*/
public void testStepConfigurationSupport() {
- configuration = new StepConfigurationSupport();
+ configuration = new StepSupport();
assertNull(configuration.getName());
}
/**
- * Test method for {@link org.springframework.batch.core.configuration.StepConfigurationSupport#getName()}.
+ * Test method for {@link org.springframework.batch.core.domain.StepSupport#getName()}.
*/
public void testGetName() {
assertEquals("step", configuration.getName());
}
/**
- * Test method for {@link org.springframework.batch.core.configuration.StepConfigurationSupport#getStartLimit()}.
+ * Test method for {@link org.springframework.batch.core.domain.StepSupport#getStartLimit()}.
*/
public void testGetStartLimit() {
assertEquals(Integer.MAX_VALUE, configuration.getStartLimit());
@@ -53,7 +54,7 @@ public class StepConfigurationSupportTests extends TestCase {
}
/**
- * Test method for {@link org.springframework.batch.core.configuration.StepConfigurationSupport#getTasklet()}.
+ * Test method for {@link org.springframework.batch.core.domain.StepSupport#getTasklet()}.
*/
public void testGetTasklet() {
assertEquals(null, configuration.getTasklet());
@@ -67,7 +68,7 @@ public class StepConfigurationSupportTests extends TestCase {
}
/**
- * Test method for {@link org.springframework.batch.core.configuration.StepConfigurationSupport#isAllowStartIfComplete()}.
+ * Test method for {@link org.springframework.batch.core.domain.StepSupport#isAllowStartIfComplete()}.
*/
public void testShouldAllowStartIfComplete() {
assertEquals(false, configuration.isAllowStartIfComplete());
diff --git a/spring-batch-core/src/test/java/org/springframework/batch/core/domain/JobInstanceTests.java b/spring-batch-core/src/test/java/org/springframework/batch/core/domain/JobInstanceTests.java
index 9897f1789..d72f6f594 100644
--- a/spring-batch-core/src/test/java/org/springframework/batch/core/domain/JobInstanceTests.java
+++ b/spring-batch-core/src/test/java/org/springframework/batch/core/domain/JobInstanceTests.java
@@ -47,20 +47,20 @@ public class JobInstanceTests extends TestCase {
}
/**
- * Test method for {@link org.springframework.batch.core.domain.JobInstance#getSteps()}.
+ * Test method for {@link org.springframework.batch.core.domain.JobInstance#getStepInstances()}.
*/
public void testGetSteps() {
- assertEquals(0, instance.getSteps().size());
- instance.setSteps(Collections.singletonList(new StepInstance()));
- assertEquals(1, instance.getSteps().size());
+ assertEquals(0, instance.getStepInstances().size());
+ instance.setStepInstances(Collections.singletonList(new StepInstance()));
+ assertEquals(1, instance.getStepInstances().size());
}
/**
- * Test method for {@link org.springframework.batch.core.domain.JobInstance#addStep(org.springframework.batch.core.domain.StepInstance)}.
+ * Test method for {@link org.springframework.batch.core.domain.JobInstance#addStepInstance(org.springframework.batch.core.domain.StepInstance)}.
*/
public void testAddStep() {
- instance.addStep(new StepInstance());
- assertEquals(1, instance.getSteps().size());
+ instance.addStepInstance(new StepInstance());
+ assertEquals(1, instance.getStepInstances().size());
}
/**