@Test(expected = SpringBatchLightminConfigurationException.class) public void getSchedulerStatusUnknownTest() { final String beanName = "schedulerBean"; when(this.applicationContext.containsBean(beanName)).thenReturn(Boolean.FALSE); this.schedulerService.getSchedulerStatus(beanName); }
@Override public SchedulerStatus getSchedulerStatus(final String beanName) { final SchedulerStatus status; if (this.applicationContext.containsBean(beanName)) { final Scheduler scheduler = this.applicationContext.getBean(beanName, Scheduler.class); status = scheduler.getSchedulerStatus(); } else { throw new SpringBatchLightminConfigurationException("Could not get status for bean with name: " + beanName); } return status; }
DefaultSchedulerService implements SchedulerService { @Override public SchedulerStatus getSchedulerStatus(final String beanName) { final SchedulerStatus status; if (this.applicationContext.containsBean(beanName)) { final Scheduler scheduler = this.applicationContext.getBean(beanName, Scheduler.class); status = scheduler.getSchedulerStatus(); } else { throw new SpringBatchLightminConfigurationException("Could not get status for bean with name: " + beanName); } return status; } }
DefaultSchedulerService implements SchedulerService { @Override public SchedulerStatus getSchedulerStatus(final String beanName) { final SchedulerStatus status; if (this.applicationContext.containsBean(beanName)) { final Scheduler scheduler = this.applicationContext.getBean(beanName, Scheduler.class); status = scheduler.getSchedulerStatus(); } else { throw new SpringBatchLightminConfigurationException("Could not get status for bean with name: " + beanName); } return status; } DefaultSchedulerService(final BeanRegistrar beanRegistrar,
                                   final JobRepository jobRepository,
                                   final JobRegistry jobRegistry); }
DefaultSchedulerService implements SchedulerService { @Override public SchedulerStatus getSchedulerStatus(final String beanName) { final SchedulerStatus status; if (this.applicationContext.containsBean(beanName)) { final Scheduler scheduler = this.applicationContext.getBean(beanName, Scheduler.class); status = scheduler.getSchedulerStatus(); } else { throw new SpringBatchLightminConfigurationException("Could not get status for bean with name: " + beanName); } return status; } DefaultSchedulerService(final BeanRegistrar beanRegistrar,
                                   final JobRepository jobRepository,
                                   final JobRegistry jobRegistry); @Autowired void setApplicationContext(final ApplicationContext applicationContext); @Override String registerSchedulerForJob(final JobConfiguration jobConfiguration); @Override void unregisterSchedulerForJob(final String beanName); @Override void refreshSchedulerForJob(final JobConfiguration jobConfiguration); @Override void schedule(final String beanName, final Boolean forceScheduling); @Override void terminate(final String beanName); @Override SchedulerStatus getSchedulerStatus(final String beanName); @Override void afterPropertiesSet(); @Override JobLauncher createLobLauncher(final TaskExecutorType taskExecutorType, final JobRepository jobRepository); }
DefaultSchedulerService implements SchedulerService { @Override public SchedulerStatus getSchedulerStatus(final String beanName) { final SchedulerStatus status; if (this.applicationContext.containsBean(beanName)) { final Scheduler scheduler = this.applicationContext.getBean(beanName, Scheduler.class); status = scheduler.getSchedulerStatus(); } else { throw new SpringBatchLightminConfigurationException("Could not get status for bean with name: " + beanName); } return status; } DefaultSchedulerService(final BeanRegistrar beanRegistrar,
                                   final JobRepository jobRepository,
                                   final JobRegistry jobRegistry); @Autowired void setApplicationContext(final ApplicationContext applicationContext); @Override String registerSchedulerForJob(final JobConfiguration jobConfiguration); @Override void unregisterSchedulerForJob(final String beanName); @Override void refreshSchedulerForJob(final JobConfiguration jobConfiguration); @Override void schedule(final String beanName, final Boolean forceScheduling); @Override void terminate(final String beanName); @Override SchedulerStatus getSchedulerStatus(final String beanName); @Override void afterPropertiesSet(); @Override JobLauncher createLobLauncher(final TaskExecutorType taskExecutorType, final JobRepository jobRepository);  }