com.atlassian.bamboo.build.expiry
Class BuildExpiryConfig

java.lang.Object
  extended by com.atlassian.bamboo.build.expiry.BuildExpiryConfig
All Implemented Interfaces:
java.io.Serializable

public class BuildExpiryConfig
extends java.lang.Object
implements java.io.Serializable

This class is a simple POJO containing the BuildExpiry configuration settings.

See Also:
Serialized Form

Field Summary
static java.lang.String ARTIFACT_EXPIRY
           
static java.lang.String DAYS
           
static java.lang.String MONTHS
           
static java.lang.String RESULTS_EXPIRY
           
static java.lang.String WEEKS
           
 
Constructor Summary
BuildExpiryConfig()
           
BuildExpiryConfig(int buildsToKeep)
           
BuildExpiryConfig(int duration, java.lang.String period)
           
BuildExpiryConfig(int duration, java.lang.String period, int buildsToKeep)
           
BuildExpiryConfig(java.lang.String expiryType, int duration, java.lang.String period, int buildsToKeep)
           
BuildExpiryConfig(java.lang.String expiryType, int duration, java.lang.String period, int buildsToKeep, java.lang.String excludeLabels, java.lang.String labelsToKeep)
           
 
Method Summary
 boolean equals(java.lang.Object o)
           
 BuildExpiryType getBuildExpiryType()
           
 int getBuildsToKeep()
           
 int getDuration()
           
 java.lang.String getExcludeLabels()
           
 org.joda.time.Period getExpiryPeriod()
          Get the expiry period as a Joda time Period object
 java.lang.String getExpiryType()
           
 java.util.List<java.lang.String> getLabelsList()
          Returns a list of labels that shouuld be matched
 java.lang.String getLabelsToKeep()
           
 java.lang.String getPeriod()
          One of "days", "weeks", or "months"
 int hashCode()
           
 boolean isExpireByBuild()
           
 boolean isExpireByDate()
           
 void setBuildsToKeep(int buildsToKeep)
           
 void setDuration(int myDuration)
           
 void setExcludeLabels(java.lang.String excludeLabels)
           
 void setExpiryType(java.lang.String expiryType)
           
 void setLabelsToKeep(java.lang.String labelsToKeep)
           
 void setPeriod(java.lang.String myPeriod)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

DAYS

public static final java.lang.String DAYS
See Also:
Constant Field Values

WEEKS

public static final java.lang.String WEEKS
See Also:
Constant Field Values

MONTHS

public static final java.lang.String MONTHS
See Also:
Constant Field Values

ARTIFACT_EXPIRY

public static final java.lang.String ARTIFACT_EXPIRY
See Also:
Constant Field Values

RESULTS_EXPIRY

public static final java.lang.String RESULTS_EXPIRY
See Also:
Constant Field Values
Constructor Detail

BuildExpiryConfig

public BuildExpiryConfig()

BuildExpiryConfig

public BuildExpiryConfig(int buildsToKeep)

BuildExpiryConfig

public BuildExpiryConfig(int duration,
                         java.lang.String period)

BuildExpiryConfig

public BuildExpiryConfig(int duration,
                         java.lang.String period,
                         int buildsToKeep)

BuildExpiryConfig

public BuildExpiryConfig(java.lang.String expiryType,
                         int duration,
                         java.lang.String period,
                         int buildsToKeep)

BuildExpiryConfig

public BuildExpiryConfig(java.lang.String expiryType,
                         int duration,
                         java.lang.String period,
                         int buildsToKeep,
                         java.lang.String excludeLabels,
                         java.lang.String labelsToKeep)
Method Detail

getExpiryType

public java.lang.String getExpiryType()

setExpiryType

public void setExpiryType(java.lang.String expiryType)

getBuildExpiryType

public BuildExpiryType getBuildExpiryType()

getPeriod

public java.lang.String getPeriod()
One of "days", "weeks", or "months"


getDuration

public int getDuration()

getBuildsToKeep

public int getBuildsToKeep()

setBuildsToKeep

public void setBuildsToKeep(int buildsToKeep)

setPeriod

public void setPeriod(java.lang.String myPeriod)

setDuration

public void setDuration(int myDuration)

isExpireByDate

public boolean isExpireByDate()

isExpireByBuild

public boolean isExpireByBuild()

getLabelsToKeep

public java.lang.String getLabelsToKeep()

setLabelsToKeep

public void setLabelsToKeep(java.lang.String labelsToKeep)

getExcludeLabels

public java.lang.String getExcludeLabels()

setExcludeLabels

public void setExcludeLabels(java.lang.String excludeLabels)

getLabelsList

public java.util.List<java.lang.String> getLabelsList()
Returns a list of labels that shouuld be matched

Returns:
List of Strings representing the labels, Will return empty list if not labels

getExpiryPeriod

public org.joda.time.Period getExpiryPeriod()
Get the expiry period as a Joda time Period object

Returns:
Period
Throws:
java.lang.IllegalArgumentException - if the period text is of an unknown type

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2008 Atlassian Pty Ltd. All Rights Reserved.