From c7b8d038e7dfc7f2ffc162e664d06d28a3ee17cc Mon Sep 17 00:00:00 2001 From: dsyer Date: Mon, 5 Nov 2007 17:17:33 +0000 Subject: [PATCH] Internal API change for StepExecutors --- .../batch/execution/step/simple/DefaultStepExecutor.java | 3 ++- .../batch/execution/step/simple/SimpleStepExecutor.java | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/execution/src/main/java/org/springframework/batch/execution/step/simple/DefaultStepExecutor.java b/execution/src/main/java/org/springframework/batch/execution/step/simple/DefaultStepExecutor.java index c32db2c83..ef33c3625 100644 --- a/execution/src/main/java/org/springframework/batch/execution/step/simple/DefaultStepExecutor.java +++ b/execution/src/main/java/org/springframework/batch/execution/step/simple/DefaultStepExecutor.java @@ -16,6 +16,7 @@ package org.springframework.batch.execution.step.simple; +import org.springframework.batch.core.domain.StepExecution; import org.springframework.batch.core.domain.StepInstance; import org.springframework.batch.core.tasklet.Tasklet; import org.springframework.batch.core.tasklet.Recoverable; @@ -51,7 +52,7 @@ public class DefaultStepExecutor extends SimpleStepExecutor { * @see org.springframework.batch.execution.step.simple.SimpleStepExecutor#doTaskletProcessing(org.springframework.batch.core.tasklet.Tasklet, * org.springframework.batch.core.domain.StepInstance) */ - protected ExitStatus doTaskletProcessing(Tasklet module, final StepInstance step) throws Exception { + protected ExitStatus doTaskletProcessing(Tasklet module, final StepExecution step) throws Exception { ExitStatus exitStatus = ExitStatus.CONTINUABLE; diff --git a/execution/src/main/java/org/springframework/batch/execution/step/simple/SimpleStepExecutor.java b/execution/src/main/java/org/springframework/batch/execution/step/simple/SimpleStepExecutor.java index e68d6720b..40d71427f 100644 --- a/execution/src/main/java/org/springframework/batch/execution/step/simple/SimpleStepExecutor.java +++ b/execution/src/main/java/org/springframework/batch/execution/step/simple/SimpleStepExecutor.java @@ -336,7 +336,7 @@ public class SimpleStepExecutor implements StepExecutor { // check for interruption before each item as well interruptionPolicy.checkInterrupted(context); ExitStatus exitStatus = doTaskletProcessing(configuration - .getTasklet(), stepExecution.getStep()); + .getTasklet(), stepExecution); stepExecution.incrementTaskCount(); // check for interruption after each item as well interruptionPolicy.checkInterrupted(context); @@ -352,13 +352,13 @@ public class SimpleStepExecutor implements StepExecutor { * * @param tasklet * the unit of business logic to execute - * @param step + * @param stepExecution * the current step * @return boolean if there is more processing to do * @throws Exception * if there is an error */ - protected ExitStatus doTaskletProcessing(Tasklet tasklet, StepInstance step) + protected ExitStatus doTaskletProcessing(Tasklet tasklet, StepExecution stepExecution) throws Exception { return tasklet.execute(); }