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
ConstructorsConstructorDescriptionTapOnDestinationRecoveryStrategy(StreamDefinitionRepository streamDefinitionRepository, StreamDefinitionService streamDefinitionService) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddProposals(String dsl, org.springframework.cloud.dataflow.core.dsl.ParseException exception, int detailLevel, List<CompletionProposal> collector) Perform code completion by adding proposals to theproposalslist.booleanshouldTrigger(String dslStart, Exception exception) Whether this completion should be triggered.
-
Constructor Details
-
TapOnDestinationRecoveryStrategy
public TapOnDestinationRecoveryStrategy(StreamDefinitionRepository streamDefinitionRepository, StreamDefinitionService streamDefinitionService)
-
-
Method Details
-
shouldTrigger
Description copied from interface:RecoveryStrategyWhether this completion should be triggered.- Specified by:
shouldTriggerin interfaceRecoveryStrategy<org.springframework.cloud.dataflow.core.dsl.ParseException>- Parameters:
dslStart- the partial DSL textexception- 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:RecoveryStrategyPerform code completion by adding proposals to theproposalslist.- Specified by:
addProposalsin interfaceRecoveryStrategy<org.springframework.cloud.dataflow.core.dsl.ParseException>- Parameters:
dsl- the partial DSL textexception- the exception thrown when parsing the DSL textdetailLevel- 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
-