1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.apache.jetspeed.scheduler;
18
19 import java.util.List;
20
21 /***
22 * ScheduleService interface.
23 *
24 * @author <a href="mailto:mbryson@mont.mindspring.com">Dave Bryson</a>
25 * @version $Id: Scheduler.java 516448 2007-03-09 16:25:47Z ate $
26 */
27 public interface Scheduler
28 {
29 public static final String SERVICE_NAME = "scheduler";
30
31 /***
32 * Get a specific Job from Storage.
33 *
34 * @param oid The int id for the job.
35 * @return A JobEntry.
36 * @exception Exception, a generic exception.
37 */
38 public JobEntry getJob(int oid)
39 throws Exception;
40
41 /***
42 * Add a new job to the queue.
43 *
44 * @param je A JobEntry with the job to add.
45 * @exception Exception, a generic exception.
46 */
47 public void addJob(JobEntry je)
48 throws Exception;
49
50 /***
51 * Modify a Job.
52 *
53 * @param je A JobEntry with the job to modify
54 * @exception Exception, a generic exception.
55 */
56 public void updateJob(JobEntry je)
57 throws Exception;
58
59 /***
60 * Remove a job from the queue.
61 *
62 * @param je A JobEntry with the job to remove.
63 * @exception Exception, a generic exception.
64 */
65 public void removeJob(JobEntry je)
66 throws Exception;
67
68 /***
69 * List jobs in the queue. This is used by the scheduler UI.
70 *
71 * @return A List of jobs.
72 */
73 public List listJobs();
74 }