Class BuildExpiryConfig
- java.lang.Object
-
- com.atlassian.bamboo.build.expiry.BuildExpiryConfig
-
- All Implemented Interfaces:
Serializable
public class BuildExpiryConfig extends Object implements Serializable
This class is a simple POJO containing the BuildExpiry configuration settings.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static String
ARTIFACT_EXPIRY
static String
BUILD_LOG_EXPIRY
static String
DAYS
static String
DEFAULT_CRON_EXPRESSION
static String
MONTHS
static String
NOTHING_EXPIRY
static long
REMOVE_ALL_LOGS
static String
RESULTS_EXPIRY
static String
WEEKS
-
Constructor Summary
Constructors Constructor Description BuildExpiryConfig()
BuildExpiryConfig(int buildsToKeep)
BuildExpiryConfig(int duration, String period)
BuildExpiryConfig(int duration, String period, int buildsToKeep)
BuildExpiryConfig(Collection<BuildExpiryType> expiryType, int duration, String period, int buildsToKeep)
BuildExpiryConfig(Collection<BuildExpiryType> expiryType, int duration, String period, int buildsToKeep, String labelsToKeep)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description boolean
equals(Object o)
@NotNull Collection<BuildExpiryType>
getBuildExpiryTypes()
int
getBuildsToKeep()
@NotNull String
getCronExpression()
int
getDuration()
org.joda.time.Period
getExpiryPeriod()
Get the expiry period as a Joda timePeriod
object@NotNull List<String>
getLabelsList()
Returns an immutable list of labels that should be matched@Nullable String
getLabelsToKeep()
Deprecated.since 5.7 refer togetLabelsList()
long
getMaxIgnoredLogSize()
int
getMaximumBuildsToKeep()
String
getPeriod()
One of "days", "weeks", or "months"int
hashCode()
boolean
hasMaximumBuildsToKeep()
boolean
isEnabled()
boolean
isExpireByBuild()
boolean
isExpireByDate()
boolean
isExpiryTypeArtifact()
boolean
isExpiryTypeBuildLog()
boolean
isExpiryTypeNothing()
boolean
isExpiryTypeResult()
protected Object
readResolve()
void
setBuildExpiryTypes(Collection<BuildExpiryType> expiryTypes)
void
setBuildsToKeep(int buildsToKeep)
void
setCronExpression(String cronExpression)
void
setDuration(int myDuration)
void
setEnabled(boolean enabled)
void
setExpiryTypeArtifact(boolean expiryTypeArtifact)
void
setExpiryTypeBuildLog(boolean expiryTypeBuildLog)
void
setExpiryTypeNothing(boolean expiryTypeNothing)
void
setExpiryTypeResult(boolean expiryTypeResult)
void
setLabelsToKeep(String labelsToKeep)
void
setMaxIgnoredLogSize(long maxIgnoredLogSize)
void
setMaximumBuildsToKeep(int maximumBuildsToKeep)
void
setPeriod(String myPeriod)
String
toString()
-
-
-
Field Detail
-
DAYS
public static final String DAYS
- See Also:
- Constant Field Values
-
WEEKS
public static final String WEEKS
- See Also:
- Constant Field Values
-
MONTHS
public static final String MONTHS
- See Also:
- Constant Field Values
-
BUILD_LOG_EXPIRY
public static final String BUILD_LOG_EXPIRY
- See Also:
- Constant Field Values
-
ARTIFACT_EXPIRY
public static final String ARTIFACT_EXPIRY
- See Also:
- Constant Field Values
-
RESULTS_EXPIRY
public static final String RESULTS_EXPIRY
- See Also:
- Constant Field Values
-
NOTHING_EXPIRY
public static final String NOTHING_EXPIRY
- See Also:
- Constant Field Values
-
DEFAULT_CRON_EXPRESSION
public static final String DEFAULT_CRON_EXPRESSION
- See Also:
- Constant Field Values
-
REMOVE_ALL_LOGS
public static final long REMOVE_ALL_LOGS
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
BuildExpiryConfig
public BuildExpiryConfig()
-
BuildExpiryConfig
public BuildExpiryConfig(int buildsToKeep)
-
BuildExpiryConfig
public BuildExpiryConfig(int duration, String period)
-
BuildExpiryConfig
public BuildExpiryConfig(int duration, String period, int buildsToKeep)
-
BuildExpiryConfig
public BuildExpiryConfig(Collection<BuildExpiryType> expiryType, int duration, String period, int buildsToKeep)
-
BuildExpiryConfig
public BuildExpiryConfig(Collection<BuildExpiryType> expiryType, int duration, String period, int buildsToKeep, String labelsToKeep)
-
-
Method Detail
-
isExpiryTypeNothing
public boolean isExpiryTypeNothing()
-
setExpiryTypeNothing
public void setExpiryTypeNothing(boolean expiryTypeNothing)
-
isExpiryTypeResult
public boolean isExpiryTypeResult()
-
setExpiryTypeResult
public void setExpiryTypeResult(boolean expiryTypeResult)
-
isExpiryTypeArtifact
public boolean isExpiryTypeArtifact()
-
setExpiryTypeArtifact
public void setExpiryTypeArtifact(boolean expiryTypeArtifact)
-
isExpiryTypeBuildLog
public boolean isExpiryTypeBuildLog()
-
setExpiryTypeBuildLog
public void setExpiryTypeBuildLog(boolean expiryTypeBuildLog)
-
getBuildExpiryTypes
@NotNull public @NotNull Collection<BuildExpiryType> getBuildExpiryTypes()
-
setBuildExpiryTypes
public void setBuildExpiryTypes(Collection<BuildExpiryType> expiryTypes)
-
getPeriod
public 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(String myPeriod)
-
setDuration
public void setDuration(int myDuration)
-
isExpireByDate
public boolean isExpireByDate()
-
isExpireByBuild
public boolean isExpireByBuild()
-
getLabelsToKeep
@Deprecated @Nullable public @Nullable String getLabelsToKeep()
Deprecated.since 5.7 refer togetLabelsList()
-
setLabelsToKeep
public void setLabelsToKeep(String labelsToKeep)
-
getMaximumBuildsToKeep
public int getMaximumBuildsToKeep()
-
setMaximumBuildsToKeep
public void setMaximumBuildsToKeep(int maximumBuildsToKeep)
-
hasMaximumBuildsToKeep
public boolean hasMaximumBuildsToKeep()
-
getCronExpression
@NotNull public @NotNull String getCronExpression()
-
setCronExpression
public void setCronExpression(String cronExpression)
-
getLabelsList
@NotNull public @NotNull List<String> getLabelsList()
Returns an immutable list of labels that should be matched- Returns:
- immutable list of Strings representing the labels
-
getExpiryPeriod
public org.joda.time.Period getExpiryPeriod()
Get the expiry period as a Joda timePeriod
object- Returns:
- Period
- Throws:
IllegalArgumentException
- if the period text is of an unknown type
-
getMaxIgnoredLogSize
public long getMaxIgnoredLogSize()
-
setMaxIgnoredLogSize
public void setMaxIgnoredLogSize(long maxIgnoredLogSize)
-
isEnabled
public boolean isEnabled()
-
setEnabled
public void setEnabled(boolean enabled)
-
readResolve
protected Object readResolve()
-
-