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
Modifier and TypeFieldDescriptionprotected com.atlassian.plugin.ModuleDescriptor
protected TemplateRenderer
Deprecated.since 6.8 inject your own instance -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addDefaultValues
(@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 String
getEditHtml
(@NotNull BuildConfiguration buildConfiguration, @Nullable Plan plan) Returns HTML that represents the form fragment for editing the repository.protected TemplateRenderer
@Nullable String
getViewHtml
(@NotNull Plan plan) Returns the HTML that represents the view of the repository configurationvoid
init
(@NotNull com.atlassian.plugin.ModuleDescriptor moduleDescriptor) Initialises the Plugin with the plugin module descriptorprotected void
populateContextForEdit
(@NotNull Map<String, Object> context, @NotNull BuildConfiguration buildConfiguration, @Nullable Plan plan) protected void
populateContextForView
(@NotNull Map<String, Object> context, @NotNull Plan plan) void
prepareConfigObject
(@NotNull BuildConfiguration buildConfiguration) Do any preprocessing work before validation occurs.void
setTemplateRenderer
(TemplateRenderer templateRenderer) Deprecated.since 6.8 use constructor injection or annotation injection@NotNull ErrorCollection
validate
(@NotNull BuildConfiguration buildConfiguration) Validates the properties in theBuildConfiguration
object.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 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:InitablePluginModule
Initialises the Plugin with the plugin module descriptor- Specified by:
init
in interfaceInitablePluginModule
- Parameters:
moduleDescriptor
- Plugin module descriptor
-
addDefaultValues
Description copied from interface:BuildConfigurationAwarePlugin
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)
- Specified by:
addDefaultValues
in interfaceBuildConfigurationAwarePlugin
- Parameters:
buildConfiguration
- -
-
prepareConfigObject
Description copied from interface:BuildConfigurationAwarePlugin
Do 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:
prepareConfigObject
in interfaceBuildConfigurationAwarePlugin
- Parameters:
buildConfiguration
- -
-
validate
@NotNull public @NotNull ErrorCollection validate(@NotNull @NotNull BuildConfiguration buildConfiguration) Description copied from interface:BuildConfigurationAwarePlugin
Validates the properties in theBuildConfiguration
object. 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:
validate
in interfaceBuildConfigurationAwarePlugin
- Parameters:
buildConfiguration
- -- Returns:
ErrorCollection
keyed by the field name.
-
getViewHtml
Description copied from interface:RenderableBuildConfiguration
Returns the HTML that represents the view of the repository configuration- Specified by:
getViewHtml
in 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:RenderableBuildConfiguration
Returns HTML that represents the form fragment for editing the repository. No opening and closing form tags are required.- Specified by:
getEditHtml
in interfaceRenderableBuildConfiguration
- Parameters:
buildConfiguration
-BuildConfiguration
for which edit HTML has to be rendered.plan
-Plan
for 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
-