Exemplo n.º 1
0
 /**
  * Request removal of an existing resource definition (stream or job).
  *
  * @param name the name of an existing definition (required)
  */
 @RequestMapping(value = "/definitions/{name}", method = RequestMethod.DELETE)
 @ResponseStatus(HttpStatus.OK)
 public void delete(@PathVariable("name") String name) throws Exception {
   super.delete(name);
   if (moduleDefinitionService.findDefinition(
           ComposedJobUtil.getComposedJobModuleName(name), ModuleType.job)
       != null) {
     moduleDefinitionService.delete(
         ComposedJobUtil.getComposedJobModuleName(name), ModuleType.job);
   }
 }
Exemplo n.º 2
0
 /** Request removal of all definitions. */
 @RequestMapping(value = "/definitions", method = RequestMethod.DELETE)
 @ResponseStatus(HttpStatus.OK)
 public void deleteAll() throws Exception {
   Iterable<JobDefinition> jobDefinitions = deployer.findAll();
   super.deleteAll();
   for (JobDefinition jobDefinition : jobDefinitions) {
     if (moduleDefinitionService.findDefinition(
             ComposedJobUtil.getComposedJobModuleName(jobDefinition.getName()), ModuleType.job)
         != null) {
       moduleDefinitionService.delete(
           ComposedJobUtil.getComposedJobModuleName(jobDefinition.getName()), ModuleType.job);
     }
   }
 }