Package com.atlassian.bamboo.v2.build
Class BaseBuildConfigurationAwarePlugin
- java.lang.Object
-
- com.atlassian.bamboo.v2.build.BaseBuildConfigurationAwarePlugin
-
- All Implemented Interfaces:
InitablePluginModule,BambooPluginModule,BuildConfigurationAwarePlugin,RenderableBuildConfiguration
- Direct Known Subclasses:
BaseConfigurablePlugin,ConcurrentBuildsPlanConfigurationPlugin,HungBuildPlanConfigurationPlugin,PlansGreenCondition,SkipTestHistoryConfigurationItem
public class BaseBuildConfigurationAwarePlugin extends Object implements BuildConfigurationAwarePlugin
-
-
Field Summary
Fields Modifier and Type Field Description protected com.atlassian.plugin.ModuleDescriptormoduleDescriptorprotected TemplateRenderertemplateRendererDeprecated.since 6.8 inject your own instance
-
Constructor Summary
Constructors Constructor Description BaseBuildConfigurationAwarePlugin()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidaddDefaultValues(@NotNull BuildConfiguration buildConfiguration)Extension point for adding default values to the form forRenderableBuildConfiguration.getEditHtml(com.atlassian.bamboo.ww2.actions.build.admin.create.BuildConfiguration, com.atlassian.bamboo.plan.Plan)@Nullable StringgetEditHtml(@NotNull BuildConfiguration buildConfiguration, @Nullable Plan plan)Returns HTML that represents the form fragment for editing the repository.protected TemplateRenderergetTemplateRenderer()@Nullable StringgetViewHtml(@NotNull Plan plan)Returns the HTML that represents the view of the repository configurationvoidinit(@NotNull com.atlassian.plugin.ModuleDescriptor moduleDescriptor)Initialises the Plugin with the plugin module descriptorprotected voidpopulateContextForEdit(@NotNull Map<String,Object> context, @NotNull BuildConfiguration buildConfiguration, @Nullable Plan plan)protected voidpopulateContextForView(@NotNull Map<String,Object> context, @NotNull Plan plan)voidprepareConfigObject(@NotNull BuildConfiguration buildConfiguration)Do any preprocessing work before validation occurs.voidsetTemplateRenderer(TemplateRenderer templateRenderer)Deprecated.since 6.8 use constructor injection or annotation injection@NotNull ErrorCollectionvalidate(@NotNull BuildConfiguration buildConfiguration)Validates the properties in theBuildConfigurationobject.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.atlassian.bamboo.v2.build.BuildConfigurationAwarePlugin
isConfigurationMissing
-
-
-
-
Field Detail
-
templateRenderer
@Deprecated protected TemplateRenderer templateRenderer
Deprecated.since 6.8 inject your own instance
-
moduleDescriptor
protected com.atlassian.plugin.ModuleDescriptor moduleDescriptor
-
-
Method Detail
-
init
public void init(@NotNull @NotNull com.atlassian.plugin.ModuleDescriptor moduleDescriptor)Description copied from interface:InitablePluginModuleInitialises the Plugin with the plugin module descriptor- Specified by:
initin interfaceInitablePluginModule- Parameters:
moduleDescriptor- Plugin module descriptor
-
addDefaultValues
public void addDefaultValues(@NotNull @NotNull BuildConfiguration buildConfiguration)Description copied from interface:BuildConfigurationAwarePluginExtension point for adding default values to the form forRenderableBuildConfiguration.getEditHtml(com.atlassian.bamboo.ww2.actions.build.admin.create.BuildConfiguration, com.atlassian.bamboo.plan.Plan)- Specified by:
addDefaultValuesin interfaceBuildConfigurationAwarePlugin- Parameters:
buildConfiguration- -
-
prepareConfigObject
public void prepareConfigObject(@NotNull @NotNull BuildConfiguration buildConfiguration)Description copied from interface:BuildConfigurationAwarePluginDo any preprocessing work before validation occurs. For repository, builder and web repository plugins this will only be called if the plugin is select by the user.- Specified by:
prepareConfigObjectin interfaceBuildConfigurationAwarePlugin- Parameters:
buildConfiguration- -
-
validate
@NotNull public @NotNull ErrorCollection validate(@NotNull @NotNull BuildConfiguration buildConfiguration)
Description copied from interface:BuildConfigurationAwarePluginValidates the properties in theBuildConfigurationobject. The name of the properties match those passed in through the form fragments inRenderableBuildConfiguration.getEditHtml(com.atlassian.bamboo.ww2.actions.build.admin.create.BuildConfiguration, com.atlassian.bamboo.plan.Plan)template.- Specified by:
validatein interfaceBuildConfigurationAwarePlugin- Parameters:
buildConfiguration- -- Returns:
ErrorCollectionkeyed by the field name.
-
getViewHtml
@Nullable public @Nullable String getViewHtml(@NotNull @NotNull Plan plan)
Description copied from interface:RenderableBuildConfigurationReturns the HTML that represents the view of the repository configuration- Specified by:
getViewHtmlin interfaceRenderableBuildConfiguration- Parameters:
plan- for which view HTML has to be rendered.- Returns:
- HTML string. May be null.
-
populateContextForView
protected void populateContextForView(@NotNull @NotNull Map<String,Object> context, @NotNull @NotNull Plan plan)
-
getEditHtml
@Nullable public @Nullable String getEditHtml(@NotNull @NotNull BuildConfiguration buildConfiguration, @Nullable @Nullable Plan plan)
Description copied from interface:RenderableBuildConfigurationReturns HTML that represents the form fragment for editing the repository. No opening and closing form tags are required.- Specified by:
getEditHtmlin interfaceRenderableBuildConfiguration- Parameters:
buildConfiguration-BuildConfigurationfor which edit HTML has to be rendered.plan-Planfor which edit HTML has to be rendered. May be null during creation phase of plan.- Returns:
- HTML string. May be null.
-
populateContextForEdit
protected void populateContextForEdit(@NotNull @NotNull Map<String,Object> context, @NotNull @NotNull BuildConfiguration buildConfiguration, @Nullable @Nullable Plan plan)
-
setTemplateRenderer
@Deprecated public void setTemplateRenderer(TemplateRenderer templateRenderer)
Deprecated.since 6.8 use constructor injection or annotation injection
-
getTemplateRenderer
protected TemplateRenderer getTemplateRenderer()
-
-