if (batchEnvironment == null) {
throw BatchMessages.MESSAGES.batchEnvironmentNotFound();
}
this.batchEnvironment = batchEnvironment;
artifactFactory = new ArtifactFactoryWrapper(batchEnvironment.getArtifactFactory());
repository = batchEnvironment.getJobRepository();
if (repository == null) {
throw BatchMessages.MESSAGES.jobRepositoryRequired();
}
}