Example usage for org.springframework.batch.core.listener ExecutionContextPromotionListener setKeys

List of usage examples for org.springframework.batch.core.listener ExecutionContextPromotionListener setKeys

Introduction

In this page you can find the example usage for org.springframework.batch.core.listener ExecutionContextPromotionListener setKeys.

Prototype

public void setKeys(String[] keys) 

Source Link

Usage

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 www . j a  v  a 2s . c  om*/
@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: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  ww  w  . j  av 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
 *///from  www.j  a  va2s .c o  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
 *///from  ww  w . jav  a2  s.  c  o m
@Bean
@StepScope
public ExecutionContextPromotionListener mantisProjectExtractorListener() {
    final ExecutionContextPromotionListener listener = new ExecutionContextPromotionListener();
    listener.setKeys(new String[] { "mantis.loop.project_id" });

    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;
}