@Test public void testGetTriggerDescriptions() { expect(m_reportWrapperService.validate(m_criteria, REPORT_ID)).andReturn(true); replay(m_reportWrapperService); MockRequestContext context = new MockRequestContext(); DeliveryOptions deliveryOptions = new DeliveryOptions(); deliveryOptions.setInstanceId("testGetTriggerDescriptionsTrigger"); assertEquals("success", m_schedulerService.addCronTrigger(REPORT_ID, m_criteria, deliveryOptions, CRON_EXPRESSION, context)); verify(m_reportWrapperService); assertEquals(1,m_schedulerService.getTriggerDescriptions().size()); assertEquals("testGetTriggerDescriptionsTrigger",m_schedulerService.getTriggerDescriptions().get(0).getTriggerName()); m_schedulerService.removeTrigger("testGetTriggerDescriptionsTrigger"); }
public List<TriggerDescription> getTriggerDescriptions() { List<TriggerDescription> triggerDescriptions = new ArrayList<TriggerDescription>(); try { String[] triggerNames = m_scheduler.getTriggerNames(m_triggerGroup); for (int j = 0; j < triggerNames.length; j++) { TriggerDescription description = new TriggerDescription(); description.setNextFireTime(m_scheduler.getTrigger( triggerNames[j], m_triggerGroup).getNextFireTime()); description.setTriggerName(triggerNames[j]); triggerDescriptions.add(description); } } catch (SchedulerException e) { log().error("exception lretrieving trigger descriptions", e); } return triggerDescriptions; }
DefaultSchedulerService implements InitializingBean, SchedulerService { public List<TriggerDescription> getTriggerDescriptions() { List<TriggerDescription> triggerDescriptions = new ArrayList<TriggerDescription>(); try { String[] triggerNames = m_scheduler.getTriggerNames(m_triggerGroup); for (int j = 0; j < triggerNames.length; j++) { TriggerDescription description = new TriggerDescription(); description.setNextFireTime(m_scheduler.getTrigger( triggerNames[j], m_triggerGroup).getNextFireTime()); description.setTriggerName(triggerNames[j]); triggerDescriptions.add(description); } } catch (SchedulerException e) { log().error("exception lretrieving trigger descriptions", e); } return triggerDescriptions; } }
DefaultSchedulerService implements InitializingBean, SchedulerService { public List<TriggerDescription> getTriggerDescriptions() { List<TriggerDescription> triggerDescriptions = new ArrayList<TriggerDescription>(); try { String[] triggerNames = m_scheduler.getTriggerNames(m_triggerGroup); for (int j = 0; j < triggerNames.length; j++) { TriggerDescription description = new TriggerDescription(); description.setNextFireTime(m_scheduler.getTrigger( triggerNames[j], m_triggerGroup).getNextFireTime()); description.setTriggerName(triggerNames[j]); triggerDescriptions.add(description); } } catch (SchedulerException e) { log().error("exception lretrieving trigger descriptions", e); } return triggerDescriptions; }  }
DefaultSchedulerService implements InitializingBean, SchedulerService { public List<TriggerDescription> getTriggerDescriptions() { List<TriggerDescription> triggerDescriptions = new ArrayList<TriggerDescription>(); try { String[] triggerNames = m_scheduler.getTriggerNames(m_triggerGroup); for (int j = 0; j < triggerNames.length; j++) { TriggerDescription description = new TriggerDescription(); description.setNextFireTime(m_scheduler.getTrigger( triggerNames[j], m_triggerGroup).getNextFireTime()); description.setTriggerName(triggerNames[j]); triggerDescriptions.add(description); } } catch (SchedulerException e) { log().error("exception lretrieving trigger descriptions", e); } return triggerDescriptions; }  @Override void afterPropertiesSet(); List<TriggerDescription> getTriggerDescriptions(); Boolean exists(String triggerName); void removeTrigger(String triggerName); void removeTriggers(String[] triggerNames); String addCronTrigger(String id, ReportParameters criteria,
            DeliveryOptions deliveryOptions,
            String cronExpression, RequestContext context); String execute(String id, ReportParameters criteria,
            DeliveryOptions deliveryOptions, RequestContext context); void setScheduler(Scheduler scheduler); void setJobDetail(JobDetail reportJob); void setTriggerGroup(String triggerGroup); void setReportWrapperService(ReportWrapperService reportWrapperService); }
DefaultSchedulerService implements InitializingBean, SchedulerService { public List<TriggerDescription> getTriggerDescriptions() { List<TriggerDescription> triggerDescriptions = new ArrayList<TriggerDescription>(); try { String[] triggerNames = m_scheduler.getTriggerNames(m_triggerGroup); for (int j = 0; j < triggerNames.length; j++) { TriggerDescription description = new TriggerDescription(); description.setNextFireTime(m_scheduler.getTrigger( triggerNames[j], m_triggerGroup).getNextFireTime()); description.setTriggerName(triggerNames[j]); triggerDescriptions.add(description); } } catch (SchedulerException e) { log().error("exception lretrieving trigger descriptions", e); } return triggerDescriptions; }  @Override void afterPropertiesSet(); List<TriggerDescription> getTriggerDescriptions(); Boolean exists(String triggerName); void removeTrigger(String triggerName); void removeTriggers(String[] triggerNames); String addCronTrigger(String id, ReportParameters criteria,
            DeliveryOptions deliveryOptions,
            String cronExpression, RequestContext context); String execute(String id, ReportParameters criteria,
            DeliveryOptions deliveryOptions, RequestContext context); void setScheduler(Scheduler scheduler); void setJobDetail(JobDetail reportJob); void setTriggerGroup(String triggerGroup); void setReportWrapperService(ReportWrapperService reportWrapperService);  }