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 BUILD_LOG_EXPIRY
           
static java.lang.String DAYS
           
static java.lang.String DEFAULT_CRON_EXPRESSION
           
static java.lang.String MONTHS
           
static java.lang.String RESULTS_EXPIRY
           
static java.lang.String WEEKS
           
 
Constructor Summary
BuildExpiryConfig()
           
BuildExpiryConfig(java.util.Collection<BuildExpiryType> expiryType, int duration, java.lang.String period, int buildsToKeep)
           
BuildExpiryConfig(java.util.Collection<BuildExpiryType> expiryType, int duration, java.lang.String period, int buildsToKeep, java.lang.String excludeLabels, java.lang.String labelsToKeep)
           
BuildExpiryConfig(int buildsToKeep)
           
BuildExpiryConfig(int duration, java.lang.String period)
           
BuildExpiryConfig(int duration, java.lang.String period, int buildsToKeep)
           
 
Method Summary
 boolean equals(java.lang.Object o)
           
 java.util.Collection<BuildExpiryType> getBuildExpiryTypes()
           
 java.lang.String getBuildExpiryTypesLabel()
           
 int getBuildsToKeep()
           
 java.lang.String getCronExpression()
           
 int getDuration()
           
 java.lang.String getExcludeLabels()
           
 org.joda.time.Period getExpiryPeriod()
          Get the expiry period as a Joda time Period object
 boolean getExpiryTypeArtifact()
           
 boolean getExpiryTypeBuildLog()
           
 boolean getExpiryTypeResult()
           
 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 isDisabled()
           
 boolean isExpireByBuild()
           
 boolean isExpireByDate()
           
 void setBuildExpiryTypes(java.util.Collection<BuildExpiryType> expiryTypes)
           
 void setBuildsToKeep(int buildsToKeep)
           
 void setCronExpression(java.lang.String cronExpression)
           
 void setDisabled(boolean enabled)
           
 void setDuration(int myDuration)
           
 void setExcludeLabels(java.lang.String excludeLabels)
           
 void setExpiryTypeArtifact(boolean expiryTypeArtifact)
           
 void setExpiryTypeBuildLog(boolean expiryTypeBuildLog)
           
 void setExpiryTypeResult(boolean expiryTypeResult)
           
 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

BUILD_LOG_EXPIRY

public static final java.lang.String BUILD_LOG_EXPIRY
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

DEFAULT_CRON_EXPRESSION

public static final java.lang.String DEFAULT_CRON_EXPRESSION
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.util.Collection<BuildExpiryType> expiryType,
                         int duration,
                         java.lang.String period,
                         int buildsToKeep)

BuildExpiryConfig

public BuildExpiryConfig(java.util.Collection<BuildExpiryType> expiryType,
                         int duration,
                         java.lang.String period,
                         int buildsToKeep,
                         java.lang.String excludeLabels,
                         java.lang.String labelsToKeep)
Method Detail

getExpiryTypeResult

public boolean getExpiryTypeResult()

setExpiryTypeResult

public void setExpiryTypeResult(boolean expiryTypeResult)

getExpiryTypeArtifact

public boolean getExpiryTypeArtifact()

setExpiryTypeArtifact

public void setExpiryTypeArtifact(boolean expiryTypeArtifact)

getExpiryTypeBuildLog

public boolean getExpiryTypeBuildLog()

setExpiryTypeBuildLog

public void setExpiryTypeBuildLog(boolean expiryTypeBuildLog)

getBuildExpiryTypes

public java.util.Collection<BuildExpiryType> getBuildExpiryTypes()

getBuildExpiryTypesLabel

public java.lang.String getBuildExpiryTypesLabel()

setBuildExpiryTypes

public void setBuildExpiryTypes(java.util.Collection<BuildExpiryType> expiryTypes)

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)

getCronExpression

@NotNull
public java.lang.String getCronExpression()

setCronExpression

public void setCronExpression(java.lang.String cronExpression)

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

isDisabled

public boolean isDisabled()

setDisabled

public void setDisabled(boolean enabled)

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 © 2010 Atlassian. All Rights Reserved.