public interface VariableSubstitutor
Modifier and Type | Method and Description |
---|---|
void |
addLocalVariable(String key,
String value)
Add a local variable to current context.
|
Set<String> |
findAllVariables(String variable)
Given a string, and a
Map of variables (variable -> value), all patterns in the string array
matching ${bamboo.<variable>} will be substituted with the value. |
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
|
Map<String,VariableDefinitionContext> |
getVariableContexts()
Get all variables in current context
|
String |
removeAllVariables(String value)
Given a string, remove all variable patterns.
|
String |
substituteString(String value)
Substitutes variables in the input string with their values using data from existing state.
|
@Contract(value="null -> null; !null -> !null") @Nullable String substituteString(@Nullable String value)
value
- input string@NotNull Set<String> findAllVariables(@Nullable String variable)
Map
of variables (variable -> value), all patterns in the string array
matching ${bamboo.<variable>} will be substituted with the value.variable
- String value to be analyzed@NotNull String removeAllVariables(@NotNull String value)
value
- string values to be analyzedvoid addLocalVariable(@NotNull String key, @NotNull String value)
key
- value
- @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 © 2020 Atlassian Software Systems Pty Ltd. All rights reserved.