com.atlassian.bamboo.v2.trigger
Class PluginTriggerBuildDetectionAction

java.lang.Object
  extended by com.atlassian.bamboo.v2.trigger.PluginTriggerBuildDetectionAction
All Implemented Interfaces:
BuildDetectionAction, ConditionalBuildDetectionAction, UserInitiatedBuildDetectionAction

public class PluginTriggerBuildDetectionAction
extends java.lang.Object
implements UserInitiatedBuildDetectionAction, ConditionalBuildDetectionAction


Constructor Summary
PluginTriggerBuildDetectionAction(PlanVcsRevisionHistoryService planVcsRevisionHistoryService, BuildNumberGeneratorService buildNumberGenerator, VariableDefinitionManager variableDefinitionManager, ImmutableChain chain, PlanExecutionConfig planExecutionConfig, TriggerReason triggerReason, PlanTrigger buildTrigger, java.util.Map<java.lang.String,java.lang.String> params, java.util.Map<java.lang.String,java.lang.String> variables)
           
 
Method Summary
 BuildDetectionResult createBuildContext()
          Actual creation of a BuildContext.
 PlanExecutionConfig getPlanExecutionConfig()
          Controls how plan execution would be resumed If null, normal plan execution would be performed (new build starting on first stage)
 com.atlassian.fugue.Pair<java.lang.Boolean,ErrorCollection> testIfBuildShouldStart()
          Method that should test if chain should be started.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PluginTriggerBuildDetectionAction

public PluginTriggerBuildDetectionAction(@NotNull
                                         PlanVcsRevisionHistoryService planVcsRevisionHistoryService,
                                         @NotNull
                                         BuildNumberGeneratorService buildNumberGenerator,
                                         @NotNull
                                         VariableDefinitionManager variableDefinitionManager,
                                         @NotNull
                                         ImmutableChain chain,
                                         @Nullable
                                         PlanExecutionConfig planExecutionConfig,
                                         @NotNull
                                         TriggerReason triggerReason,
                                         @NotNull
                                         PlanTrigger buildTrigger,
                                         @NotNull
                                         java.util.Map<java.lang.String,java.lang.String> params,
                                         @NotNull
                                         java.util.Map<java.lang.String,java.lang.String> variables)
Method Detail

testIfBuildShouldStart

public com.atlassian.fugue.Pair<java.lang.Boolean,ErrorCollection> testIfBuildShouldStart()
Description copied from interface: ConditionalBuildDetectionAction
Method that should test if chain should be started. It's OK for this method to take some time. Example implementation is VCS change detection. The method should not produce BuildContext (even though BuildDetectionResult has such field) but it should perform all time consuming data gathering required to do so in subsequent call to ConditionalBuildDetectionAction.createBuildContext()

Specified by:
testIfBuildShouldStart in interface ConditionalBuildDetectionAction

createBuildContext

@NotNull
public BuildDetectionResult createBuildContext()
Description copied from interface: ConditionalBuildDetectionAction
Actual creation of a BuildContext. Should be as fast as possible. If previous call to ConditionalBuildDetectionAction.testIfBuildShouldStart() decided that the build should start, this method is expected to produce BuildDetectionResult containing valid BuildContext

Specified by:
createBuildContext in interface ConditionalBuildDetectionAction

getPlanExecutionConfig

public PlanExecutionConfig getPlanExecutionConfig()
Description copied from interface: UserInitiatedBuildDetectionAction
Controls how plan execution would be resumed If null, normal plan execution would be performed (new build starting on first stage)

Specified by:
getPlanExecutionConfig in interface UserInitiatedBuildDetectionAction
Returns:
planExecutionConfig


Copyright © 2013 Atlassian Software Systems Pty Ltd. All Rights Reserved.