List of usage examples for org.springframework.batch.core.listener ExecutionContextPromotionListener ExecutionContextPromotionListener
ExecutionContextPromotionListener
From source file:com.github.jrrdev.mantisbtsync.core.jobs.issues.IssuesTaskletsConfiguration.java
/** * Execution context promotion listener that promotes mantis.update.last_job_run and * mantis.update.current_job_run to the job context. * * @return the execution context promotion listener *///from w ww . jav a2 s .c o m @Bean @StepScope public ExecutionContextPromotionListener mantisLastRunExtractorPromotionListener() { final ExecutionContextPromotionListener listener = new ExecutionContextPromotionListener(); listener.setKeys(new String[] { "mantis.update.last_job_run", "mantis.update.current_job_run" }); return listener; }
From source file:be.ordina.springbatch.batch.jobs.ImportTrajectInformationConfig.java
@Bean public ExecutionContextPromotionListener statisticsListener() { ExecutionContextPromotionListener executionContextPromotionListener = new ExecutionContextPromotionListener(); List<String> keys = new ArrayList<>(Arrays.asList("graveErrors", "total")); keys.addAll(Arrays.asList(LicensePlateType.names())); executionContextPromotionListener.setKeys(keys.toArray(new String[keys.size()])); return executionContextPromotionListener; }
From source file:com.github.jrrdev.mantisbtsync.core.jobs.projects.ProjectsTaskletsConfiguration.java
/** * Build the execution promotion listener used to store the access level (mantis.acess_level) * in the job execution context./*from w w w . j a v a 2 s . c o m*/ * * @return the execution promotion listener */ @Bean @StepScope public ExecutionContextPromotionListener mantisLoginPromotionListener() { final ExecutionContextPromotionListener listener = new ExecutionContextPromotionListener(); listener.setKeys(new String[] { "mantis.acess_level" }); return listener; }
From source file:com.github.jrrdev.mantisbtsync.core.jobs.projects.ProjectsTaskletsConfiguration.java
/** * Build the execution promotion listener used to store the list of projects to sync * (mantis.loop.projects_to_process) in the job execution context. * * @return the execution promotion listener */// w ww. j a v a 2 s.co m @Bean @StepScope public ExecutionContextPromotionListener mantisProjectsListListener() { final ExecutionContextPromotionListener listener = new ExecutionContextPromotionListener(); listener.setKeys(new String[] { "mantis.loop.projects_to_process" }); return listener; }
From source file:com.github.jrrdev.mantisbtsync.core.jobs.projects.ProjectsTaskletsConfiguration.java
/** * Build the execution promotion listener used to store the current project to sync * (mantis.loop.project_id) in the job execution context. * * @return the execution promotion listener *//* w ww .ja v a 2 s . c o m*/ @Bean @StepScope public ExecutionContextPromotionListener mantisProjectExtractorListener() { final ExecutionContextPromotionListener listener = new ExecutionContextPromotionListener(); listener.setKeys(new String[] { "mantis.loop.project_id" }); return listener; }