public class BranchMonitoringConfigurationImpl extends Object implements BranchMonitoringConfiguration
BRANCH_CREATION_CONFIG_KEY, BRANCH_TRIGGERING_CFG_KEY, BRANCHES_CUSTOM_CONFIG_KEY, BRANCHES_INACTIVITY_CLEAN_UP_PERIOD, BRANCHES_MATCHING_PATTERN_CONFIG_KEY, BRANCHES_NOTIFICATION_STRATEGY_CONFIG_KEY, DEFAULT_BRANCH_MATCH_NAME_PATTERN, DEFAULT_REMOVED_BRANCH_CLEAN_UP_PERIOD, DEFAULT_TIME_OF_INACTIVITY_DAYS, INACTIVE_BRANCH_CLEANUP_CONFIG_KEY, JIRA_BRANCH_LINKING_CONFIG_KEY, MINIMUM_INACTIVE_BRANCH_CLEAN_UP_PERIOD, MINIMUM_REMOVED_BRANCH_CLEAN_UP_PERIOD, PLAN_BRANCH_WORKFLOW_CFG_KEY, PLAN_BRANCHES_MONITORING_ENABLED, REMOVED_BRANCH_CLEANUP_CONFIG_KEY, REMOVED_BRANCH_CLEANUP_PERIOD_CONFIG_KEY, REMOVED_BRANCH_DAILY_CLEAN_UP_PERIOD| Constructor and Description |
|---|
BranchMonitoringConfigurationImpl() |
| Modifier and Type | Method and Description |
|---|---|
BranchTriggeringOption |
getBranchTriggeringOption() |
org.apache.commons.configuration.HierarchicalConfiguration |
getCustomConfiguration()
Return custom configuration related to branch detection in the particular plan.
|
BranchIntegrationConfiguration |
getDefaultBranchIntegrationConfiguration() |
BranchNotificationStrategy |
getDefaultBranchNotificationStrategy() |
TriggerDefinition |
getDefaultTrigger()
Default trigger for new branches.
|
int |
getInactiveBranchCleanUpPeriodInDays()
Returns a number of days the branch will be consider inactive (as per no commits activity in the repo) and therefore deleted.
|
String |
getMatchingPattern()
Returns the reg expression every vcs branch name needs to match for Bamboo to automatically create a plan branch for it.
|
PlanBranchWorkflow |
getPlanBranchWorkflow()
Return the type of plan branching workflow.
|
int |
getRemovedBranchCleanUpPeriodInDays()
Returns a number of days the plan branch will be deleted once detected the vcs branch has been removed.
|
boolean |
isInactiveBranchCleanUpEnabled()
Returns if Bamboo is configured to automatically clean up plan branches for branches that are considered inactive.
|
boolean |
isPlanBranchCreationEnabled()
Returns if Bamboo is configured to automatically create plan branches when detecting new branches in the repo.
|
boolean |
isRemoteJiraBranchLinkingEnabled()
Returns if Bamboo will attempt to create remote issue links in JIRA when it finds an issue key in the branch name.
|
boolean |
isRemovedBranchCleanUpEnabled()
Returns if Bamboo is configured to automatically clean up plan branches if the vcs branch is removed.
|
boolean |
isValid()
Is the object state valid after it has been initialised from properties.
|
void |
populateFromConfig(org.apache.commons.configuration.HierarchicalConfiguration config)
Update the current object with data in the
HierarchicalConfiguration |
void |
setBranchTriggeringOption(BranchTriggeringOption branchTriggeringOption) |
void |
setCustomConfiguration(org.apache.commons.configuration.HierarchicalConfiguration customConfiguration) |
void |
setDefaultBranchIntegrationConfiguration(BranchIntegrationConfiguration defaultBranchIntegrationConfiguration) |
void |
setDefaultBranchNotificationStrategy(BranchNotificationStrategy defaultBranchNotificationStrategy) |
void |
setDefaultTrigger(TriggerDefinition defaultTrigger)
Set default trigger for new branches.
|
void |
setInactiveBranchCleanUpEnabled(boolean enabled)
Sets Bamboo to automatically cleanup plan branches if vcs branch is inactive.
|
void |
setInactiveBranchCleanUpPeriodInDays(int inactiveBranchCleanUpPeriodInDays)
Sets the number of days a plan branch will be consider inactive (as per no commits activity in the repo) and therefore deleted.
|
void |
setMatchingPattern(String regularExpression)
Sets the reg expression every vcs branch name will match for Bamboo to automatically create a plan branch for it.
|
void |
setPlanBranchCreationEnabled(boolean isBranchCreationEnabled)
Sets Bamboo to automatically create plan branches when detecting new branches in the repo.
|
void |
setPlanBranchWorkflow(PlanBranchWorkflow planBranchWorkflow)
Sets the type of plan branching workflow.
|
void |
setRemoteJiraBranchLinkingEnabled(boolean jiraBranchLinkingEnabled)
Sets if Bamboo will attempt to create remote issue links in JIRA when it finds an issue key in the branch name.
|
void |
setRemovedBranchCleanUpEnabled(boolean isAutomaticPlanBranchCleanUpEnabled)
Sets Bamboo to automatically cleanup plan branches if vcs branch is deleted.
|
void |
setRemovedBranchCleanUpPeriodInDays(int cleanUpPeriodInDays)
Sets the number of days a plan branch will be deleted once detected the vcs branch is removed.
|
org.apache.commons.configuration.HierarchicalConfiguration |
toConfiguration()
Generate a
HierarchicalConfiguration from the current state of the object |
@NotNull public PlanBranchWorkflow getPlanBranchWorkflow()
BranchMonitoringConfigurationgetPlanBranchWorkflow in interface BranchMonitoringConfigurationpublic void setPlanBranchWorkflow(@NotNull
PlanBranchWorkflow planBranchWorkflow)
BranchMonitoringConfigurationsetPlanBranchWorkflow in interface BranchMonitoringConfigurationBranchMonitoringConfiguration.getPlanBranchWorkflow()public boolean isPlanBranchCreationEnabled()
BranchMonitoringConfigurationisPlanBranchCreationEnabled in interface BranchMonitoringConfigurationpublic boolean isRemovedBranchCleanUpEnabled()
BranchMonitoringConfigurationBranchMonitoringConfiguration.setRemovedBranchCleanUpPeriodInDays(int).isRemovedBranchCleanUpEnabled in interface BranchMonitoringConfigurationpublic void setPlanBranchCreationEnabled(boolean isBranchCreationEnabled)
BranchMonitoringConfigurationsetPlanBranchCreationEnabled in interface BranchMonitoringConfigurationisBranchCreationEnabled - turns on / off this settingpublic void setRemovedBranchCleanUpEnabled(boolean isAutomaticPlanBranchCleanUpEnabled)
BranchMonitoringConfigurationsetRemovedBranchCleanUpEnabled in interface BranchMonitoringConfigurationisAutomaticPlanBranchCleanUpEnabled - turns on / off this settingpublic boolean isInactiveBranchCleanUpEnabled()
BranchMonitoringConfigurationBranchMonitoringConfiguration.setInactiveBranchCleanUpPeriodInDays(int).isInactiveBranchCleanUpEnabled in interface BranchMonitoringConfigurationpublic void setInactiveBranchCleanUpEnabled(boolean enabled)
BranchMonitoringConfigurationsetInactiveBranchCleanUpEnabled in interface BranchMonitoringConfigurationenabled - turns on / off this settingpublic String getMatchingPattern()
BranchMonitoringConfigurationBranchMonitoringConfiguration.getPlanBranchWorkflow().getMatchingPattern in interface BranchMonitoringConfigurationpublic void setMatchingPattern(@NotNull
String regularExpression)
BranchMonitoringConfigurationBranchMonitoringConfiguration.setPlanBranchWorkflow(PlanBranchWorkflow).setMatchingPattern in interface BranchMonitoringConfigurationregularExpression - regular expression for the vcs branch name to matchpublic int getInactiveBranchCleanUpPeriodInDays()
BranchMonitoringConfigurationgetInactiveBranchCleanUpPeriodInDays in interface BranchMonitoringConfigurationpublic void setInactiveBranchCleanUpPeriodInDays(int inactiveBranchCleanUpPeriodInDays)
BranchMonitoringConfigurationsetInactiveBranchCleanUpPeriodInDays in interface BranchMonitoringConfigurationinactiveBranchCleanUpPeriodInDays - number of days a vcs branch is considered to be inactivepublic int getRemovedBranchCleanUpPeriodInDays()
BranchMonitoringConfigurationgetRemovedBranchCleanUpPeriodInDays in interface BranchMonitoringConfigurationpublic void setRemovedBranchCleanUpPeriodInDays(int cleanUpPeriodInDays)
BranchMonitoringConfigurationsetRemovedBranchCleanUpPeriodInDays in interface BranchMonitoringConfigurationcleanUpPeriodInDays - number of days a plan branch is considered to be removed after@NotNull public org.apache.commons.configuration.HierarchicalConfiguration getCustomConfiguration()
BranchMonitoringConfigurationgetCustomConfiguration in interface BranchMonitoringConfigurationpublic void setCustomConfiguration(org.apache.commons.configuration.HierarchicalConfiguration customConfiguration)
setCustomConfiguration in interface BranchMonitoringConfigurationpublic BranchNotificationStrategy getDefaultBranchNotificationStrategy()
getDefaultBranchNotificationStrategy in interface BranchMonitoringConfigurationpublic void setDefaultBranchNotificationStrategy(BranchNotificationStrategy defaultBranchNotificationStrategy)
setDefaultBranchNotificationStrategy in interface BranchMonitoringConfigurationpublic BranchIntegrationConfiguration getDefaultBranchIntegrationConfiguration()
getDefaultBranchIntegrationConfiguration in interface BranchMonitoringConfigurationpublic void setDefaultBranchIntegrationConfiguration(BranchIntegrationConfiguration defaultBranchIntegrationConfiguration)
setDefaultBranchIntegrationConfiguration in interface BranchMonitoringConfigurationpublic boolean isRemoteJiraBranchLinkingEnabled()
BranchMonitoringConfigurationisRemoteJiraBranchLinkingEnabled in interface BranchMonitoringConfigurationpublic void setRemoteJiraBranchLinkingEnabled(boolean jiraBranchLinkingEnabled)
BranchMonitoringConfigurationsetRemoteJiraBranchLinkingEnabled in interface BranchMonitoringConfigurationjiraBranchLinkingEnabled - enables/disables this settingpublic void populateFromConfig(@NotNull
org.apache.commons.configuration.HierarchicalConfiguration config)
ConvertibleFromConfigHierarchicalConfigurationpopulateFromConfig in interface ConvertibleFromConfigpublic boolean isValid()
OptionallyConvertibleFromConfigisValid in interface OptionallyConvertibleFromConfig@NotNull public org.apache.commons.configuration.HierarchicalConfiguration toConfiguration()
ConvertibleFromConfigHierarchicalConfiguration from the current state of the objecttoConfiguration in interface ConvertibleFromConfigHierarchicalConfiguration. Never null@NotNull public BranchTriggeringOption getBranchTriggeringOption()
getBranchTriggeringOption in interface BranchMonitoringConfigurationpublic void setBranchTriggeringOption(@NotNull
BranchTriggeringOption branchTriggeringOption)
setBranchTriggeringOption in interface BranchMonitoringConfiguration@Nullable public TriggerDefinition getDefaultTrigger()
BranchMonitoringConfigurationgetDefaultTrigger in interface BranchMonitoringConfigurationpublic void setDefaultTrigger(@Nullable
TriggerDefinition defaultTrigger)
BranchMonitoringConfigurationsetDefaultTrigger in interface BranchMonitoringConfigurationCopyright © 2021 Atlassian Software Systems Pty Ltd. All rights reserved.