Class ConcurrentBuildsPlanConfigurationPlugin
java.lang.Object
com.atlassian.bamboo.v2.build.BaseBuildConfigurationAwarePlugin
com.atlassian.bamboo.build.configuration.ConcurrentBuildsPlanConfigurationPlugin
- All Implemented Interfaces:
MiscellaneousPlanConfigurationPlugin
,PlanConfigurationUiPlugin
,InitablePluginModule
,BambooPluginModule
,BuildConfigurationAwarePlugin
,ImportExportAwarePlugin<com.atlassian.bamboo.specs.api.builders.plan.configuration.ConcurrentBuilds,
,com.atlassian.bamboo.specs.api.model.plan.configuration.ConcurrentBuildsProperties> RenderableBuildConfiguration
public class ConcurrentBuildsPlanConfigurationPlugin
extends BaseBuildConfigurationAwarePlugin
implements MiscellaneousPlanConfigurationPlugin, ImportExportAwarePlugin<com.atlassian.bamboo.specs.api.builders.plan.configuration.ConcurrentBuilds,com.atlassian.bamboo.specs.api.model.plan.configuration.ConcurrentBuildsProperties>
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
static final String
static final String
static final String
Fields inherited from class com.atlassian.bamboo.v2.build.BaseBuildConfigurationAwarePlugin
moduleDescriptor, templateRenderer
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addToBuildConfiguration
(@NotNull com.atlassian.bamboo.specs.api.model.plan.configuration.ConcurrentBuildsProperties specsProperties, @NotNull org.apache.commons.configuration.HierarchicalConfiguration buildConfiguration) Validate and add data from specs properties to passed build configuration.@Nullable com.atlassian.bamboo.specs.api.builders.plan.configuration.ConcurrentBuilds
Import configuration of this plugin from YAML node to Bamboo Specs entity.Return all property keys related to this plugin module which may exist in a plan'sBuildConfiguration
.boolean
isApplicableTo
(@NotNull ImmutablePlan plan) Checks if the plugin is applicable to a plan.protected void
populateContextForView
(@NotNull Map<String, Object> context, @NotNull Plan plan) void
setAdministrationConfigurationAccessor
(AdministrationConfigurationAccessor administrationConfigurationAccessor) void
setTextProvider
(com.opensymphony.xwork2.TextProvider textProvider) @NotNull com.atlassian.bamboo.specs.api.builders.plan.configuration.ConcurrentBuilds
toSpecsEntity
(@NotNull org.apache.commons.configuration.HierarchicalConfiguration buildConfiguration) Export configuration of this plugin to Bamboo Specs entity.@Nullable Node
toYaml
(@NotNull com.atlassian.bamboo.specs.api.model.plan.configuration.ConcurrentBuildsProperties specsProperties) Convert configuration of this plugin from Bamboo Specs to YAML structure.@NotNull ErrorCollection
validate
(@NotNull BuildConfiguration buildConfiguration) Validates the properties in theBuildConfiguration
object.Methods inherited from class com.atlassian.bamboo.v2.build.BaseBuildConfigurationAwarePlugin
addDefaultValues, getEditHtml, getTemplateRenderer, getViewHtml, init, populateContextForEdit, prepareConfigObject, setTemplateRenderer
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
addDefaultValues, isConfigurationMissing, prepareConfigObject
Methods inherited from interface com.atlassian.bamboo.plugin.InitablePluginModule
init
Methods inherited from interface com.atlassian.bamboo.v2.build.RenderableBuildConfiguration
getEditHtml, getViewHtml
-
Field Details
-
CONCURRENT_BUILD_OBJECT_KEY
- See Also:
-
NUMBER_CONCURRENT_BUILDS_OVERRIDE
- See Also:
-
NUMBER_CONCURRENT_BUILDS
- See Also:
-
CONCURRENT_BUILDS_STRATEGY
- See Also:
-
-
Constructor Details
-
ConcurrentBuildsPlanConfigurationPlugin
public ConcurrentBuildsPlanConfigurationPlugin()
-
-
Method Details
-
populateContextForView
protected void populateContextForView(@NotNull @NotNull Map<String, Object> context, @NotNull @NotNull Plan plan) - Overrides:
populateContextForView
in classBaseBuildConfigurationAwarePlugin
-
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
- Overrides:
validate
in classBaseBuildConfigurationAwarePlugin
- Parameters:
buildConfiguration
- -- Returns:
ErrorCollection
keyed by the field name.
-
isApplicableTo
Description copied from interface:PlanConfigurationUiPlugin
Checks if the plugin is applicable to a plan. Typical implementation is to check plan's type (chain, build, job).- Specified by:
isApplicableTo
in interfacePlanConfigurationUiPlugin
- Parameters:
plan
- Plan to be verified- Returns:
- true if particular configuration is applicable to input plan
-
toSpecsEntity
@NotNull public @NotNull com.atlassian.bamboo.specs.api.builders.plan.configuration.ConcurrentBuilds toSpecsEntity(@NotNull @NotNull org.apache.commons.configuration.HierarchicalConfiguration buildConfiguration) Description copied from interface:ImportExportAwarePlugin
Export configuration of this plugin to Bamboo Specs entity.- Specified by:
toSpecsEntity
in interfaceImportExportAwarePlugin<com.atlassian.bamboo.specs.api.builders.plan.configuration.ConcurrentBuilds,
com.atlassian.bamboo.specs.api.model.plan.configuration.ConcurrentBuildsProperties>
-
addToBuildConfiguration
public void addToBuildConfiguration(@NotNull @NotNull com.atlassian.bamboo.specs.api.model.plan.configuration.ConcurrentBuildsProperties specsProperties, @NotNull @NotNull org.apache.commons.configuration.HierarchicalConfiguration buildConfiguration) Description copied from interface:ImportExportAwarePlugin
Validate and add data from specs properties to passed build configuration.- Specified by:
addToBuildConfiguration
in interfaceImportExportAwarePlugin<com.atlassian.bamboo.specs.api.builders.plan.configuration.ConcurrentBuilds,
com.atlassian.bamboo.specs.api.model.plan.configuration.ConcurrentBuildsProperties>
-
toYaml
@Nullable public @Nullable Node toYaml(@NotNull @NotNull com.atlassian.bamboo.specs.api.model.plan.configuration.ConcurrentBuildsProperties specsProperties) Description copied from interface:ImportExportAwarePlugin
Convert configuration of this plugin from Bamboo Specs to YAML structure.- Specified by:
toYaml
in interfaceImportExportAwarePlugin<com.atlassian.bamboo.specs.api.builders.plan.configuration.ConcurrentBuilds,
com.atlassian.bamboo.specs.api.model.plan.configuration.ConcurrentBuildsProperties> - Returns:
- YAML
Node
containing representation of Bamboo Specs entity.
-
fromYaml
@Nullable public @Nullable com.atlassian.bamboo.specs.api.builders.plan.configuration.ConcurrentBuilds fromYaml(@NotNull @NotNull Node node) throws com.atlassian.bamboo.specs.api.exceptions.PropertiesValidationException Description copied from interface:ImportExportAwarePlugin
Import configuration of this plugin from YAML node to Bamboo Specs entity.- Specified by:
fromYaml
in interfaceImportExportAwarePlugin<com.atlassian.bamboo.specs.api.builders.plan.configuration.ConcurrentBuilds,
com.atlassian.bamboo.specs.api.model.plan.configuration.ConcurrentBuildsProperties> - Parameters:
node
- yaml node- Returns:
- Bamboo Specs entity for plugin settings.
- Throws:
com.atlassian.bamboo.specs.api.exceptions.PropertiesValidationException
- if configuration is wrong.
-
getConfigurationKeys
Description copied from interface:ImportExportAwarePlugin
Return all property keys related to this plugin module which may exist in a plan'sBuildConfiguration
.The returned set may be immutable. If a plugin module doesn't have configuration, then an empty set should be returned.
- Specified by:
getConfigurationKeys
in interfaceImportExportAwarePlugin<com.atlassian.bamboo.specs.api.builders.plan.configuration.ConcurrentBuilds,
com.atlassian.bamboo.specs.api.model.plan.configuration.ConcurrentBuildsProperties>
-
setAdministrationConfigurationAccessor
public void setAdministrationConfigurationAccessor(AdministrationConfigurationAccessor administrationConfigurationAccessor) -
setTextProvider
public void setTextProvider(com.opensymphony.xwork2.TextProvider textProvider)
-