Examples of toJobParameters()


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()

                parametersBuilder.addDouble(headerKey, (Double) headerValue);
            } else {
                parametersBuilder.addString(headerKey, headerValue.toString());
            }
        }
        return parametersBuilder.toJobParameters();
    }

}
View Full Code Here

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

  public JobLaunchRequest toRequest(Message<File> message)
  {
    JobParametersBuilder jobParametersBuilder = new JobParametersBuilder();
    jobParametersBuilder.addString(fileParameterName,
        message.getPayload().getAbsolutePath());
    return new JobLaunchRequest(job, jobParametersBuilder.toJobParameters());
  }     
 
}
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);
            }
        }
        JobParameters jobParameters = parametersBuilder.toJobParameters();
        log.debug("Prepared parameters for Spring Batch job: {}", jobParameters);
        return jobParameters;
    }

}
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()

    builder.addString("dontclash", "12");
    Map<String, Object> map = new HashMap<String, Object>();
    map.put(MessageHeaders.REPLY_CHANNEL, "response");
    MessageHeaders headers = new MessageHeaders(map);
    GenericMessage<JobLaunchRequest> trigger = new GenericMessage<JobLaunchRequest>(new JobLaunchRequest(job,
        builder.toJobParameters()), headers);
    requestChannel.send(trigger);
    Message<JobExecution> executionMessage = (Message<JobExecution>) responseChannel.receive(1000);

    assertNotNull("No response received", executionMessage);
    JobExecution execution = executionMessage.getPayload();
View Full Code Here

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

    builder.addString("dontclash", "12");
    Map<String, Object> map = new HashMap<String, Object>();
    map.put(MessageHeaders.REPLY_CHANNEL, "response");
    MessageHeaders headers = new MessageHeaders(map);
    GenericMessage<JobLaunchRequest> trigger = new GenericMessage<JobLaunchRequest>(new JobLaunchRequest(job,
        builder.toJobParameters()), headers);
    requestChannel.send(trigger);
    Message<JobExecution> executionMessage = (Message<JobExecution>) responseChannel.receive(1000);

    assertNotNull("No response received", executionMessage);
    JobExecution execution = executionMessage.getPayload();
View Full Code Here

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

    builder.addString("dontclash", "12");
    Map<String, Object> map = new HashMap<String, Object>();
    map.put(MessageHeaders.REPLY_CHANNEL, "response");
    MessageHeaders headers = new MessageHeaders(map);
    GenericMessage<JobLaunchRequest> trigger = new GenericMessage<JobLaunchRequest>(new JobLaunchRequest(testJob,
        builder.toJobParameters()), headers);
    requestChannel.send(trigger);

    Message<JobExecution> executionMessage = (Message<JobExecution>) responseChannel.receive(1000);

    assertNotNull("No response received", executionMessage);
View Full Code Here

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

      else {
        propertiesBuilder.addString(key, value, identifying);
      }
    }

    return propertiesBuilder.toJobParameters();
  }

  private boolean isIdentifyingKey(String key) {
    boolean identifying = true;
View Full Code Here

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

    builder.addString("dontclash", "12");
    Map<String, Object> map = new HashMap<String, Object>();
    map.put(MessageHeaders.REPLY_CHANNEL, "response");
    MessageHeaders headers = new MessageHeaders(map);
    GenericMessage<JobLaunchRequest> trigger = new GenericMessage<JobLaunchRequest>(new JobLaunchRequest(job,
        builder.toJobParameters()), headers);
    requestChannel.send(trigger);
    Message<JobExecution> executionMessage = (Message<JobExecution>) responseChannel.receive(1000);

    assertNotNull("No response received", executionMessage);
    JobExecution execution = executionMessage.getPayload();
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.