@@ -59,12 +59,36 @@ public interface JobOperator extends JobLauncher {
5959 * parameters already exists
6060 * @throws JobParametersInvalidException thrown if any of the job parameters are
6161 * invalid.
62+ * @deprecated since 6.0 in favor of {@link #start(Job, JobParameters)}. Scheduled for
63+ * removal in 6.2 or later.
6264 */
65+ @ Deprecated (since = "6.0" , forRemoval = true )
6366 default Long start (String jobName , Properties parameters )
6467 throws NoSuchJobException , JobInstanceAlreadyExistsException , JobParametersInvalidException {
6568 throw new UnsupportedOperationException ();
6669 }
6770
71+ /**
72+ * Start a new instance of a job with the specified parameters.
73+ * @param job the {@link Job} to start
74+ * @param jobParameters the {@link JobParameters} to start the job with
75+ * @return the {@link JobExecution} that was started
76+ * @throws NoSuchJobException if the given {@link Job} is not registered
77+ * @throws JobParametersInvalidException thrown if any of the job parameters are
78+ * @throws JobExecutionAlreadyRunningException if the JobInstance identified by the
79+ * properties already has an execution running. invalid.
80+ * @throws JobRestartException if the execution would be a re-start, but a re-start is
81+ * either not allowed or not needed.
82+ * @throws JobInstanceAlreadyCompleteException if the job has been run before with the
83+ * same parameters and completed successfully
84+ * @throws IllegalArgumentException if the job or job parameters are null.
85+ */
86+ default JobExecution start (Job job , JobParameters jobParameters )
87+ throws NoSuchJobException , JobInstanceAlreadyCompleteException , JobExecutionAlreadyRunningException ,
88+ JobRestartException , JobParametersInvalidException {
89+ return run (job , jobParameters );
90+ }
91+
6892 /**
6993 * Restart a failed or stopped {@link JobExecution}. Fails with an exception if the id
7094 * provided does not exist or corresponds to a {@link JobInstance} that in normal
0 commit comments