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
 java.lang.String getMatchingPattern()
          Returns the regexp - every matching branch will be considered for auto branch creation
 int getTimeOfInactivityInDays()
           
 boolean isCleanupEnabled()
           
 boolean isMonitoringEnabled()
           
 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 setCleanupEnabled(boolean enabled)
           
 void setMatchingPattern(java.lang.String matchingPattern)
           
 void setMonitoringEnabled(boolean enabled)
           
 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)

setCleanupEnabled

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

getTimeOfInactivityInDays

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

setTimeOfInactivityInDays

public void setTimeOfInactivityInDays(int timeOfInactivityInDays)
Specified by:
setTimeOfInactivityInDays 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.