@RestController @RequestMapping(value="/tasks/definitions") @ExposesResourceFor(value=TaskDefinitionResource.class) public class TaskDefinitionController extends Object
TaskDefinition
. This includes CRUD operations.Constructor and Description |
---|
TaskDefinitionController(org.springframework.cloud.dataflow.aggregate.task.AggregateTaskExplorer taskExplorer,
TaskDefinitionRepository repository,
TaskSaveService taskSaveService,
TaskDeleteService taskDeleteService,
TaskDefinitionAssemblerProvider<? extends TaskDefinitionResource> taskDefinitionAssemblerProvider)
Creates a
TaskDefinitionController that delegates
CRUD operations to the provided TaskDefinitionRepository
task status checks to the provided TaskLauncher
|
Modifier and Type | Method and Description |
---|---|
void |
destroyAll()
Delete all task from the repository.
|
void |
destroyTask(String name,
Boolean cleanup)
Delete the task from the repository so that it can no longer be executed.
|
TaskDefinitionResource |
display(String name,
boolean manifest)
Return a given task definition resource.
|
org.springframework.hateoas.PagedModel<? extends TaskDefinitionResource> |
list(org.springframework.data.domain.Pageable pageable,
String search,
String taskName,
String description,
boolean manifest,
String dslText,
org.springframework.data.web.PagedResourcesAssembler<TaskExecutionAwareTaskDefinition> assembler)
Return a page-able list of
TaskDefinitionResource defined tasks. |
TaskDefinitionResource |
save(String name,
String dsl,
String description)
Register a task definition for future execution.
|
public TaskDefinitionController(org.springframework.cloud.dataflow.aggregate.task.AggregateTaskExplorer taskExplorer, TaskDefinitionRepository repository, TaskSaveService taskSaveService, TaskDeleteService taskDeleteService, TaskDefinitionAssemblerProvider<? extends TaskDefinitionResource> taskDefinitionAssemblerProvider)
TaskDefinitionController
that delegates
TaskDefinitionRepository
TaskLauncher
taskExplorer
- used to look up TaskExecutions.repository
- the repository this controller will use for task CRUD operations.taskSaveService
- handles Task saving related operations.taskDeleteService
- handles Task deletion related operations.taskDefinitionAssemblerProvider
- the task definition assembler provider to use.@RequestMapping(value="", method=POST) public TaskDefinitionResource save(@RequestParam(value="name") String name, @RequestParam(value="definition") String dsl, @RequestParam(value="description",defaultValue="") String description)
name
- name the name of the taskdsl
- DSL definition for the taskdescription
- description of the task definition@RequestMapping(value="/{name}", method=DELETE) @ResponseStatus(value=OK) public void destroyTask(@PathVariable(value="name") String name, @RequestParam(required=false) Boolean cleanup)
name
- name of the task to be deletedcleanup
- optional cleanup indicator.@RequestMapping(value="", method=DELETE) @ResponseStatus(value=OK) public void destroyAll()
@RequestMapping(value="", method=GET) @ResponseStatus(value=OK) public org.springframework.hateoas.PagedModel<? extends TaskDefinitionResource> list(org.springframework.data.domain.Pageable pageable, @RequestParam(required=false) @Deprecated String search, @RequestParam(required=false) String taskName, @RequestParam(required=false) String description, @RequestParam(required=false) boolean manifest, @RequestParam(required=false) String dslText, org.springframework.data.web.PagedResourcesAssembler<TaskExecutionAwareTaskDefinition> assembler)
TaskDefinitionResource
defined tasks.pageable
- page-able collection of TaskDefinitionResource
search
- optional findByTaskNameContains parameter (Deprecated: please use taskName instead)taskName
- optional findByTaskNameContains parameterdslText
- optional findByDslText parameterdescription
- optional findByDescription parametermanifest
- optional manifest flag to indicate whether the latest task execution requires task manifest updateassembler
- assembler for the TaskDefinition
@RequestMapping(value="/{name}", method=GET) @ResponseStatus(value=OK) public TaskDefinitionResource display(@PathVariable(value="name") String name, @RequestParam(required=false,name="manifest") boolean manifest)
name
- the name of an existing task definition (required)manifest
- indicator to include manifest in response.Copyright © 2024 Pivotal Software, Inc.. All rights reserved.