com.atlassian.bamboo.chains
Interface ChainResultManager

All Known Implementing Classes:
ChainResultManagerImpl

public interface ChainResultManager

Chain specific result manager Not for use by plugin developers


Method Summary
 ChainStateResult create(Chain chain, BuildContext chainBuildContext, java.util.Map<ChainStage,java.util.Map<Job,BuildContext>> jobBuildContexts, java.util.Collection<ChainStage> stageToExecute)
          Creates a ChainState from Chain and BuildContext and reports any errors
 long getAverageProgressDurationForStages(Chain chain, java.util.Collection<ChainStageResult> stageStates, int numberOfResults)
          Calculates average duration of provided stages execution
 ChainStateResult updateForContinuedBuild(BuildContext chainBuildContext, java.util.Collection<BuildContext> jobBuildContexts, PlanExecutionConfig planExecutionConfig)
          Creates a ChainState for build already executed and stopped on manual stage of failed
 void updateStateToInProgress(PlanResultKey chainResultKey, java.util.Date startDate)
           
 

Method Detail

create

@NotNull
ChainStateResult create(@NotNull
                                Chain chain,
                                @NotNull
                                BuildContext chainBuildContext,
                                @NotNull
                                java.util.Map<ChainStage,java.util.Map<Job,BuildContext>> jobBuildContexts,
                                @NotNull
                                java.util.Collection<ChainStage> stageToExecute)
Creates a ChainState from Chain and BuildContext and reports any errors

Parameters:
chain -
chainBuildContext -
jobBuildContexts -
Returns:
chainResultState

updateStateToInProgress

void updateStateToInProgress(@NotNull
                             PlanResultKey chainResultKey,
                             @NotNull
                             java.util.Date startDate)
Parameters:
chainResultKey -
startDate -

updateForContinuedBuild

@NotNull
ChainStateResult updateForContinuedBuild(@NotNull
                                                 BuildContext chainBuildContext,
                                                 @NotNull
                                                 java.util.Collection<BuildContext> jobBuildContexts,
                                                 PlanExecutionConfig planExecutionConfig)
Creates a ChainState for build already executed and stopped on manual stage of failed

Parameters:
chainBuildContext -
jobBuildContexts -
planExecutionConfig - - controls the continue/restart execution
Returns:

getAverageProgressDurationForStages

long getAverageProgressDurationForStages(@NotNull
                                         Chain chain,
                                         @NotNull
                                         java.util.Collection<ChainStageResult> stageStates,
                                         int numberOfResults)
Calculates average duration of provided stages execution

Parameters:
chain -
stageStates - stages for current execution of plan included in calculation
numberOfResults - number of previous executions included in calculations
Returns:


Copyright © 2011 Atlassian. All Rights Reserved.