org.springframework.cloud.dataflow.server.controller

## Class CompletionController

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

-     @RestController
       @Validated
       @RequestMapping(value="/completions")
       @ExposesResourceFor(value=CompletionProposalsResource.class)
      public class CompletionController
      extends Object

  Exposes the DSL completion features of `StreamCompletionProvider` and `TaskCompletionProvider` as a REST API.
  Author:
    Eric Bottard, Andy Clement

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `CompletionController(StreamCompletionProvider completionProvider, TaskCompletionProvider taskCompletionProvider)` Create a controller for the provided `StreamCompletionProvider` and `TaskCompletionProvider`.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `CompletionProposalsResource` | `completions(String start, @Min(value=1L,message="The provided detail level must be greater than zero.") int detailLevel)` Return a list of possible completions given a prefix string that the user has started typing.
    `CompletionProposalsResource` | `taskCompletions(String start, @Min(value=1L,message="The provided detail level must be greater than zero.") int detailLevel)` Return a list of possible completions given a prefix string that the user has started typing.

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

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

- - ### Constructor Detail

    - #### CompletionController

          public CompletionController(StreamCompletionProvider completionProvider,
                                      TaskCompletionProvider taskCompletionProvider)

      Create a controller for the provided `StreamCompletionProvider` and `TaskCompletionProvider`.
      Parameters:
        `completionProvider` - the stream completion provider
        `taskCompletionProvider` - the task completion provider

  - ### Method Detail

    - #### completions

          @RequestMapping(value="/stream")
          public CompletionProposalsResource completions(@RequestParam(value="start")
                                                                                          String start,
                                                                                          @RequestParam(value="detailLevel",defaultValue="1") @Min(value=1L,message="The provided detail level must be greater than zero.")
                                                                                          @Min(value=1L,message="The provided detail level must be greater than zero.") int detailLevel)

      Return a list of possible completions given a prefix string that the user has started typing.
      Parameters:
        `start` - the amount of text written so far
        `detailLevel` - the level of detail the user wants in completions, starting at 1. Higher values request more detail, with values typically in the range [1..5]
      Returns:
        the list of completion proposals

    - #### taskCompletions

          @RequestMapping(value="/task")
          public CompletionProposalsResource taskCompletions(@RequestParam(value="start")
                                                                                            String start,
                                                                                            @RequestParam(value="detailLevel",defaultValue="1") @Min(value=1L,message="The provided detail level must be greater than zero.")
                                                                                            @Min(value=1L,message="The provided detail level must be greater than zero.") int detailLevel)

      Return a list of possible completions given a prefix string that the user has started typing.
      Parameters:
        `start` - the amount of text written so far
        `detailLevel` - the level of detail the user wants in completions, starting at 1. Higher values request more detail, with values typically in the range [1..5]
      Returns:
        the list of completion proposals

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