1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * The contents of this file are subject to the terms of the Liferay Enterprise
5    * Subscription License ("License"). You may not use this file except in
6    * compliance with the License. You can obtain a copy of the License by
7    * contacting Liferay, Inc. See the License for the specific language governing
8    * permissions and limitations under the License, including but not limited to
9    * distribution rights of the Software.
10   *
11   *
12   *
13   */
14  
15  package com.liferay.portal.kernel.scheduler;
16  
17  import com.liferay.portal.kernel.scheduler.messaging.SchedulerRequest;
18  
19  import java.util.Date;
20  import java.util.List;
21  
22  /**
23   * <a href="SchedulerEngine.java.html"><b><i>View Source</i></b></a>
24   *
25   * @author Michael C. Han
26   * @author Bruno Farache
27   */
28  public interface SchedulerEngine {
29  
30      public static final String CRON_TEXT = "cronText";
31  
32      public static final String DESCRIPTION = "description";
33  
34      public static final String DESTINATION = "destination";
35  
36      public static final String MESSAGE_BODY = "messageBody";
37  
38      public List<SchedulerRequest> getScheduledJobs(String groupName)
39          throws SchedulerException;
40  
41      public void schedule(
42              String groupName, long interval, Date startDate, Date endDate,
43              String description, String destinationName, String messageBody)
44          throws SchedulerException;
45  
46      public void schedule(
47              String groupName, String cronText, Date startDate, Date endDate,
48              String description, String destinationName, String messageBody)
49          throws SchedulerException;
50  
51      public void schedule(
52              String jobName, String groupName, long interval, Date startDate,
53              Date endDate, String description, String destinationName,
54              String messageBody)
55          throws SchedulerException;
56  
57      public void schedule(
58              String jobName, String groupName, String cronText, Date startDate,
59              Date endDate, String description, String destinationName,
60              String messageBody)
61          throws SchedulerException;
62  
63      public void shutdown() throws SchedulerException;
64  
65      public void start() throws SchedulerException;
66  
67      public void unschedule(String jobName, String groupName)
68          throws SchedulerException;
69  
70  }