Package com.atlassian.bamboo.variable
Interface VariableContext
- All Superinterfaces:
ImmutableVariableContext
,Serializable
- All Known Implementing Classes:
VariableContextImpl
A bag for all variable related data inside
CommonContext
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addLocalVariable
(@NotNull String key, @NotNull String value) Add generated local (a.k.a CUSTOM) variable to this context.void
addResultVariable
(@NotNull String key, @NotNull String value) Add generated result variable to this context.@NotNull Map<String,
VariableSubstitutionContext> void
removeLocalVariable
(@NotNull String key) Methods inherited from interface com.atlassian.bamboo.variable.ImmutableVariableContext
getEffectiveVariables, getInitialState, getOriginalVariables, getParentContext, getPasswordVariables, getResultVariables
-
Method Details
-
addLocalVariable
Add generated local (a.k.a CUSTOM) variable to this context. Local variables are only accessible from this context and are not persisted. Local variables hide any existing variables (but their value is not changed). However if you define a result variable with the same key after defining local variable, local variable will be removed. Calling this method second time with the same key assigns new value to the variable.- Since:
- 5.7
-
addResultVariable
Add generated result variable to this context. Result variables are persisted with the result and are available in subsequent stages of the plan and in deployment version created from a result. Result variables hide any global or plan variables (but their value is not changed). If a local variable exists with the same key, it will be removed. Calling this method second time with the same key assigns new value to the variable.- Parameters:
key
-value
-- Since:
- 5.7
-
getSubstitutions
- Returns:
- variables used in current build
-
removeLocalVariable
-