public interface VariableSubstitutor
Modifier and Type | Method and Description |
---|---|
void |
addLocalVariable(@NotNull String key,
@NotNull String value)
Add a local variable to current context.
|
@NotNull Set<String> |
findAllVariables(@Nullable String string)
Finds all variables in the string
|
Map<String,VariableDefinitionContext> |
getBuiltInRepositoryVariablesIfBuildContext()
If current context is releated to a
BuildContext return all the automatic variables related to repositories. |
Map<String,VariableSubstitutionContext> |
getSubstitutedVariables()
Returns all variables used in string substitution during this object's lifetime
|
@NotNull Map<String,VariableDefinitionContext> |
getVariableContexts()
Get all variables in current context
|
@NotNull String |
removeAllVariables(@NotNull String value)
Given a string, remove all variable patterns.
|
@Nullable String |
substituteString(@Nullable String value)
Substitutes variables in the input string with their values using data from existing state.
|
@Contract(value="null -> null; !null -> !null") @Nullable @Nullable String substituteString(@Nullable @Nullable String value)
value
- input string@NotNull @NotNull Set<String> findAllVariables(@Nullable @Nullable String string)
string
- String value to be analyzed@NotNull @NotNull String removeAllVariables(@NotNull @NotNull String value)
value
- string values to be analyzedvoid addLocalVariable(@NotNull @NotNull String key, @NotNull @NotNull String value)
key
- value
- @NotNull @NotNull Map<String,VariableDefinitionContext> getVariableContexts()
Map<String,VariableSubstitutionContext> getSubstitutedVariables()
Map<String,VariableDefinitionContext> getBuiltInRepositoryVariablesIfBuildContext()
BuildContext
return all the automatic variables related to repositories.
Return empty map otherwise.Copyright © 2022 Atlassian Software Systems Pty Ltd. All rights reserved.