Class BuildExpiryPerPlanPlugin
- java.lang.Object
-
- com.atlassian.bamboo.v2.build.BaseBuildConfigurationAwarePlugin
-
- com.atlassian.bamboo.v2.build.BaseConfigurablePlugin
-
- com.atlassian.bamboo.build.expiry.plugin.BuildExpiryPerPlanPlugin
-
- All Implemented Interfaces:
MiscellaneousPlanConfigurationPlugin,PlanConfigurationUiPlugin,InitablePluginModule,BambooPluginModule,BuildConfigurationAwarePlugin,ConfigurablePlugin,RenderableBuildConfiguration
public class BuildExpiryPerPlanPlugin extends BaseConfigurablePlugin implements MiscellaneousPlanConfigurationPlugin
A plugin class that allows you to have build expiry occur per build
-
-
Field Summary
Fields Modifier and Type Field Description static StringBUILD_EXPIRY_CONFIG_CONSTANTstatic StringFIELD_ENABLED-
Fields inherited from class com.atlassian.bamboo.v2.build.BaseBuildConfigurationAwarePlugin
moduleDescriptor, templateRenderer
-
-
Constructor Summary
Constructors Constructor Description BuildExpiryPerPlanPlugin()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @NotNull Set<String>getConfigurationKeys()StringgetSelectedExpiryTypesLabel(@NotNull CombinedExpiryConfig expiryConfig)booleanisApplicableTo(@NotNull ImmutablePlan plan)Checks if the plugin is applicable to a plan.protected voidpopulateContextForEdit(@NotNull Map<String,Object> context, @NotNull BuildConfiguration buildConfiguration, @Nullable Plan plan)protected voidpopulateContextForView(@NotNull Map<String,Object> context, @NotNull Plan plan)voidsetTextProvider(com.opensymphony.xwork2.TextProvider textProvider)@NotNull ErrorCollectionvalidate(@NotNull BuildConfiguration buildConfiguration)Validates the properties in theBuildConfigurationobject.-
Methods inherited from class com.atlassian.bamboo.v2.build.BaseConfigurablePlugin
customizeBuildRequirements, removeBuildRequirements
-
Methods inherited from class com.atlassian.bamboo.v2.build.BaseBuildConfigurationAwarePlugin
addDefaultValues, getEditHtml, getTemplateRenderer, getViewHtml, init, 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 Detail
-
BUILD_EXPIRY_CONFIG_CONSTANT
public static final String BUILD_EXPIRY_CONFIG_CONSTANT
- See Also:
- Constant Field Values
-
FIELD_ENABLED
public static final String FIELD_ENABLED
- See Also:
- Constant Field Values
-
-
Method Detail
-
isApplicableTo
public boolean isApplicableTo(@NotNull @NotNull ImmutablePlan plan)Description copied from interface:PlanConfigurationUiPluginChecks if the plugin is applicable to a plan. Typical implementation is to check plan's type (chain, build, job).- Specified by:
isApplicableToin interfacePlanConfigurationUiPlugin- Parameters:
plan- Plan to be verified- Returns:
- true if particular configuration is applicable to input plan
-
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- Overrides:
validatein classBaseBuildConfigurationAwarePlugin- Parameters:
buildConfiguration- -- Returns:
ErrorCollectionkeyed by the field name.
-
populateContextForEdit
protected void populateContextForEdit(@NotNull @NotNull Map<String,Object> context, @NotNull @NotNull BuildConfiguration buildConfiguration, @Nullable @Nullable Plan plan)- Overrides:
populateContextForEditin classBaseBuildConfigurationAwarePlugin
-
populateContextForView
protected void populateContextForView(@NotNull @NotNull Map<String,Object> context, @NotNull @NotNull Plan plan)- Overrides:
populateContextForViewin classBaseBuildConfigurationAwarePlugin
-
getSelectedExpiryTypesLabel
public String getSelectedExpiryTypesLabel(@NotNull @NotNull CombinedExpiryConfig expiryConfig)
-
setTextProvider
public void setTextProvider(com.opensymphony.xwork2.TextProvider textProvider)
-
-