@ResponseBody
public JobDefinitionResource save(@RequestParam("name") String name, @RequestParam("definition") String definition,
@RequestParam(value = "deploy", defaultValue = "true") boolean deploy) {
// Verify if the batch job repository already has the job with the same name.
if (distributedJobLocator.getJobNames().contains(name)) {
throw new BatchJobAlreadyExistsException(name);
}
return super.save(name, definition, deploy);
}