org.springframework.cloud.dataflow.server.controller

## Class ToolsController

- java.lang.Object
- - org.springframework.cloud.dataflow.server.controller.ToolsController

-     @RestController
       @RequestMapping(value="/tools")
       @Validated
       @ExposesResourceFor(value=TaskToolsResource.class)
      public class ToolsController
      extends Object

  A controller for integrating with frontend tools.
  Author:
    Andy Clement

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ToolsController()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `TaskToolsResource` | `convertTaskGraphToText(org.springframework.cloud.dataflow.core.dsl.graph.Graph graph)` Convert a graph format into DSL text format.
    `TaskToolsResource` | `parseTaskTextToGraph(Map<String,String> definition)` Parse a task definition into a graph structure.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ToolsController

          public ToolsController()

  - ### Method Detail

    - #### parseTaskTextToGraph

          @RequestMapping(value="/parseTaskTextToGraph",
                          method=POST)
          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

          @RequestMapping(value="/convertTaskGraphToText",
                          method=POST)
          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

Copyright © 2021 Pivotal Software, Inc.. All rights reserved.