@Controller @RequestMapping(value="/jobs") @ExposesResourceFor(value=JobDefinitionResource.class) public class JobsController extends XDController<JobDefinition,JobDefinitionResourceAssembler,JobDefinitionResource>
XDController.QueryOptions
Constructor and Description |
---|
JobsController(JobDeployer jobDeployer,
JobDefinitionRepository jobDefinitionRepository) |
Modifier and Type | Method and Description |
---|---|
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.
|
JobDefinitionResource |
save(java.lang.String name,
java.lang.String definition,
boolean deploy)
Create a new resource definition.
|
delete, deleteAll, deploy, display, getDeployer, listValues, undeploy, undeployAll
@Autowired public JobsController(JobDeployer jobDeployer, JobDefinitionRepository jobDefinitionRepository)
@RequestMapping(value="/definitions", method=POST) @ResponseStatus(value=CREATED) @ResponseBody public JobDefinitionResource save(@RequestParam(value="name") java.lang.String name, @RequestParam(value="definition") java.lang.String definition, @RequestParam(value="deploy",defaultValue="true") boolean deploy)
XDController
save
in class XDController<JobDefinition,JobDefinitionResourceAssembler,JobDefinitionResource>
name
- The name of the entity to create (required)definition
- The entity definition, expressed in the XD DSL (required)@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)
protected JobDefinition createDefinition(java.lang.String name, java.lang.String definition)
createDefinition
in class XDController<JobDefinition,JobDefinitionResourceAssembler,JobDefinitionResource>