@Controller @RequestMapping(value="/jobs") @ExposesResourceFor(value=JobDefinitionResource.class) public class JobsController extends XDController<JobDefinition,JobDefinitionResourceAssembler,JobDefinitionResource,Job>
XDController.QueryOptions
Constructor and Description |
---|
JobsController(JobDeployer jobDeployer) |
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) |
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, delete, deleteAll, deploy, display, listValues, undeploy, undeployAll
@Autowired public JobsController(JobDeployer jobDeployer)
@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", 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>