Class CompletionController
java.lang.Object
org.springframework.cloud.dataflow.server.controller.CompletionController
@RestController
@Validated
@RequestMapping("/completions")
@ExposesResourceFor(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
ConstructorsConstructorDescriptionCompletionController(StreamCompletionProvider completionProvider, TaskCompletionProvider taskCompletionProvider) Create a controller for the providedStreamCompletionProviderandTaskCompletionProvider. -
Method Summary
Modifier and TypeMethodDescriptioncompletions(String start, @jakarta.validation.constraints.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.taskCompletions(String start, @jakarta.validation.constraints.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.
-
Constructor Details
-
CompletionController
public CompletionController(StreamCompletionProvider completionProvider, TaskCompletionProvider taskCompletionProvider) Create a controller for the providedStreamCompletionProviderandTaskCompletionProvider.- Parameters:
completionProvider- the stream completion providertaskCompletionProvider- the task completion provider
-
-
Method Details
-
completions
@RequestMapping("/stream") public CompletionProposalsResource completions(@RequestParam String start, @RequestParam(defaultValue="1") @Min(value=1L,message="The provided detail level must be greater than zero.") @jakarta.validation.constraints.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 fardetailLevel- 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("/task") public CompletionProposalsResource taskCompletions(@RequestParam String start, @RequestParam(defaultValue="1") @Min(value=1L,message="The provided detail level must be greater than zero.") @jakarta.validation.constraints.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 fardetailLevel- 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
-