Tabnine Logo
JobStep.setJobParametersExtractor
Code IndexAdd Tabnine to your IDE (free)

How to use
setJobParametersExtractor
method
in
org.springframework.batch.core.step.job.JobStep

Best Java code snippets using org.springframework.batch.core.step.job.JobStep.setJobParametersExtractor (Showing top 7 results out of 315)

origin: spring-projects/spring-batch

step.setJobParametersExtractor(jobParametersExtractor);
origin: spring-projects/spring-batch

ExecutionContext executionContext = stepExecution.getExecutionContext();
executionContext.put("foo", "bar");
step.setJobParametersExtractor(jobParametersExtractor);
origin: spring-projects/spring-batch

@Test
public void testStoppedChild() throws Exception {
  DefaultJobParametersExtractor jobParametersExtractor = new DefaultJobParametersExtractor();
  jobParametersExtractor.setKeys(new String[] {"foo"});
  ExecutionContext executionContext = stepExecution.getExecutionContext();
  executionContext.put("foo", "bar");
  step.setJobParametersExtractor(jobParametersExtractor);
  step.setJob(new JobSupport("child") {
    @Override
    public void execute(JobExecution execution)  {
      assertEquals(1, execution.getJobParameters().getParameters().size());
      execution.setStatus(BatchStatus.STOPPED);
      execution.setEndTime(new Date());
      jobRepository.update(execution);
    }
    @Override
    public boolean isRestartable() {
      return true;
    }
  });
  step.afterPropertiesSet();
  step.execute(stepExecution);
  JobExecution jobExecution = stepExecution.getJobExecution();
  jobExecution.setEndTime(new Date());
  jobRepository.update(jobExecution);
  assertEquals(BatchStatus.STOPPED, stepExecution.getStatus());
}

origin: org.springframework.batch/org.springframework.batch.core

@SuppressWarnings("serial")
private void configureJobStep(JobStep ts) throws Exception {
  configureAbstractStep(ts);
  if (job != null) {
    ts.setJob(job);
  }
  if (jobParametersExtractor != null) {
    ts.setJobParametersExtractor(jobParametersExtractor);
  }
  if (jobLauncher == null) {
    SimpleJobLauncher jobLauncher = new SimpleJobLauncher();
    jobLauncher.setJobRepository(jobRepository);
    jobLauncher.afterPropertiesSet();
    this.jobLauncher = jobLauncher;
  }
  ts.setJobLauncher(jobLauncher);
}
origin: apache/servicemix-bundles

step.setJobParametersExtractor(jobParametersExtractor);
origin: org.springframework.batch/spring-batch-core

step.setJobParametersExtractor(jobParametersExtractor);
origin: org.springframework.batch.core/org.motechproject.org.springframework.batch.core

step.setJobParametersExtractor(jobParametersExtractor);
org.springframework.batch.core.step.jobJobStepsetJobParametersExtractor

Javadoc

The JobParametersExtractor is used to extract JobParametersExtractor from the StepExecution to run the Job. By default an instance will be provided that simply copies the JobParameters from the parent job.

Popular methods of JobStep

  • setJob
    The Job to delegate to in this step.
  • setJobLauncher
    A JobLauncher is required to be able to run the enclosed Job.
  • <init>
  • afterPropertiesSet
  • setName
  • determineStepExitStatus
    Determines the ExitStatus taking into consideration the ExitStatus from the StepExecution, which inv
  • execute
  • setJobRepository

Popular in Java

  • Start an intent from android
  • getSupportFragmentManager (FragmentActivity)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • HttpServer (com.sun.net.httpserver)
    This class implements a simple HTTP server. A HttpServer is bound to an IP address and port number a
  • PrintWriter (java.io)
    Wraps either an existing OutputStream or an existing Writerand provides convenience methods for prin
  • SortedMap (java.util)
    A map that has its keys ordered. The sorting is according to either the natural ordering of its keys
  • Timer (java.util)
    Timers schedule one-shot or recurring TimerTask for execution. Prefer java.util.concurrent.Scheduled
  • ExecutorService (java.util.concurrent)
    An Executor that provides methods to manage termination and methods that can produce a Future for tr
  • Location (org.springframework.beans.factory.parsing)
    Class that models an arbitrary location in a Resource.Typically used to track the location of proble
  • CodeWhisperer alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now