private static JobListenerType map(final org.tuxdevelop.spring.batch.lightmin.domain.JobListenerType jobListenerType) { final JobListenerType response; switch (jobListenerType) { case LOCAL_FOLDER_LISTENER: response = JobListenerType.LOCAL_FOLDER_LISTENER; break; default: throw new SpringBatchLightminApplicationException("Unknown JobListenerType: " + jobListenerType); } return response; }
@Override public JobConfiguration getJobConfigurationById(final Long jobConfigurationId) { try { final JobConfiguration jobConfiguration = this.jobConfigurationRepository.getJobConfiguration(jobConfigurationId, this.springBatchLightminCoreConfigurationProperties.getApplicationName()); this.attachSchedulerStatus(jobConfiguration); return jobConfiguration; } catch (final NoSuchJobConfigurationException e) { throw new SpringBatchLightminApplicationException(e, e.getMessage()); } }
private static JobListenerType map(final org.tuxdevelop.spring.batch.lightmin.api.resource.admin.JobListenerType jobListenerType) { final JobListenerType response; switch (jobListenerType) { case LOCAL_FOLDER_LISTENER: response = JobListenerType.LOCAL_FOLDER_LISTENER; break; default: throw new SpringBatchLightminApplicationException("Unknown JobListenerType: " + jobListenerType); } return response; }
private static JobListenerType map(final org.tuxdevelop.spring.batch.lightmin.api.resource.admin.JobListenerType jobListenerType) { final JobListenerType response; switch (jobListenerType) { case LOCAL_FOLDER_LISTENER: response = JobListenerType.LOCAL_FOLDER_LISTENER; break; default: throw new SpringBatchLightminApplicationException("Unknown JobListenerType: " + jobListenerType); } return response; }
private void validateJobConfigurationBody(final JobConfiguration jobConfiguration) { if (jobConfiguration == null) { throw new SpringBatchLightminApplicationException("jobConfiguration must not be null"); } } }
private static JobListenerType map(final org.tuxdevelop.spring.batch.lightmin.domain.JobListenerType jobListenerType) { final JobListenerType response; switch (jobListenerType) { case LOCAL_FOLDER_LISTENER: response = JobListenerType.LOCAL_FOLDER_LISTENER; break; default: throw new SpringBatchLightminApplicationException("Unknown JobListenerType: " + jobListenerType); } return response; }
private static JobSchedulerType map(final org.tuxdevelop.spring.batch.lightmin.api.resource.admin.JobSchedulerType jobSchedulerType) { final JobSchedulerType response; switch (jobSchedulerType) { case CRON: response = JobSchedulerType.CRON; break; case PERIOD: response = JobSchedulerType.PERIOD; break; default: throw new SpringBatchLightminApplicationException("Unknown JobSchedulerType: " + jobSchedulerType); } return response; }
private static TaskExecutorType map(final org.tuxdevelop.spring.batch.lightmin.domain.TaskExecutorType taskExecutorType) { final TaskExecutorType response; switch (taskExecutorType) { case SYNCHRONOUS: response = TaskExecutorType.SYNCHRONOUS; break; case ASYNCHRONOUS: response = TaskExecutorType.ASYNCHRONOUS; break; default: throw new SpringBatchLightminApplicationException("Unknown TaskExecutorType: " + taskExecutorType); } return response; }
private static TaskExecutorType map(final org.tuxdevelop.spring.batch.lightmin.api.resource.admin.TaskExecutorType taskExecutorType) { final TaskExecutorType response; switch (taskExecutorType) { case SYNCHRONOUS: response = TaskExecutorType.SYNCHRONOUS; break; case ASYNCHRONOUS: response = TaskExecutorType.ASYNCHRONOUS; break; default: throw new SpringBatchLightminApplicationException("Unknown TaskExecutorType: " + taskExecutorType); } return response; }
private static JobSchedulerType map(final org.tuxdevelop.spring.batch.lightmin.api.resource.admin.JobSchedulerType jobSchedulerType) { final JobSchedulerType response; switch (jobSchedulerType) { case CRON: response = JobSchedulerType.CRON; break; case PERIOD: response = JobSchedulerType.PERIOD; break; default: throw new SpringBatchLightminApplicationException("Unknown JobSchedulerType: " + jobSchedulerType); } return response; }
private static ListenerStatus map(final org.tuxdevelop.spring.batch.lightmin.domain.ListenerStatus listenerStatus) { final ListenerStatus response; switch (listenerStatus) { case ACTIVE: response = ListenerStatus.ACTIVE; break; case STOPPED: response = ListenerStatus.STOPPED; break; default: throw new SpringBatchLightminApplicationException("Unknown ListenerStatus: " + listenerStatus); } return response; }
private static JobSchedulerType map(final org.tuxdevelop.spring.batch.lightmin.domain.JobSchedulerType jobSchedulerType) { final JobSchedulerType response; switch (jobSchedulerType) { case CRON: response = JobSchedulerType.CRON; break; case PERIOD: response = JobSchedulerType.PERIOD; break; default: throw new SpringBatchLightminApplicationException("Unknown JobSchedulerType: " + jobSchedulerType); } return response; }
private static ListenerStatus map(final org.tuxdevelop.spring.batch.lightmin.api.resource.admin.ListenerStatus listenerStatus) { final ListenerStatus response; switch (listenerStatus) { case ACTIVE: response = ListenerStatus.ACTIVE; break; case STOPPED: response = ListenerStatus.STOPPED; break; default: throw new SpringBatchLightminApplicationException("Unknown ListenerStatus: " + listenerStatus); } return response; }
private static ListenerStatus map(final org.tuxdevelop.spring.batch.lightmin.domain.ListenerStatus listenerStatus) { final ListenerStatus response; switch (listenerStatus) { case ACTIVE: response = ListenerStatus.ACTIVE; break; case STOPPED: response = ListenerStatus.STOPPED; break; default: throw new SpringBatchLightminApplicationException("Unknown ListenerStatus: " + listenerStatus); } return response; }
private static JobSchedulerType map(final org.tuxdevelop.spring.batch.lightmin.domain.JobSchedulerType jobSchedulerType) { final JobSchedulerType response; switch (jobSchedulerType) { case CRON: response = JobSchedulerType.CRON; break; case PERIOD: response = JobSchedulerType.PERIOD; break; default: throw new SpringBatchLightminApplicationException("Unknown JobSchedulerType: " + jobSchedulerType); } return response; }
private static TaskExecutorType map(final org.tuxdevelop.spring.batch.lightmin.api.resource.admin.TaskExecutorType taskExecutorType) { final TaskExecutorType response; switch (taskExecutorType) { case SYNCHRONOUS: response = TaskExecutorType.SYNCHRONOUS; break; case ASYNCHRONOUS: response = TaskExecutorType.ASYNCHRONOUS; break; default: throw new SpringBatchLightminApplicationException("Unknown TaskExecutorType: " + taskExecutorType); } return response; }
private static ListenerStatus map(final org.tuxdevelop.spring.batch.lightmin.api.resource.admin.ListenerStatus listenerStatus) { final ListenerStatus response; switch (listenerStatus) { case ACTIVE: response = ListenerStatus.ACTIVE; break; case STOPPED: response = ListenerStatus.STOPPED; break; default: throw new SpringBatchLightminApplicationException("Unknown ListenerStatus: " + listenerStatus); } return response; }
private static TaskExecutorType map(final org.tuxdevelop.spring.batch.lightmin.domain.TaskExecutorType taskExecutorType) { final TaskExecutorType response; switch (taskExecutorType) { case SYNCHRONOUS: response = TaskExecutorType.SYNCHRONOUS; break; case ASYNCHRONOUS: response = TaskExecutorType.ASYNCHRONOUS; break; default: throw new SpringBatchLightminApplicationException("Unknown TaskExecutorType: " + taskExecutorType); } return response; }
private static SchedulerStatus map(final org.tuxdevelop.spring.batch.lightmin.domain.SchedulerStatus schedulerStatus) { final SchedulerStatus response; switch (schedulerStatus) { case RUNNING: response = SchedulerStatus.RUNNING; break; case STOPPED: response = SchedulerStatus.STOPPED; break; case INITIALIZED: response = SchedulerStatus.INITIALIZED; break; case IN_TERMINATION: response = SchedulerStatus.IN_TERMINATION; break; default: throw new SpringBatchLightminApplicationException("Unknown SchedulerStatus: " + schedulerStatus); } return response; }
static Integer determineJobConfigurationType(final JobConfiguration jobConfiguration) { final Integer jobConfigurationType; if (jobConfiguration.getJobSchedulerConfiguration() != null) { jobConfigurationType = JobConfigurationType.SCHEDULER; } else if (jobConfiguration.getJobListenerConfiguration() != null) { jobConfigurationType = JobConfigurationType.LISTENER; } else { throw new SpringBatchLightminApplicationException("Could not determine JobConfigurationType"); } return jobConfigurationType; } }