001
014
015 package com.liferay.portal.kernel.scheduler;
016
017 import aQute.bnd.annotation.ProviderType;
018
019 import com.liferay.portal.kernel.messaging.Message;
020 import com.liferay.portal.kernel.messaging.proxy.MessagingProxy;
021 import com.liferay.portal.kernel.messaging.proxy.ProxyMode;
022 import com.liferay.portal.kernel.scheduler.messaging.SchedulerResponse;
023
024 import java.util.List;
025
026
032 @ProviderType
033 public interface SchedulerEngine {
034
035 public static final String DESCRIPTION = "DESCRIPTION";
036
037 public static final String DESTINATION_NAME = "DESTINATION_NAME";
038
039 public static final String DISABLE = "DISABLE";
040
041 public static final String END_TIME = "END_TIME";
042
043 public static final String EXCEPTIONS_MAX_SIZE = "EXCEPTIONS_MAX_SIZE";
044
045 public static final String FINAL_FIRE_TIME = "FINAL_FIRE_TIME";
046
047 public static final String GROUP_NAME = "GROUP_NAME";
048
049 public static final String JOB_NAME = "JOB_NAME";
050
051 public static final String JOB_STATE = "JOB_STATE";
052
053 public static final String LANGUAGE = "LANGUAGE";
054
055 public static final String MESSAGE = "MESSAGE";
056
057 public static final String MESSAGE_LISTENER_CLASS_NAME =
058 "MESSAGE_LISTENER_CLASS_NAME";
059
060 public static final String MESSAGE_LISTENER_UUID = "MESSAGE_LISTENER_UUID";
061
062 public static final String NEXT_FIRE_TIME = "NEXT_FIRE_TIME";
063
064 public static final String PORTLET_ID = "PORTLET_ID";
065
066 public static final String PREVIOUS_FIRE_TIME = "PREVIOUS_FIRE_TIME";
067
068
071 @Deprecated
072 public static final String RECEIVER_KEY = "RECEIVER_KEY";
073
074 public static final String SCHEDULER = "SCHEDULER";
075
076 public static final String SCRIPT = "SCRIPT";
077
078 public static final String START_TIME = "START_TIME";
079
080 public static final String STORAGE_TYPE = "STORAGE_TYPE";
081
082 public void delete(String groupName, StorageType storageType)
083 throws SchedulerException;
084
085 public void delete(
086 String jobName, String groupName, StorageType storageType)
087 throws SchedulerException;
088
089 @MessagingProxy(mode = ProxyMode.SYNC)
090 public SchedulerResponse getScheduledJob(
091 String jobName, String groupName, StorageType storageType)
092 throws SchedulerException;
093
094 @MessagingProxy(mode = ProxyMode.SYNC)
095 public List<SchedulerResponse> getScheduledJobs() throws SchedulerException;
096
097 @MessagingProxy(mode = ProxyMode.SYNC)
098 public List<SchedulerResponse> getScheduledJobs(StorageType storageType)
099 throws SchedulerException;
100
101 @MessagingProxy(mode = ProxyMode.SYNC)
102 public List<SchedulerResponse> getScheduledJobs(
103 String groupName, StorageType storageType)
104 throws SchedulerException;
105
106 public void pause(String groupName, StorageType storageType)
107 throws SchedulerException;
108
109 public void pause(String jobName, String groupName, StorageType storageType)
110 throws SchedulerException;
111
112 public void resume(String groupName, StorageType storageType)
113 throws SchedulerException;
114
115 public void resume(
116 String jobName, String groupName, StorageType storageType)
117 throws SchedulerException;
118
119 public void schedule(
120 Trigger trigger, String description, String destinationName,
121 Message message, StorageType storageType)
122 throws SchedulerException;
123
124 @MessagingProxy(local = true, mode = ProxyMode.SYNC)
125 public void shutdown() throws SchedulerException;
126
127 @MessagingProxy(local = true, mode = ProxyMode.SYNC)
128 public void start() throws SchedulerException;
129
130 public void suppressError(
131 String jobName, String groupName, StorageType storageType)
132 throws SchedulerException;
133
134 @MessagingProxy(mode = ProxyMode.SYNC)
135 public void unschedule(String groupName, StorageType storageType)
136 throws SchedulerException;
137
138 @MessagingProxy(mode = ProxyMode.SYNC)
139 public void unschedule(
140 String jobName, String groupName, StorageType storageType)
141 throws SchedulerException;
142
143 public void update(Trigger trigger, StorageType storageType)
144 throws SchedulerException;
145
146 }