01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * http://www.apache.org/licenses/LICENSE-2.0
10: *
11: * Unless required by applicable law or agreed to in writing, software
12: * distributed under the License is distributed on an "AS IS" BASIS,
13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14: * See the License for the specific language governing permissions and
15: * limitations under the License.
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: public static final String SERVICE_NAME = "scheduler";
29:
30: /**
31: * Get a specific Job from Storage.
32: *
33: * @param oid The int id for the job.
34: * @return A JobEntry.
35: * @exception Exception, a generic exception.
36: */
37: public JobEntry getJob(int oid) throws Exception;
38:
39: /**
40: * Add a new job to the queue.
41: *
42: * @param je A JobEntry with the job to add.
43: * @exception Exception, a generic exception.
44: */
45: public void addJob(JobEntry je) throws Exception;
46:
47: /**
48: * Modify a Job.
49: *
50: * @param je A JobEntry with the job to modify
51: * @exception Exception, a generic exception.
52: */
53: public void updateJob(JobEntry je) throws Exception;
54:
55: /**
56: * Remove a job from the queue.
57: *
58: * @param je A JobEntry with the job to remove.
59: * @exception Exception, a generic exception.
60: */
61: public void removeJob(JobEntry je) throws Exception;
62:
63: /**
64: * List jobs in the queue. This is used by the scheduler UI.
65: *
66: * @return A List of jobs.
67: */
68: public List listJobs();
69: }
|