org.springframework.cloud.dataflow.rest.client

## Class CompletionTemplate

- java.lang.Object
- - org.springframework.cloud.dataflow.rest.client.CompletionTemplate

- All Implemented Interfaces:
    CompletionOperations

      public class CompletionTemplate
      extends Object
      implements CompletionOperations

  Implementation of `CompletionOperations` that uses a `RestTemplate` to issue commands to the Data Flow server.
  Author:
    Eric Bottard

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `CompletionTemplate(org.springframework.web.client.RestTemplate restTemplate, org.springframework.hateoas.Link streamLink, org.springframework.hateoas.Link taskLink)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `CompletionProposalsResource` | `streamCompletions(String prefix, int levelOfDetail)` Return the list of streamCompletions that are compatible with the given DSL prefix.
    `CompletionProposalsResource` | `taskCompletions(String prefix, int levelOfDetail)` Return the list of taskCompletions that are compatible with the given DSL prefix.

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

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

- - ### Constructor Detail

    - #### CompletionTemplate

          public CompletionTemplate(org.springframework.web.client.RestTemplate restTemplate,
                                    org.springframework.hateoas.Link streamLink,
                                    org.springframework.hateoas.Link taskLink)

  - ### Method Detail

    - #### streamCompletions

          public CompletionProposalsResource streamCompletions(String prefix,
                                                               int levelOfDetail)

      Description copied from interface: `CompletionOperations`
      Return the list of streamCompletions that are compatible with the given DSL prefix.
      Specified by:
        `streamCompletions` in interface `CompletionOperations`
      Parameters:
        `prefix` - the provided prefix value from DSL
        `levelOfDetail` - integer value that specifies the level of detail user wants in stream completions
      Returns:
        the stream completion proposals for the given DSL prefix

    - #### taskCompletions

          public CompletionProposalsResource taskCompletions(String prefix,
                                                             int levelOfDetail)

      Description copied from interface: `CompletionOperations`
      Return the list of taskCompletions that are compatible with the given DSL prefix.
      Specified by:
        `taskCompletions` in interface `CompletionOperations`
      Parameters:
        `prefix` - the provided prefix value from DSL
        `levelOfDetail` - integer value that specifies the level of detail user wants in task completions
      Returns:
        the task completion proposals for the given DSL prefix

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