com.atlassian.bamboo.events
Class DefaultBuildEventListener

java.lang.Object
  extended by com.atlassian.bamboo.events.DefaultBuildEventListener
All Implemented Interfaces:
BuildEventListener
Direct Known Subclasses:
BuildArtifactCopier, BuildNumberStamper, DefaultEmailBuildResultsService, DependencyBuilder, RssBuildFeedService, XmppBuildNotifier

public class DefaultBuildEventListener
extends Object
implements BuildEventListener

This class provides a default implementation of the BuildEventListener interface.


Field Summary
protected  BuildManager buildManager
           
 
Fields inherited from interface com.atlassian.bamboo.event.BuildEventListener
DISABLE_NOTIFICATION_SYSTEM_PROPERTY
 
Constructor Summary
DefaultBuildEventListener()
           
 
Method Summary
 BuildManager getBuildManager()
           
protected  BuildState getPreviousBuildState(BuildResults buildResults, Build build)
           
protected  String getServerBaseUrl()
          Various Event Listeners need to know the server's base url.
 void onBuildComplete(Build build, BuildResults buildResults)
          Be notified when a build build has completed.
 void onBuildStart(Build build, long buildNumber)
          Be notified when a build build has started

The default behaviour is to do nothing

 void onDeletedBuild(Build build)
          Be notified when a build has been removed from Bamboo
 void onDeletedBuildResult(Build build, long buildNumber)
          Be notified when a build has been removed from Bamboo
 void onNewBuild(Build build)
          Be notified when a new build is added to Bamboo.
 void setBuildManager(BuildManager buildManager)
           
protected  boolean systemHasBeenConfigured()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

buildManager

protected BuildManager buildManager
Constructor Detail

DefaultBuildEventListener

public DefaultBuildEventListener()
Method Detail

onNewBuild

public void onNewBuild(Build build)
Be notified when a new build is added to Bamboo.

The default behaviour is to do nothing

Specified by:
onNewBuild in interface BuildEventListener
Parameters:
build - The new build.

onDeletedBuild

public void onDeletedBuild(Build build)
                    throws Exception
Be notified when a build has been removed from Bamboo

Specified by:
onDeletedBuild in interface BuildEventListener
Parameters:
build - The build about to get zapped
Throws:
Exception - A generic failure

onDeletedBuildResult

public void onDeletedBuildResult(Build build,
                                 long buildNumber)
Be notified when a build has been removed from Bamboo

Specified by:
onDeletedBuildResult in interface BuildEventListener
Parameters:
build - The build who's build is about to be zapped
buildNumber - The build number

onBuildStart

public void onBuildStart(Build build,
                         long buildNumber)
                  throws Exception
Be notified when a build build has started

The default behaviour is to do nothing

Specified by:
onBuildStart in interface BuildEventListener
Parameters:
build - The build being built
buildNumber - The build number
Throws:
Exception - A generic failure

onBuildComplete

public void onBuildComplete(Build build,
                            BuildResults buildResults)
                     throws Exception
Be notified when a build build has completed.

The default behaviour is to do nothing

Specified by:
onBuildComplete in interface BuildEventListener
Parameters:
build - The build
buildResults - The output from the build
Throws:
Exception - A generic failure

getServerBaseUrl

protected String getServerBaseUrl()
Various Event Listeners need to know the server's base url.

Returns:
The system's base url

systemHasBeenConfigured

protected boolean systemHasBeenConfigured()

getPreviousBuildState

protected BuildState getPreviousBuildState(BuildResults buildResults,
                                           Build build)

getBuildManager

public BuildManager getBuildManager()

setBuildManager

public void setBuildManager(BuildManager buildManager)


Copyright © 2006 Atlassian Software Systems. All Rights Reserved.