com.atlassian.bamboo.v2.build
Class BaseConfigurablePlugin

java.lang.Object
  extended by com.atlassian.bamboo.v2.build.BaseConfigurablePlugin
All Implemented Interfaces:
BambooPluginModule, ConfigurablePlugin
Direct Known Subclasses:
AutoLabelBuildCompleteAction, BaseConfigurableBuildPlugin, BuildExpiryPerPlanPlugin, BuildLabeller, BuildMonitoringPerPlanPlugin

public abstract class BaseConfigurablePlugin
extends java.lang.Object
implements ConfigurablePlugin

Helper class that allows you to


Field Summary
protected  com.atlassian.plugin.ModuleDescriptor moduleDescriptor
           
protected  TemplateRenderer templateRenderer
           
 
Constructor Summary
BaseConfigurablePlugin()
           
 
Method Summary
 void addDefaultValues(BuildConfiguration buildConfiguration)
          Extension point for adding default values to the form for #getEditHtml()
 void customizeBuildRequirements(BuildConfiguration buildConfiguration, RequirementSet requirementSet)
          Extension point for adding/customizing requiremnents when editing a build's builder configuration.
 java.lang.String getEditHtml(BuildConfiguration buildConfiguration, Build build)
          Returns HTML that represents the form fragment for editing the repository.
 java.lang.String getViewHtml(Build build)
          Returns the HTML that represents the view of the repository configuration
 void init(com.atlassian.plugin.ModuleDescriptor moduleDescriptor)
          Initialises the Plugin with the plugin module descriptor
protected  void populateContextForEdit(java.util.Map<java.lang.String,java.lang.Object> context, BuildConfiguration buildConfiguration, Build build)
           
protected  void populateContextForView(java.util.Map<java.lang.String,java.lang.Object> context, Build build)
           
 void prepareConfigObject(BuildConfiguration buildConfiguration)
          Do any preprocessing work before validation occurs
 void setTemplateRenderer(TemplateRenderer templateRenderer)
           
 ErrorCollection validate(BuildConfiguration buildConfiguration)
          Validates the properties in the BuildConfiguration object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

templateRenderer

protected TemplateRenderer templateRenderer

moduleDescriptor

protected com.atlassian.plugin.ModuleDescriptor moduleDescriptor
Constructor Detail

BaseConfigurablePlugin

public BaseConfigurablePlugin()
Method Detail

init

public void init(@NotNull
                 com.atlassian.plugin.ModuleDescriptor moduleDescriptor)
Description copied from interface: ConfigurablePlugin
Initialises the Plugin with the plugin module descriptor

Specified by:
init in interface ConfigurablePlugin

addDefaultValues

public void addDefaultValues(@NotNull
                             BuildConfiguration buildConfiguration)
Description copied from interface: ConfigurablePlugin
Extension point for adding default values to the form for #getEditHtml()

Specified by:
addDefaultValues in interface ConfigurablePlugin
Parameters:
buildConfiguration - - @NotNull

prepareConfigObject

public void prepareConfigObject(@NotNull
                                BuildConfiguration buildConfiguration)
Description copied from interface: ConfigurablePlugin
Do any preprocessing work before validation occurs

Specified by:
prepareConfigObject in interface ConfigurablePlugin
Parameters:
buildConfiguration - - @NotNull

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
Parameters:
buildConfiguration - - @NotNull
Returns:
ErrorCollection keyed by the field name. @NotNull

customizeBuildRequirements

public void customizeBuildRequirements(@NotNull
                                       BuildConfiguration buildConfiguration,
                                       @NotNull
                                       RequirementSet requirementSet)
Description copied from interface: ConfigurablePlugin
Extension point for adding/customizing requiremnents when editing a build's builder configuration.

Specified by:
customizeBuildRequirements in interface ConfigurablePlugin

getViewHtml

@Nullable
public java.lang.String getViewHtml(@NotNull
                                             Build build)
Description copied from interface: ConfigurablePlugin
Returns the HTML that represents the view of the repository configuration

Specified by:
getViewHtml in interface ConfigurablePlugin
Returns:
HTML string. May be null.

populateContextForView

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

getEditHtml

@Nullable
public java.lang.String getEditHtml(@NotNull
                                             BuildConfiguration buildConfiguration,
                                             @NotNull
                                             Build build)
Description copied from interface: ConfigurablePlugin
Returns HTML that represents the form fragment for editing the repository. No opening and closing form tags are required.

Specified by:
getEditHtml in interface ConfigurablePlugin
Returns:
HTMK string. May be null.

populateContextForEdit

protected void populateContextForEdit(@NotNull
                                      java.util.Map<java.lang.String,java.lang.Object> context,
                                      @NotNull
                                      BuildConfiguration buildConfiguration,
                                      @NotNull
                                      Build build)

setTemplateRenderer

public void setTemplateRenderer(TemplateRenderer templateRenderer)


Copyright © 2009 Atlassian Pty Ltd. All Rights Reserved.