1
|
/**
|
2
|
* '$RCSfile$'
|
3
|
* Purpose: An abstract base class for scheduler classes.
|
4
|
* Copyright: 2009 Regents of the University of California and the
|
5
|
* National Center for Ecological Analysis and Synthesis
|
6
|
* Authors: Michael Daigle
|
7
|
*
|
8
|
* '$Author: daigle $'
|
9
|
* '$Date: 2009-03-23 13:56:56 -0800 (Mon, 23 Mar 2009) $'
|
10
|
* '$Revision: 4854 $'
|
11
|
*
|
12
|
* This program is free software; you can redistribute it and/or modify
|
13
|
* it under the terms of the GNU General Public License as published by
|
14
|
* the Free Software Foundation; either version 2 of the License, or
|
15
|
* (at your option) any later version.
|
16
|
*
|
17
|
* This program is distributed in the hope that it will be useful,
|
18
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
19
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
20
|
* GNU General Public License for more details.
|
21
|
*
|
22
|
* You should have received a copy of the GNU General Public License
|
23
|
* along with this program; if not, write to the Free Software
|
24
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
25
|
*/
|
26
|
|
27
|
package edu.ucsb.nceas.metacat.scheduler;
|
28
|
|
29
|
import java.util.Hashtable;
|
30
|
|
31
|
import javax.servlet.http.HttpServletRequest;
|
32
|
import javax.servlet.http.HttpServletResponse;
|
33
|
|
34
|
public abstract class BaseScheduler {
|
35
|
|
36
|
// Schedule a job by extracting job specific information and registering it with the scheduler
|
37
|
// service.
|
38
|
public abstract void scheduleJob(HttpServletRequest request, HttpServletResponse response,
|
39
|
Hashtable<String, String[]> params) throws MetacatSchedulerException;
|
40
|
|
41
|
// Unschedule a job in the scheduler service.
|
42
|
public abstract void unscheduleJob(HttpServletRequest request, HttpServletResponse response,
|
43
|
Hashtable<String, String[]> params, String username, String[] groups) throws MetacatSchedulerException;
|
44
|
|
45
|
// Unschedule a job in the scheduler service.
|
46
|
public abstract void rescheduleJob(HttpServletRequest request, HttpServletResponse response,
|
47
|
Hashtable<String, String[]> params, String username, String[] groups) throws MetacatSchedulerException;
|
48
|
|
49
|
// Delete a job in the scheduler service.
|
50
|
public abstract void deleteJob(HttpServletRequest request, HttpServletResponse response,
|
51
|
Hashtable<String, String[]> params, String username, String[] groups) throws MetacatSchedulerException;
|
52
|
|
53
|
// get all jobs frpm the scheduler service for a specific type of scheduler.
|
54
|
public abstract void getJobs(HttpServletRequest request, HttpServletResponse response,
|
55
|
Hashtable<String, String[]> params, String username, String[] groups) throws MetacatSchedulerException;
|
56
|
}
|