1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 package org.apache.syncope.core.provisioning.api.job;
20
21 import java.time.OffsetDateTime;
22 import java.util.Map;
23 import org.apache.syncope.core.persistence.api.entity.Report;
24 import org.apache.syncope.core.persistence.api.entity.task.SchedTask;
25 import org.apache.syncope.core.persistence.api.entity.task.Task;
26 import org.quartz.JobKey;
27 import org.quartz.Scheduler;
28 import org.quartz.SchedulerException;
29
30 @SuppressWarnings("squid:S1214")
31 public interface JobManager {
32
33 String TASK_TYPE = "taskType";
34
35 String TASK_KEY = "taskKey";
36
37 String REPORT_KEY = "reportKey";
38
39 String DOMAIN_KEY = "domain";
40
41 String EXECUTOR_KEY = "executor";
42
43 String DRY_RUN_JOBDETAIL_KEY = "dryRun";
44
45 String DELEGATE_IMPLEMENTATION = "delegateImpl";
46
47 JobKey NOTIFICATION_JOB = new JobKey("notificationJob", Scheduler.DEFAULT_GROUP);
48
49 boolean isRunning(JobKey jobKey) throws SchedulerException;
50
51 Map<String, Object> register(
52 SchedTask task,
53 OffsetDateTime startAt,
54 String executor) throws SchedulerException;
55
56 Map<String, Object> register(
57 Report report,
58 OffsetDateTime startAt,
59 String executor) throws SchedulerException;
60
61 void unregister(Task<?> task);
62
63 void unregister(Report report);
64 }