Class ToolsController
java.lang.Object
org.springframework.cloud.dataflow.server.controller.ToolsController
@RestController
@RequestMapping("/tools")
@Validated
@ExposesResourceFor(TaskToolsResource.class)
public class ToolsController
extends Object
A controller for integrating with frontend tools.
- Author:
- Andy Clement
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionconvertTaskGraphToText
(org.springframework.cloud.dataflow.core.dsl.graph.Graph graph) Convert a graph format into DSL text format.parseTaskTextToGraph
(Map<String, String> definition) Parse a task definition into a graph structure.
-
Constructor Details
-
ToolsController
public ToolsController()
-
-
Method Details
-
parseTaskTextToGraph
@PostMapping("/parseTaskTextToGraph") public TaskToolsResource parseTaskTextToGraph(@RequestBody Map<String, String> definition) Parse a task definition into a graph structure. The definition map is expected to have a 'dsl' key containing the composed task DSL and a 'name' key indicating the name of the composed task.- Parameters:
definition
- the map containing the task definition DSL and task name- Returns:
- a resource with the graph property set
-
convertTaskGraphToText
@PostMapping("/convertTaskGraphToText") public TaskToolsResource convertTaskGraphToText(@RequestBody org.springframework.cloud.dataflow.core.dsl.graph.Graph graph) Convert a graph format into DSL text format.- Parameters:
graph
- the Flo Graph- Returns:
- a resource with the dsl property set
-