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 Details

  • Method Details

    • 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