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()
BranchMonitoringConfiguration
getPlanBranchWorkflow
in interface BranchMonitoringConfiguration
public void setPlanBranchWorkflow(@NotNull PlanBranchWorkflow planBranchWorkflow)
BranchMonitoringConfiguration
setPlanBranchWorkflow
in interface BranchMonitoringConfiguration
BranchMonitoringConfiguration.getPlanBranchWorkflow()
public boolean isPlanBranchCreationEnabled()
BranchMonitoringConfiguration
isPlanBranchCreationEnabled
in interface BranchMonitoringConfiguration
public boolean isRemovedBranchCleanUpEnabled()
BranchMonitoringConfiguration
BranchMonitoringConfiguration.setRemovedBranchCleanUpPeriodInDays(int)
.isRemovedBranchCleanUpEnabled
in interface BranchMonitoringConfiguration
public void setPlanBranchCreationEnabled(boolean isBranchCreationEnabled)
BranchMonitoringConfiguration
setPlanBranchCreationEnabled
in interface BranchMonitoringConfiguration
isBranchCreationEnabled
- turns on / off this settingpublic void setRemovedBranchCleanUpEnabled(boolean isAutomaticPlanBranchCleanUpEnabled)
BranchMonitoringConfiguration
setRemovedBranchCleanUpEnabled
in interface BranchMonitoringConfiguration
isAutomaticPlanBranchCleanUpEnabled
- turns on / off this settingpublic boolean isInactiveBranchCleanUpEnabled()
BranchMonitoringConfiguration
BranchMonitoringConfiguration.setInactiveBranchCleanUpPeriodInDays(int)
.isInactiveBranchCleanUpEnabled
in interface BranchMonitoringConfiguration
public void setInactiveBranchCleanUpEnabled(boolean enabled)
BranchMonitoringConfiguration
setInactiveBranchCleanUpEnabled
in interface BranchMonitoringConfiguration
enabled
- turns on / off this settingpublic String getMatchingPattern()
BranchMonitoringConfiguration
BranchMonitoringConfiguration.getPlanBranchWorkflow()
.getMatchingPattern
in interface BranchMonitoringConfiguration
public void setMatchingPattern(@NotNull String regularExpression)
BranchMonitoringConfiguration
BranchMonitoringConfiguration.setPlanBranchWorkflow(PlanBranchWorkflow)
.setMatchingPattern
in interface BranchMonitoringConfiguration
regularExpression
- regular expression for the vcs branch name to matchpublic int getInactiveBranchCleanUpPeriodInDays()
BranchMonitoringConfiguration
getInactiveBranchCleanUpPeriodInDays
in interface BranchMonitoringConfiguration
public void setInactiveBranchCleanUpPeriodInDays(int inactiveBranchCleanUpPeriodInDays)
BranchMonitoringConfiguration
setInactiveBranchCleanUpPeriodInDays
in interface BranchMonitoringConfiguration
inactiveBranchCleanUpPeriodInDays
- number of days a vcs branch is considered to be inactivepublic int getRemovedBranchCleanUpPeriodInDays()
BranchMonitoringConfiguration
getRemovedBranchCleanUpPeriodInDays
in interface BranchMonitoringConfiguration
public void setRemovedBranchCleanUpPeriodInDays(int cleanUpPeriodInDays)
BranchMonitoringConfiguration
setRemovedBranchCleanUpPeriodInDays
in interface BranchMonitoringConfiguration
cleanUpPeriodInDays
- number of days a plan branch is considered to be removed after@NotNull public org.apache.commons.configuration.HierarchicalConfiguration getCustomConfiguration()
BranchMonitoringConfiguration
getCustomConfiguration
in interface BranchMonitoringConfiguration
public void setCustomConfiguration(org.apache.commons.configuration.HierarchicalConfiguration customConfiguration)
setCustomConfiguration
in interface BranchMonitoringConfiguration
public BranchNotificationStrategy getDefaultBranchNotificationStrategy()
getDefaultBranchNotificationStrategy
in interface BranchMonitoringConfiguration
public void setDefaultBranchNotificationStrategy(BranchNotificationStrategy defaultBranchNotificationStrategy)
setDefaultBranchNotificationStrategy
in interface BranchMonitoringConfiguration
public BranchIntegrationConfiguration getDefaultBranchIntegrationConfiguration()
getDefaultBranchIntegrationConfiguration
in interface BranchMonitoringConfiguration
public void setDefaultBranchIntegrationConfiguration(BranchIntegrationConfiguration defaultBranchIntegrationConfiguration)
setDefaultBranchIntegrationConfiguration
in interface BranchMonitoringConfiguration
public boolean isRemoteJiraBranchLinkingEnabled()
BranchMonitoringConfiguration
isRemoteJiraBranchLinkingEnabled
in interface BranchMonitoringConfiguration
public void setRemoteJiraBranchLinkingEnabled(boolean jiraBranchLinkingEnabled)
BranchMonitoringConfiguration
setRemoteJiraBranchLinkingEnabled
in interface BranchMonitoringConfiguration
jiraBranchLinkingEnabled
- enables/disables this settingpublic void populateFromConfig(@NotNull org.apache.commons.configuration.HierarchicalConfiguration config)
ConvertibleFromConfig
HierarchicalConfiguration
populateFromConfig
in interface ConvertibleFromConfig
public boolean isValid()
OptionallyConvertibleFromConfig
isValid
in interface OptionallyConvertibleFromConfig
@NotNull public org.apache.commons.configuration.HierarchicalConfiguration toConfiguration()
ConvertibleFromConfig
HierarchicalConfiguration
from the current state of the objecttoConfiguration
in interface ConvertibleFromConfig
HierarchicalConfiguration
. Never null@NotNull public BranchTriggeringOption getBranchTriggeringOption()
getBranchTriggeringOption
in interface BranchMonitoringConfiguration
public void setBranchTriggeringOption(@NotNull BranchTriggeringOption branchTriggeringOption)
setBranchTriggeringOption
in interface BranchMonitoringConfiguration
@Nullable public TriggerDefinition getDefaultTrigger()
BranchMonitoringConfiguration
getDefaultTrigger
in interface BranchMonitoringConfiguration
public void setDefaultTrigger(@Nullable TriggerDefinition defaultTrigger)
BranchMonitoringConfiguration
setDefaultTrigger
in interface BranchMonitoringConfiguration
Copyright © 2021 Atlassian Software Systems Pty Ltd. All rights reserved.