com.atlassian.bamboo.build
Interface ConditionalBuildDetectionAction

All Superinterfaces:
BuildDetectionAction
All Known Implementing Classes:
ChangeDetectionListenerAction, PluginTriggerBuildDetectionAction

public interface ConditionalBuildDetectionAction
extends BuildDetectionAction

Optional BuildDetectionAction interface that indicates that the action makes a decision if the build should start.


Method Summary
 BuildDetectionResult createBuildContext()
          Actual creation of a BuildContext.
 com.atlassian.fugue.Pair<java.lang.Boolean,ErrorCollection> testIfBuildShouldStart()
          Method that should test if chain should be started.
 

Method Detail

testIfBuildShouldStart

com.atlassian.fugue.Pair<java.lang.Boolean,ErrorCollection> testIfBuildShouldStart()
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 createBuildContext()


createBuildContext

BuildDetectionResult createBuildContext()
Actual creation of a BuildContext. Should be as fast as possible. If previous call to testIfBuildShouldStart() decided that the build should start, this method is expected to produce BuildDetectionResult containing valid BuildContext



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