Class PlansGreenCondition
java.lang.Object
com.atlassian.bamboo.v2.build.BaseBuildConfigurationAwarePlugin
com.atlassian.bamboo.buildtrigger.PlansGreenCondition
- All Implemented Interfaces:
BuildTriggerCondition
,InitablePluginModule
,BambooPluginModule
,BuildConfigurationAwarePlugin
,RenderableBuildConfiguration
public class PlansGreenCondition
extends BaseBuildConfigurationAwarePlugin
implements BuildTriggerCondition
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.atlassian.bamboo.build.BuildTriggerCondition
BuildTriggerCondition.ExecutionPreference
-
Field Summary
Fields inherited from class com.atlassian.bamboo.v2.build.BaseBuildConfigurationAwarePlugin
moduleDescriptor
-
Constructor Summary
ConstructorDescriptionPlansGreenCondition
(CachedPlanManager planManager, PlansGreenConditionValidator validator, TemplateRenderer templateRenderer) -
Method Summary
Modifier and TypeMethodDescriptiongetConfigurationMap
(@NotNull org.apache.commons.configuration.HierarchicalConfiguration configuration) This method should extract entire configuration of this plugin fromHierarchicalConfiguration
and return it as map.getExecutionPreference
(ImmutablePlan plan, Map<String, String> configuration) Use to indicate preference for whether this plugin things the plan should execute.protected TemplateRenderer
protected void
populateContextForView
(@NotNull Map<String, Object> context, @NotNull Plan plan) @NotNull ErrorCollection
validate
(@NotNull BuildConfiguration buildConfiguration) Validates the properties in theBuildConfiguration
object.Methods inherited from class com.atlassian.bamboo.v2.build.BaseBuildConfigurationAwarePlugin
addDefaultValues, getEditHtml, 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
-
Constructor Details
-
PlansGreenCondition
@Inject public PlansGreenCondition(CachedPlanManager planManager, PlansGreenConditionValidator validator, TemplateRenderer templateRenderer)
-
-
Method Details
-
getConfigurationMap
@NotNull public @NotNull Map<String,String> getConfigurationMap(@NotNull @NotNull org.apache.commons.configuration.HierarchicalConfiguration configuration) Description copied from interface:BuildTriggerCondition
This method should extract entire configuration of this plugin fromHierarchicalConfiguration
and return it as map.- Specified by:
getConfigurationMap
in interfaceBuildTriggerCondition
- Parameters:
configuration
- a configuration- Returns:
- complete configuration of the plugin as a string map
-
getExecutionPreference
@NotNull public @NotNull BuildTriggerCondition.ExecutionPreference getExecutionPreference(ImmutablePlan plan, Map<String, String> configuration) Description copied from interface:BuildTriggerCondition
Use to indicate preference for whether this plugin things the plan should execute. Whether the build actually will execute will follow the above order- Specified by:
getExecutionPreference
in interfaceBuildTriggerCondition
- Parameters:
plan
- the plan that will be executedconfiguration
- of the plugin as returned byBuildTriggerCondition.getConfigurationMap(HierarchicalConfiguration)
- Returns:
- the execution preference of this plan, will be overridden if another plugin returns with a higher preference
-
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.
-
getTemplateRenderer
- Overrides:
getTemplateRenderer
in classBaseBuildConfigurationAwarePlugin
-