Class BuildExpiryConfig
java.lang.Object
com.atlassian.bamboo.build.expiry.BuildExpiryConfig
- All Implemented Interfaces:
Serializable
This class is a simple POJO containing the BuildExpiry configuration settings.
- See Also:
-
Field Summary
-
Constructor Summary
ConstructorDescriptionBuildExpiryConfig
(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
Modifier and TypeMethodDescriptionboolean
@NotNull Collection<BuildExpiryType>
int
@NotNull String
int
Get the expiry period as aPeriod
objectReturns an immutable list of labels that should be matched@Nullable String
Deprecated.long
int
One of "days", "weeks", or "months"int
hashCode()
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
protected Object
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
static Period
toString()
-
Field Details
-
DAYS
- See Also:
-
WEEKS
- See Also:
-
MONTHS
- See Also:
-
BUILD_LOG_EXPIRY
- See Also:
-
ARTIFACT_EXPIRY
- See Also:
-
RESULTS_EXPIRY
- See Also:
-
NOTHING_EXPIRY
- See Also:
-
DEFAULT_CRON_EXPRESSION
- See Also:
-
REMOVE_ALL_LOGS
public static final long REMOVE_ALL_LOGS- See Also:
-
-
Constructor Details
-
BuildExpiryConfig
public BuildExpiryConfig() -
BuildExpiryConfig
public BuildExpiryConfig(int buildsToKeep) -
BuildExpiryConfig
-
BuildExpiryConfig
-
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 Details
-
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
-
setBuildExpiryTypes
-
getPeriod
One of "days", "weeks", or "months" -
getDuration
public int getDuration() -
getBuildsToKeep
public int getBuildsToKeep() -
setBuildsToKeep
public void setBuildsToKeep(int buildsToKeep) -
setPeriod
-
setDuration
public void setDuration(int myDuration) -
isExpireByDate
public boolean isExpireByDate() -
isExpireByBuild
public boolean isExpireByBuild() -
getLabelsToKeep
Deprecated.since 5.7 refer togetLabelsList()
-
setLabelsToKeep
-
getMaximumBuildsToKeep
public int getMaximumBuildsToKeep() -
setMaximumBuildsToKeep
public void setMaximumBuildsToKeep(int maximumBuildsToKeep) -
hasMaximumBuildsToKeep
public boolean hasMaximumBuildsToKeep() -
getCronExpression
-
setCronExpression
-
getLabelsList
Returns an immutable list of labels that should be matched- Returns:
- immutable list of Strings representing the labels
-
getExpiryPeriod
Get the expiry period as aPeriod
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) -
equals
-
hashCode
public int hashCode() -
toPeriod
-
toString
-
readResolve
-
getLabelsList()