@Controller @RequestMapping(value="/jobs") @ExposesResourceFor(value=JobDefinitionResource.class) public class JobsController extends XDController<JobDefinition,JobDefinitionResourceAssembler,JobDefinitionResource,Job>
XDController.QueryOptions
deployer
Constructor and Description |
---|
JobsController(JobDeployer jobDeployer,
ModuleDefinitionService moduleDefinitionService) |
Modifier and Type | Method and Description |
---|---|
java.util.Map<java.lang.String,java.util.List<java.lang.String>> |
clean(java.lang.String job,
java.lang.String adminUri,
java.lang.String user,
java.lang.String pw,
java.lang.String vhost,
java.lang.String busPrefix) |
protected JobDefinition |
createDefinition(java.lang.String name,
java.lang.String definition) |
void |
delete(java.lang.String name)
Request removal of an existing resource definition (stream or job).
|
void |
deleteAll()
Request removal of all definitions.
|
org.springframework.hateoas.PagedResources<JobDefinitionResource> |
list(org.springframework.data.domain.Pageable pageable,
org.springframework.data.web.PagedResourcesAssembler<JobDefinition> assembler)
List job definitions.
|
void |
save(java.lang.String name,
java.lang.String definition,
boolean deploy)
Create a new resource definition.
|
cleanRabbitBus, deploy, display, listValues, undeploy, undeployAll
@Autowired public JobsController(JobDeployer jobDeployer, ModuleDefinitionService moduleDefinitionService)
@RequestMapping(value="/definitions", method=POST) @ResponseStatus(value=CREATED) public void save(@RequestParam(value="name") java.lang.String name, @RequestParam(value="definition") java.lang.String definition, @RequestParam(value="deploy",defaultValue="true") boolean deploy) throws java.lang.Exception
XDController
save
in class XDController<JobDefinition,JobDefinitionResourceAssembler,JobDefinitionResource,Job>
name
- The name of the entity to create (required)definition
- The entity definition, expressed in the XD DSL (required)java.lang.Exception
@RequestMapping(value="/definitions/{name}", method=DELETE) @ResponseStatus(value=OK) public void delete(@PathVariable(value="name") java.lang.String name) throws java.lang.Exception
delete
in class XDController<JobDefinition,JobDefinitionResourceAssembler,JobDefinitionResource,Job>
name
- the name of an existing definition (required)java.lang.Exception
@RequestMapping(value="/definitions", method=DELETE) @ResponseStatus(value=OK) public void deleteAll() throws java.lang.Exception
deleteAll
in class XDController<JobDefinition,JobDefinitionResourceAssembler,JobDefinitionResource,Job>
java.lang.Exception
@RequestMapping(value="/definitions", method=GET) @ResponseStatus(value=OK) @ResponseBody public org.springframework.hateoas.PagedResources<JobDefinitionResource> list(org.springframework.data.domain.Pageable pageable, org.springframework.data.web.PagedResourcesAssembler<JobDefinition> assembler)
@ResponseBody @RequestMapping(value="/clean/rabbit/{job}", method=DELETE) @ResponseStatus(value=OK) public java.util.Map<java.lang.String,java.util.List<java.lang.String>> clean(@PathVariable java.lang.String job, @RequestParam(required=false) java.lang.String adminUri, @RequestParam(required=false) java.lang.String user, @RequestParam(required=false) java.lang.String pw, @RequestParam(required=false) java.lang.String vhost, @RequestParam(required=false) java.lang.String busPrefix)
protected JobDefinition createDefinition(java.lang.String name, java.lang.String definition)
createDefinition
in class XDController<JobDefinition,JobDefinitionResourceAssembler,JobDefinitionResource,Job>