org.springframework.cloud.dataflow.server.completion

## Class TapOnDestinationRecoveryStrategy

- java.lang.Object
- - org.springframework.cloud.dataflow.server.completion.TapOnDestinationRecoveryStrategy

- All Implemented Interfaces:
    RecoveryStrategy<org.springframework.cloud.dataflow.core.dsl.ParseException>

      public class TapOnDestinationRecoveryStrategy
      extends Object
      implements RecoveryStrategy<org.springframework.cloud.dataflow.core.dsl.ParseException>

  Expands constructs that start with : to add stream name and app identifiers. Lives in this package as it needs access to a `StreamDefinitionRepository`.
  Author:
    Eric Bottard, Ilayaperumal Gopinathan

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `TapOnDestinationRecoveryStrategy(StreamDefinitionRepository streamDefinitionRepository, StreamDefinitionService streamDefinitionService)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addProposals(String dsl, org.springframework.cloud.dataflow.core.dsl.ParseException exception, int detailLevel, List<CompletionProposal> collector)` Perform code completion by adding proposals to the `proposals` list.
    `boolean` | `shouldTrigger(String dslStart, Exception exception)` Whether this completion should be triggered.

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

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

- - ### Constructor Detail

    - #### TapOnDestinationRecoveryStrategy

          public TapOnDestinationRecoveryStrategy(StreamDefinitionRepository streamDefinitionRepository,
                                                  StreamDefinitionService streamDefinitionService)

  - ### Method Detail

    - #### shouldTrigger

          public boolean shouldTrigger(String dslStart,
                                       Exception exception)

      Description copied from interface: `RecoveryStrategy`
      Whether this completion should be triggered.
      Specified by:
        `shouldTrigger` in interface `RecoveryStrategy<org.springframework.cloud.dataflow.core.dsl.ParseException>`
      Parameters:
        `dslStart` - the partial DSL text
        `exception` - the exception thrown when parsing the DSL text
      Returns:
        if proposals to complete the DSL should be provided

    - #### addProposals

          public void addProposals(String dsl,
                                   org.springframework.cloud.dataflow.core.dsl.ParseException exception,
                                   int detailLevel,
                                   List<CompletionProposal> collector)

      Description copied from interface: `RecoveryStrategy`
      Perform code completion by adding proposals to the `proposals` list.
      Specified by:
        `addProposals` in interface `RecoveryStrategy<org.springframework.cloud.dataflow.core.dsl.ParseException>`
      Parameters:
        `dsl` - the partial DSL text
        `exception` - the exception thrown when parsing the DSL text
        `detailLevel` - an integer describing the level of detail to include in proposal, starting at 1. Higher values request more detail, with values typically in the range [1..5]
        `collector` - the list of completion proposals to show the user

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