Remove convenience accessor for job.getIdentifier()
This commit is contained in:
@@ -138,16 +138,6 @@ public class JobExecution extends Entity {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Accessor for the runtime information of this execution.
|
||||
*
|
||||
* @return the {@link JobRuntimeInformation} that was used to start this job
|
||||
* execution.
|
||||
*/
|
||||
public JobIdentifier getJobIdentifier() {
|
||||
return job.getIdentifier();
|
||||
}
|
||||
|
||||
/**
|
||||
* Accessor for the potentially multiple step contexts that are in progress.
|
||||
* In a single-threaded, sequential execution there would normally be only
|
||||
|
||||
@@ -100,7 +100,7 @@ public class JobExecutionTests extends TestCase {
|
||||
}
|
||||
|
||||
public void testContextContainsInfo() throws Exception {
|
||||
assertEquals("foo", context.getJobIdentifier().getName());
|
||||
assertEquals("foo", context.getJob().getIdentifier().getName());
|
||||
}
|
||||
|
||||
public void testNullContexts() throws Exception {
|
||||
|
||||
@@ -184,7 +184,7 @@ class SimpleJobExecutorFacade implements JobExecutorFacade,
|
||||
public void before(JobExecution execution) {
|
||||
synchronized (mutex) {
|
||||
running++;
|
||||
jobExecutionRegistry.put(execution.getJobIdentifier(), execution);
|
||||
jobExecutionRegistry.put(execution.getJob().getIdentifier(), execution);
|
||||
}
|
||||
for (Iterator iterator = listeners.iterator(); iterator.hasNext();) {
|
||||
JobExecutionListener listener = (JobExecutionListener) iterator
|
||||
@@ -224,7 +224,7 @@ class SimpleJobExecutorFacade implements JobExecutorFacade,
|
||||
synchronized (mutex) {
|
||||
// assume execution is synchronous so when we get to here we are
|
||||
// not running any more
|
||||
jobExecutionRegistry.remove(execution.getJobIdentifier());
|
||||
jobExecutionRegistry.remove(execution.getJob().getIdentifier());
|
||||
running--;
|
||||
}
|
||||
}
|
||||
@@ -268,7 +268,7 @@ class SimpleJobExecutorFacade implements JobExecutorFacade,
|
||||
JobExecution element = (JobExecution) iter.next();
|
||||
i++;
|
||||
String runtime = "job" + i;
|
||||
props.setProperty(runtime, "" + element.getJobIdentifier());
|
||||
props.setProperty(runtime, "" + element.getJob().getIdentifier());
|
||||
int j = 0;
|
||||
for (Iterator iterator = element.getStepContexts().iterator(); iterator
|
||||
.hasNext();) {
|
||||
|
||||
@@ -130,7 +130,7 @@ public class BatchResourceFactoryBean extends AbstractFactoryBean implements
|
||||
StepExecution execution = context.getStepExecution();
|
||||
stepName = execution.getStep().getName();
|
||||
jobName = execution.getStep().getJob().getName();
|
||||
jobIdentifier = execution.getJobExecution().getJobIdentifier();
|
||||
jobIdentifier = execution.getJobExecution().getJob().getIdentifier();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -164,7 +164,7 @@ public class SimpleStepExecutor implements StepExecutor {
|
||||
// Add the job identifier so that it can be used to identify
|
||||
// the conversation in StepScope
|
||||
stepScopeContext.setAttribute(StepScope.ID_KEY, stepExecution
|
||||
.getJobExecution().getJobIdentifier());
|
||||
.getJobExecution().getJob().getIdentifier());
|
||||
|
||||
try {
|
||||
stepExecution
|
||||
|
||||
Reference in New Issue
Block a user