Search in sources :

Example 66 with JobKey

use of org.quartz.JobKey in project kernel by exoplatform.

the class JobSchedulerServiceImpl method getAllJobs.

public List<JobDetail> getAllJobs() throws Exception {
    List<JobDetail> jlist = new ArrayList<JobDetail>();
    List<String> jgroups = scheduler_.getJobGroupNames();
    for (int i = 0, length = jgroups.size(); i < length; i++) {
        Set<JobKey> jkeys = scheduler_.getJobKeys(GroupMatcher.jobGroupEquals(jgroups.get(i)));
        for (JobKey jkey : jkeys) {
            jlist.add(scheduler_.getJobDetail(jkey));
        }
    }
    return jlist;
}
Also used : JobKey(org.quartz.JobKey) ArrayList(java.util.ArrayList)

Aggregations

JobKey (org.quartz.JobKey)66 SchedulerException (org.quartz.SchedulerException)33 JobDetail (org.quartz.JobDetail)22 Trigger (org.quartz.Trigger)19 Scheduler (org.quartz.Scheduler)17 TriggerKey (org.quartz.TriggerKey)15 Test (org.junit.Test)13 ArrayList (java.util.ArrayList)6 List (java.util.List)6 CronTrigger (org.quartz.CronTrigger)6 JobDataMap (org.quartz.JobDataMap)6 TriggerBuilder.newTrigger (org.quartz.TriggerBuilder.newTrigger)5 OperationResult (com.evolveum.midpoint.schema.result.OperationResult)4 Date (java.util.Date)4 HashMap (java.util.HashMap)4 ObjectNotFoundException (com.evolveum.midpoint.util.exception.ObjectNotFoundException)2 SchemaException (com.evolveum.midpoint.util.exception.SchemaException)2 Hashtable (java.util.Hashtable)2 Scheduled (org.apache.deltaspike.scheduler.api.Scheduled)2 CronScheduleBuilder (org.quartz.CronScheduleBuilder)2