Class ResultsSummaryVariableAccessorImpl
java.lang.Object
com.atlassian.bamboo.resultsummary.variables.ResultsSummaryVariableAccessorImpl
- All Implemented Interfaces:
ResultsSummaryVariableAccessor
public class ResultsSummaryVariableAccessorImpl
extends Object
implements ResultsSummaryVariableAccessor
-
Constructor Summary
ConstructorDescriptionResultsSummaryVariableAccessorImpl
(ResultsSummaryManager resultsSummaryManager, VariableContextBaselineDao variableContextBaselineDao, CachedPlanManager cachedPlanManager, VariableDefinitionManager variableDefinitionManager) -
Method Summary
Modifier and TypeMethodDescription@NotNull Map<String,
VariableDefinitionContext> calculateCurrentVariablesState
(@NotNull PlanResultKey chainResultKey) Get state of variables at point when execution of the build stopped.@NotNull Map<String,
VariableDefinitionContext> calculateCurrentVariablesState
(@NotNull PlanResultKey chainResultKey, StageIdentifier startingStage) Get state of variables at point when execution of the build stopped.@NotNull Map<String,
VariableDefinitionContext> calculateInitialVariablesState
(@NotNull PlanResultKey chainResultKey) Get state of variables as recorded at the start of the build.@NotNull List<VariableDefinitionContext>
getManualVariables
(@NotNull ChainResultsSummary chainResultsSummary) Get manual variables state from start of this chain result.@NotNull List<VariableDefinitionContext>
getVariableStateForJobResult
(BuildResultsSummary resultsSummary) Get state of all variables at the end of the job.@Nullable VariableContextBaseline
safeGetVariableContextBaseline
(@NotNull PlanResultKey chainResultKey) void
upgradeVariableDataIfNeeded
(@NotNull PlanResultKey chainResultKey)
-
Constructor Details
-
ResultsSummaryVariableAccessorImpl
public ResultsSummaryVariableAccessorImpl(ResultsSummaryManager resultsSummaryManager, VariableContextBaselineDao variableContextBaselineDao, CachedPlanManager cachedPlanManager, VariableDefinitionManager variableDefinitionManager)
-
-
Method Details
-
upgradeVariableDataIfNeeded
- Specified by:
upgradeVariableDataIfNeeded
in interfaceResultsSummaryVariableAccessor
-
calculateInitialVariablesState
@NotNull public @NotNull Map<String,VariableDefinitionContext> calculateInitialVariablesState(@NotNull @NotNull PlanResultKey chainResultKey) Description copied from interface:ResultsSummaryVariableAccessor
Get state of variables as recorded at the start of the build. Includes snapshot of plan and global variables, as well as manual variables set at the start of the build.- Specified by:
calculateInitialVariablesState
in interfaceResultsSummaryVariableAccessor
- Returns:
-
getManualVariables
@NotNull public @NotNull List<VariableDefinitionContext> getManualVariables(@NotNull @NotNull ChainResultsSummary chainResultsSummary) Description copied from interface:ResultsSummaryVariableAccessor
Get manual variables state from start of this chain result.- Specified by:
getManualVariables
in interfaceResultsSummaryVariableAccessor
-
calculateCurrentVariablesState
@NotNull public @NotNull Map<String,VariableDefinitionContext> calculateCurrentVariablesState(@NotNull @NotNull PlanResultKey chainResultKey, StageIdentifier startingStage) Description copied from interface:ResultsSummaryVariableAccessor
Get state of variables at point when execution of the build stopped. Includes initial state of variables modified with all result variables from successful stages and all the variables set at started manual stages. If all stages of chain are complete this is basically final state of the variables.- Specified by:
calculateCurrentVariablesState
in interfaceResultsSummaryVariableAccessor
- Returns:
-
calculateCurrentVariablesState
@NotNull public @NotNull Map<String,VariableDefinitionContext> calculateCurrentVariablesState(@NotNull @NotNull PlanResultKey chainResultKey) Description copied from interface:ResultsSummaryVariableAccessor
Get state of variables at point when execution of the build stopped. Includes initial state of variables modified with all result variables from successful stages and all the variables set at started manual stages. If all stages of chain are complete this is basically final state of the variables.- Specified by:
calculateCurrentVariablesState
in interfaceResultsSummaryVariableAccessor
- Returns:
-
safeGetVariableContextBaseline
@Nullable public @Nullable VariableContextBaseline safeGetVariableContextBaseline(@NotNull @NotNull PlanResultKey chainResultKey) - Specified by:
safeGetVariableContextBaseline
in interfaceResultsSummaryVariableAccessor
-
getVariableStateForJobResult
@NotNull public @NotNull List<VariableDefinitionContext> getVariableStateForJobResult(BuildResultsSummary resultsSummary) Description copied from interface:ResultsSummaryVariableAccessor
Get state of all variables at the end of the job.- Specified by:
getVariableStateForJobResult
in interfaceResultsSummaryVariableAccessor
- Parameters:
resultsSummary
- job result
-