com.atlassian.bamboo.legacy
Class LegacyTriggeredBuildStrategy

java.lang.Object
  extended by com.atlassian.bamboo.legacy.LegacyAbstractBuildStrategy
      extended by com.atlassian.bamboo.legacy.LegacyTriggeredBuildStrategy
All Implemented Interfaces:
BuildStrategy, ConvertibleFromConfig

public class LegacyTriggeredBuildStrategy
extends LegacyAbstractBuildStrategy

This class lets someone else decide if the build should be built. Could be human, could be a remote SCM trigger....

Author:
Andy and Nick

Constructor Summary
LegacyTriggeredBuildStrategy()
           
 
Method Summary
 void clearTrigger()
          Remove any existing trigger settings
 Collection getChangeList()
          Get the changes that have been detected
 String getDescription()
           
 String getKey()
          A lowercase string key to identify the build strategy
 String getName()
          Returns the display name of the strategy
 void init(Build build)
          Force a repository check when we are initialised just in case there have been checkins while the server was not available.
 boolean isTriggered()
          Will we trigger a build next time we are asked
 boolean requiresBuild(Build build)
          Has the build been triggered
 boolean requiresPreBuildClean()
          No point!
 void triggerBuild()
          Trigger a build next time we're asked
 ErrorCollection validate(BuildConfiguration buildConfiguration)
          Takes in a BuildConfiguration and returns any errors possible
 
Methods inherited from class com.atlassian.bamboo.legacy.LegacyAbstractBuildStrategy
addDefaultValues, getBuildMessage, log, populateFromConfig, setBuildMessage, toConfiguration
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LegacyTriggeredBuildStrategy

public LegacyTriggeredBuildStrategy()
Method Detail

init

public void init(Build build)
Force a repository check when we are initialised just in case there have been checkins while the server was not available.

Specified by:
init in interface BuildStrategy
Overrides:
init in class LegacyAbstractBuildStrategy

getKey

public String getKey()
Description copied from interface: BuildStrategy
A lowercase string key to identify the build strategy

Returns:
String must not be null

getName

public String getName()
Description copied from interface: BuildStrategy
Returns the display name of the strategy

Returns:
String must not be null

getDescription

public String getDescription()
Specified by:
getDescription in interface BuildStrategy
Overrides:
getDescription in class LegacyAbstractBuildStrategy

validate

public ErrorCollection validate(BuildConfiguration buildConfiguration)
Description copied from interface: BuildStrategy
Takes in a BuildConfiguration and returns any errors possible

Specified by:
validate in interface BuildStrategy
Overrides:
validate in class LegacyAbstractBuildStrategy
Parameters:
buildConfiguration - not null
Returns:
ErrorCollection. must not be null

requiresBuild

public boolean requiresBuild(Build build)
                      throws RepositoryException
Has the build been triggered

Parameters:
build - The build
Returns:
True iff the build should be built.
Throws:
RepositoryException

requiresPreBuildClean

public boolean requiresPreBuildClean()
No point!

Returns:
false

getChangeList

public Collection getChangeList()
Get the changes that have been detected

Returns:
The files that have changed

triggerBuild

public void triggerBuild()
Trigger a build next time we're asked


clearTrigger

public void clearTrigger()
Remove any existing trigger settings


isTriggered

public boolean isTriggered()
Will we trigger a build next time we are asked



Copyright © 2006 Atlassian Software Systems. All Rights Reserved.