/** * Delete the job * @param jobId the job id * @return the delete result */ @RequestMapping(value = "/{jobId}/delete", method = RequestMethod.POST) public JsonResponse deleteJob(@PathVariable("jobId") Long jobId){ // remove the job Response<Boolean> removeResp = serverService.removeJob(jobId); if (!removeResp.isSuccess() || !removeResp.getData()){ return JsonResponse.notOk(messages.get(removeResp.getErr())); } // delete the job Response<Boolean> deleteResp = jobService.deleteJob(jobId); if (!deleteResp.isSuccess() || !deleteResp.getData()){ return JsonResponse.notOk(messages.get(deleteResp.getErr())); } return JsonResponse.ok(); }