com.atlassian.bamboo.build.monitoring
Class BuildMonitoringPerPlanPlugin

java.lang.Object
  extended by com.atlassian.bamboo.v2.build.BaseConfigurablePlugin
      extended by com.atlassian.bamboo.build.monitoring.BuildMonitoringPerPlanPlugin
All Implemented Interfaces:
CustomBuildProcessorServer, CustomBuildDefinitionTransformer, BambooPluginModule, ConfigurablePlugin, BuildTask, java.util.concurrent.Callable<BuildContext>

public class BuildMonitoringPerPlanPlugin
extends BaseConfigurablePlugin
implements CustomBuildDefinitionTransformer, CustomBuildProcessorServer


Field Summary
 
Fields inherited from class com.atlassian.bamboo.v2.build.BaseConfigurablePlugin
moduleDescriptor, templateRenderer
 
Constructor Summary
BuildMonitoringPerPlanPlugin()
           
 
Method Summary
 BuildContext call()
          Execute the build task.
 void init(BuildContext buildContext)
           
protected  void populateContextForView(java.util.Map<java.lang.String,java.lang.Object> context, Build build)
           
 void setTextProvider(com.opensymphony.xwork.TextProvider textProvider)
           
 void transformBuildDefinition(java.util.Map<java.lang.String,java.lang.Object> configObjects, java.util.Map<java.lang.String,java.lang.String> configParameters, BuildDefinition buildDefinition)
          Implemtors can add their custom objects to the configObjects map.
 ErrorCollection validate(BuildConfiguration buildConfiguration)
          Validates the properties in the BuildConfiguration object.
 
Methods inherited from class com.atlassian.bamboo.v2.build.BaseConfigurablePlugin
addDefaultValues, customizeBuildRequirements, getEditHtml, getViewHtml, init, populateContextForEdit, prepareConfigObject, setTemplateRenderer
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BuildMonitoringPerPlanPlugin

public BuildMonitoringPerPlanPlugin()
Method Detail

validate

@NotNull
public ErrorCollection validate(@NotNull
                                        BuildConfiguration buildConfiguration)
Description copied from interface: ConfigurablePlugin
Validates the properties in the BuildConfiguration object. The name of the properties match those passed in through the form fragments in #getEditHtml() template.

Specified by:
validate in interface ConfigurablePlugin
Overrides:
validate in class BaseConfigurablePlugin
Parameters:
buildConfiguration - - @NotNull
Returns:
ErrorCollection keyed by the field name. @NotNull

transformBuildDefinition

public void transformBuildDefinition(@NotNull
                                     java.util.Map<java.lang.String,java.lang.Object> configObjects,
                                     @NotNull
                                     java.util.Map<java.lang.String,java.lang.String> configParameters,
                                     @NotNull
                                     BuildDefinition buildDefinition)
Description copied from interface: CustomBuildDefinitionTransformer
Implemtors can add their custom objects to the configObjects map. The key should be unqiue to plugin... It's better to be descriptive. It is possible to also updat the buildDefinition directly, but it's not recomended.

Specified by:
transformBuildDefinition in interface CustomBuildDefinitionTransformer
Parameters:
configObjects - - Map - string key, object value. A map to put custom objects intp. @NotNull
configParameters - - Map - String key, string value. These are taken from all fields that begin with "custom."
buildDefinition - - the fully contructed BuildDefinition @NotNull

populateContextForView

protected void populateContextForView(@NotNull
                                      java.util.Map<java.lang.String,java.lang.Object> context,
                                      @NotNull
                                      Build build)
Overrides:
populateContextForView in class BaseConfigurablePlugin

init

public void init(@NotNull
                 BuildContext buildContext)
Specified by:
init in interface BuildTask

call

@NotNull
public BuildContext call()
                  throws java.lang.InterruptedException,
                         java.lang.Exception
Description copied from interface: BuildTask

Execute the build task.

Implementations should regularly check if the calling Thread has been interrupted.

Specified by:
call in interface BuildTask
Specified by:
call in interface java.util.concurrent.Callable<BuildContext>
Throws:
java.lang.InterruptedException - if the calling Thread has been interrupted.
java.lang.Exception - A general exception that will be handled.

setTextProvider

public void setTextProvider(com.opensymphony.xwork.TextProvider textProvider)


Copyright © 2009 Atlassian Pty Ltd. All Rights Reserved.