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,HangingBuildConfigurationPlugin,HungBuildPlanConfigurationPlugin,PlansGreenCondition,SkipTestHistoryConfigurationItem
public class BaseBuildConfigurationAwarePlugin
extends Object
implements BuildConfigurationAwarePlugin
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected com.atlassian.plugin.ModuleDescriptorprotected TemplateRendererDeprecated.since 6.8 inject your own instance -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddDefaultValues(@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 TemplateRenderer@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, waitMethods inherited from interface com.atlassian.bamboo.v2.build.BuildConfigurationAwarePlugin
isConfigurationMissing
-
Field Details
-
templateRenderer
Deprecated.since 6.8 inject your own instance -
moduleDescriptor
protected com.atlassian.plugin.ModuleDescriptor moduleDescriptor
-
-
Constructor Details
-
BaseBuildConfigurationAwarePlugin
public BaseBuildConfigurationAwarePlugin()
-
-
Method Details
-
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
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
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
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
-
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.since 6.8 use constructor injection or annotation injection -
getTemplateRenderer
-