public class BaseBuildConfigurationAwarePlugin extends Object implements BuildConfigurationAwarePlugin
Modifier and Type | Field and Description |
---|---|
protected com.atlassian.plugin.ModuleDescriptor |
moduleDescriptor |
protected TemplateRenderer |
templateRenderer |
Constructor and Description |
---|
BaseBuildConfigurationAwarePlugin() |
Modifier and Type | Method and Description |
---|---|
void |
addDefaultValues(BuildConfiguration buildConfiguration)
Extension point for adding default values to the form for
RenderableBuildConfiguration.getEditHtml(com.atlassian.bamboo.ww2.actions.build.admin.create.BuildConfiguration, com.atlassian.bamboo.plan.Plan) |
String |
getEditHtml(BuildConfiguration buildConfiguration,
Plan plan)
Returns HTML that represents the form fragment for editing the repository.
|
String |
getViewHtml(Plan plan)
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(Map<String,Object> context,
BuildConfiguration buildConfiguration,
Plan plan) |
protected void |
populateContextForView(Map<String,Object> context,
Plan plan) |
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. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
isConfigurationMissing
protected TemplateRenderer templateRenderer
protected com.atlassian.plugin.ModuleDescriptor moduleDescriptor
public void init(@NotNull com.atlassian.plugin.ModuleDescriptor moduleDescriptor)
InitablePluginModule
init
in interface InitablePluginModule
moduleDescriptor
- Plugin module descriptorpublic void addDefaultValues(@NotNull BuildConfiguration buildConfiguration)
BuildConfigurationAwarePlugin
RenderableBuildConfiguration.getEditHtml(com.atlassian.bamboo.ww2.actions.build.admin.create.BuildConfiguration, com.atlassian.bamboo.plan.Plan)
addDefaultValues
in interface BuildConfigurationAwarePlugin
buildConfiguration
- -public void prepareConfigObject(@NotNull BuildConfiguration buildConfiguration)
BuildConfigurationAwarePlugin
prepareConfigObject
in interface BuildConfigurationAwarePlugin
buildConfiguration
- -@NotNull public ErrorCollection validate(@NotNull BuildConfiguration buildConfiguration)
BuildConfigurationAwarePlugin
BuildConfiguration
object. The name of the properties match those passed
in through the form fragments in RenderableBuildConfiguration.getEditHtml(com.atlassian.bamboo.ww2.actions.build.admin.create.BuildConfiguration, com.atlassian.bamboo.plan.Plan)
template.validate
in interface BuildConfigurationAwarePlugin
buildConfiguration
- -ErrorCollection
keyed by the field name.@Nullable public String getViewHtml(@NotNull Plan plan)
RenderableBuildConfiguration
getViewHtml
in interface RenderableBuildConfiguration
plan
- for which view HTML has to be rendered.protected void populateContextForView(@NotNull Map<String,Object> context, @NotNull Plan plan)
@Nullable public String getEditHtml(@NotNull BuildConfiguration buildConfiguration, @Nullable Plan plan)
RenderableBuildConfiguration
getEditHtml
in interface RenderableBuildConfiguration
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.protected void populateContextForEdit(@NotNull Map<String,Object> context, @NotNull BuildConfiguration buildConfiguration, @Nullable Plan plan)
public void setTemplateRenderer(TemplateRenderer templateRenderer)
Copyright © 2018 Atlassian Software Systems Pty Ltd. All rights reserved.