com.atlassian.bamboo.plan.branch
Class BranchMonitoringConfigurationImpl

java.lang.Object
  extended by com.atlassian.bamboo.plan.branch.BranchMonitoringConfigurationImpl
All Implemented Interfaces:
ConvertibleFromConfig, OptionallyConvertibleFromConfig, BranchMonitoringConfiguration, java.io.Serializable

public class BranchMonitoringConfigurationImpl
extends java.lang.Object
implements BranchMonitoringConfiguration

This class stores branch detection parameters

See Also:
Serialized Form

Field Summary
 
Fields inherited from interface com.atlassian.bamboo.plan.branch.BranchMonitoringConfiguration
DEFAULT_TIME_OF_INACTIVITY_DAYS
 
Constructor Summary
BranchMonitoringConfigurationImpl()
           
 
Method Summary
 org.apache.commons.configuration.HierarchicalConfiguration getCustomConfiguration()
          Return custom configuration related to branch detection in the particular plan.
 BranchIntegrationConfiguration getDefaultBranchIntegrationConfiguration()
           
 BranchNotificationStrategy getDefaultBranchNotificationStrategy()
           
 java.lang.String getMatchingPattern()
          Returns the regexp - every matching branch will be considered for auto branch creation
 int getTimeOfInactivityInDays()
           
 boolean isCleanupEnabled()
           
 boolean isMonitoringEnabled()
           
 boolean isRemoteJiraBranchLinkingEnabled()
          Whether Bamboo will attempt to create the remote issue links in JIRA when it finds an issue key in the branch name.
 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 setCustomConfiguration(org.apache.commons.configuration.HierarchicalConfiguration customConfiguration)
           
 void setDefaultBranchIntegrationConfiguration(BranchIntegrationConfiguration defaultBranchIntegrationConfiguration)
           
 void setDefaultBranchNotificationStrategy(BranchNotificationStrategy defaultBranchNotificationStrategy)
           
 void setMatchingPattern(java.lang.String matchingPattern)
           
 void setMonitoringEnabled(boolean enabled)
           
 void setRemoteJiraBranchLinkingEnabled(boolean jiraBranchLinkingEnabled)
           
 void setTimeOfInactivityInDays(int timeOfInactivityInDays)
           
 org.apache.commons.configuration.HierarchicalConfiguration toConfiguration()
          Generate a HierarchicalConfiguration from the current state of the object
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BranchMonitoringConfigurationImpl

public BranchMonitoringConfigurationImpl()
Method Detail

isMonitoringEnabled

public boolean isMonitoringEnabled()
Specified by:
isMonitoringEnabled in interface BranchMonitoringConfiguration

setMonitoringEnabled

public void setMonitoringEnabled(boolean enabled)
Specified by:
setMonitoringEnabled in interface BranchMonitoringConfiguration

getMatchingPattern

public java.lang.String getMatchingPattern()
Description copied from interface: BranchMonitoringConfiguration
Returns the regexp - every matching branch will be considered for auto branch creation

Specified by:
getMatchingPattern in interface BranchMonitoringConfiguration
Returns:
regular expression for matching open branches

setMatchingPattern

public void setMatchingPattern(@NotNull
                               java.lang.String matchingPattern)
Specified by:
setMatchingPattern in interface BranchMonitoringConfiguration

isCleanupEnabled

public boolean isCleanupEnabled()
Specified by:
isCleanupEnabled in interface BranchMonitoringConfiguration
Returns:
true if inactive branches should be auto removed from plan after a while (i.e. 30 days)

getTimeOfInactivityInDays

public int getTimeOfInactivityInDays()
Specified by:
getTimeOfInactivityInDays in interface BranchMonitoringConfiguration

setTimeOfInactivityInDays

public void setTimeOfInactivityInDays(int timeOfInactivityInDays)
Specified by:
setTimeOfInactivityInDays in interface BranchMonitoringConfiguration

getCustomConfiguration

@NotNull
public org.apache.commons.configuration.HierarchicalConfiguration getCustomConfiguration()
Description copied from interface: BranchMonitoringConfiguration
Return custom configuration related to branch detection in the particular plan. The custom configuration may hold for example "branchRootOverride" for the SvnRepositories. That custom configuration object is given to the Repository classes when detecting/creating new branches.

Specified by:
getCustomConfiguration in interface BranchMonitoringConfiguration

setCustomConfiguration

public void setCustomConfiguration(org.apache.commons.configuration.HierarchicalConfiguration customConfiguration)
Specified by:
setCustomConfiguration in interface BranchMonitoringConfiguration

getDefaultBranchNotificationStrategy

public BranchNotificationStrategy getDefaultBranchNotificationStrategy()
Specified by:
getDefaultBranchNotificationStrategy in interface BranchMonitoringConfiguration

setDefaultBranchNotificationStrategy

public void setDefaultBranchNotificationStrategy(BranchNotificationStrategy defaultBranchNotificationStrategy)
Specified by:
setDefaultBranchNotificationStrategy in interface BranchMonitoringConfiguration

getDefaultBranchIntegrationConfiguration

public BranchIntegrationConfiguration getDefaultBranchIntegrationConfiguration()
Specified by:
getDefaultBranchIntegrationConfiguration in interface BranchMonitoringConfiguration

setDefaultBranchIntegrationConfiguration

public void setDefaultBranchIntegrationConfiguration(BranchIntegrationConfiguration defaultBranchIntegrationConfiguration)
Specified by:
setDefaultBranchIntegrationConfiguration in interface BranchMonitoringConfiguration

isRemoteJiraBranchLinkingEnabled

public boolean isRemoteJiraBranchLinkingEnabled()
Description copied from interface: BranchMonitoringConfiguration
Whether Bamboo will attempt to create the remote issue links in JIRA when it finds an issue key in the branch name. Bamboo will always create the link from Bamboo to JIRA regardless of this setting.

Specified by:
isRemoteJiraBranchLinkingEnabled in interface BranchMonitoringConfiguration
Returns:
true if Bamboo should try to create remote issue links in JIRA

setRemoteJiraBranchLinkingEnabled

public void setRemoteJiraBranchLinkingEnabled(boolean jiraBranchLinkingEnabled)
Specified by:
setRemoteJiraBranchLinkingEnabled in interface BranchMonitoringConfiguration

populateFromConfig

public void populateFromConfig(@NotNull
                               org.apache.commons.configuration.HierarchicalConfiguration config)
Description copied from interface: ConvertibleFromConfig
Update the current object with data in the HierarchicalConfiguration

Specified by:
populateFromConfig in interface ConvertibleFromConfig

isValid

public boolean isValid()
Description copied from interface: OptionallyConvertibleFromConfig
Is the object state valid after it has been initialised from properties.

Specified by:
isValid in interface OptionallyConvertibleFromConfig
Returns:

toConfiguration

@NotNull
public org.apache.commons.configuration.HierarchicalConfiguration toConfiguration()
Description copied from interface: ConvertibleFromConfig
Generate a HierarchicalConfiguration from the current state of the object

Specified by:
toConfiguration in interface ConvertibleFromConfig
Returns:
Always returns an HierarchicalConfiguration. Never null


Copyright © 2012 Atlassian. All Rights Reserved.