RESOLVED - issue BATCH-1411: Allow a Job to specify its required JobParameters

Fix build
This commit is contained in:
dsyer
2009-11-11 22:11:55 +00:00
parent 2952ed5233
commit 913bba44c1
2 changed files with 14 additions and 0 deletions

View File

@@ -13,6 +13,8 @@ import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.batch.core.BatchStatus;
import org.springframework.batch.core.JobExecution;
import org.springframework.batch.core.JobParametersInvalidException;
import org.springframework.batch.core.UnexpectedJobExecutionException;
import org.springframework.batch.core.explore.JobExplorer;
import org.springframework.batch.core.launch.JobOperator;
import org.springframework.batch.core.launch.JobParametersNotFoundException;
@@ -231,5 +233,11 @@ public class SkipSampleFunctionalTests {
catch (JobInstanceAlreadyCompleteException e) {
throw new RuntimeException(e);
}
catch (UnexpectedJobExecutionException e) {
throw new RuntimeException(e);
}
catch (JobParametersInvalidException e) {
throw new RuntimeException(e);
}
}
}

View File

@@ -21,7 +21,9 @@ import java.util.List;
import org.springframework.batch.core.Job;
import org.springframework.batch.core.JobExecution;
import org.springframework.batch.core.JobParameters;
import org.springframework.batch.core.JobParametersIncrementer;
import org.springframework.batch.core.JobParametersInvalidException;
import org.springframework.batch.core.Step;
import org.springframework.batch.core.UnexpectedJobExecutionException;
import org.springframework.beans.factory.BeanNameAware;
@@ -96,6 +98,10 @@ public class JobSupport implements BeanNameAware, Job {
public String getName() {
return name;
}
public void validate(JobParameters parameters) throws JobParametersInvalidException {
// no-op
}
public void setSteps(List<Step> steps) {
this.steps.clear();