Examples of toJobParameters()


Examples of org.springframework.batch.core.JobParametersBuilder.toJobParameters()

        job.setRestartable(true);

        JobParametersBuilder builder = new JobParametersBuilder();
        builder.addString("stringKey", "stringValue").addLong("longKey", 1L).addDouble("doubleKey", 1.1).addDate(
                "dateKey", new Date(1L));
        JobParameters jobParams = builder.toJobParameters();

        JobExecution firstExecution = jobRepository.createJobExecution(job.getName(), jobParams);
        firstExecution.setStartTime(new Date());
        assertNotNull(firstExecution.getLastUpdated());
View Full Code Here

Examples of org.springframework.batch.core.JobParametersBuilder.toJobParameters()

            } else {
                // if the value is null we just put String with null value here to avoid the NPE
                parametersBuilder.addString(headerKey, null);
            }
        }
        return parametersBuilder.toJobParameters();
    }

}
View Full Code Here

Examples of org.springframework.batch.core.JobParametersBuilder.toJobParameters()

  @Transformer
  public Message<JobLaunchRequest> transform(Message<String> pidMessage) {
    JobParametersBuilder jobParametersBuilder = new JobParametersBuilder();
    jobParametersBuilder.addString(JOB_PARAM_PID_KEY,
        pidMessage.getPayload());
    JobParameters jobParameters = jobParametersBuilder.toJobParameters();

    Job job = null;
    try {
      job = jobLocator.getJob("generateDerivatives");
    } catch (NoSuchJobException e) {
View Full Code Here

Examples of org.springframework.batch.core.JobParametersBuilder.toJobParameters()

    Job derivativeGenerationJob = jobLocator.getJob("generateDerivatives");

    for (String pid : pids) {
      JobParametersBuilder jobParametersBuilder = new JobParametersBuilder();
      jobParametersBuilder.addString(JOB_PARAM_PID_KEY, pid);
      JobParameters jobParameters = jobParametersBuilder
          .toJobParameters();
      jobLauncher.run(derivativeGenerationJob, jobParameters);
    }
  }
View Full Code Here

Examples of org.springframework.batch.core.JobParametersBuilder.toJobParameters()

    }

    JobParametersBuilder jobParametersBuilder = new JobParametersBuilder();
    jobParametersBuilder.addString("GUID", guid);
    jobParametersBuilder.addString("URI", uri);
    JobParameters jobParameters = jobParametersBuilder.toJobParameters();
   
    Job job = null;
    try {
      job = jobLocator.getJob("batchIngestJob");
    } catch (NoSuchJobException e) {
View Full Code Here

Examples of org.springframework.batch.core.JobParametersBuilder.toJobParameters()

    JobParametersBuilder jobParametersBuilder = new JobParametersBuilder();
    jobParametersBuilder.addString(Sip.JOB_PARAM_GUID_KEY, sipMessage
        .getPayload().getGuid());
    jobParametersBuilder.addString(Sip.JOB_PARAM_URI_KEY, sipMessage
        .getPayload().getURI().toString());
    JobParameters jobParameters = jobParametersBuilder.toJobParameters();
   
    logger.info("Transforming job launch request {} / {}",
        sipMessage.getPayload().getGuid(),
        sipMessage.getPayload().getURI().toString()
        );
View Full Code Here

Examples of org.springframework.batch.core.JobParametersBuilder.toJobParameters()

    }

    JobParametersBuilder jobParametersBuilder = new JobParametersBuilder();
    jobParametersBuilder.addString("GUID", guid);
    jobParametersBuilder.addString("URI", uri);
    JobParameters jobParameters = jobParametersBuilder.toJobParameters();
   
    Job job = null;
    try {
      job = jobLocator.getJob("batchIngestJob");
    } catch (NoSuchJobException e) {
View Full Code Here

Examples of org.springframework.batch.core.JobParametersBuilder.toJobParameters()

      } else {
        log.debug("JobDataMap contains values which are not job parameters (ignoring).");
      }
    }

    return builder.toJobParameters();
  }

}
View Full Code Here

Examples of org.springframework.batch.core.JobParametersBuilder.toJobParameters()

                        logger.debug("Trigger a new job for a new email, type: " + addressGeolocMessageJms.getGeolocType());
                    }

                    JobParametersBuilder jobParametersBuilder = new JobParametersBuilder();
                    jobParametersBuilder.addDate("date", new Date());
                    JobParameters params = jobParametersBuilder.toJobParameters();
                    jobLauncher.run(gelocJob, params);
                }
            }
           
        } catch (JMSException e) {
View Full Code Here

Examples of org.springframework.batch.core.JobParametersBuilder.toJobParameters()

                        logger.debug("Trigger a new job for a new email, type: " + emailnotificationMessageJms.getEmailType());
                    }

                    JobParametersBuilder jobParametersBuilder = new JobParametersBuilder();
                    jobParametersBuilder.addDate("date", new Date());
                    JobParameters params = jobParametersBuilder.toJobParameters();
                    jobLauncher.run(emailSyncJob, params);
                }
            }
           
        } catch (JMSException e) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.