public class BuildExpiryConfig extends Object implements Serializable
Modifier and Type | Field and 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 and Description |
---|
BuildExpiryConfig() |
BuildExpiryConfig(Collection<BuildExpiryType> expiryType,
int duration,
String period,
int buildsToKeep) |
BuildExpiryConfig(Collection<BuildExpiryType> expiryType,
int duration,
String period,
int buildsToKeep,
String labelsToKeep) |
BuildExpiryConfig(int buildsToKeep) |
BuildExpiryConfig(int duration,
String period) |
BuildExpiryConfig(int duration,
String period,
int buildsToKeep) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
Collection<BuildExpiryType> |
getBuildExpiryTypes() |
int |
getBuildsToKeep() |
String |
getCronExpression() |
int |
getDuration() |
org.joda.time.Period |
getExpiryPeriod()
Get the expiry period as a Joda time
Period object |
List<String> |
getLabelsList()
Returns an immutable list of labels that should be matched
|
String |
getLabelsToKeep()
Deprecated.
since 5.7 refer to
getLabelsList() |
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() |
public static final String DAYS
public static final String WEEKS
public static final String MONTHS
public static final String BUILD_LOG_EXPIRY
public static final String ARTIFACT_EXPIRY
public static final String RESULTS_EXPIRY
public static final String NOTHING_EXPIRY
public static final String DEFAULT_CRON_EXPRESSION
public static final long REMOVE_ALL_LOGS
public BuildExpiryConfig()
public BuildExpiryConfig(int buildsToKeep)
public BuildExpiryConfig(int duration, String period)
public BuildExpiryConfig(int duration, String period, int buildsToKeep)
public BuildExpiryConfig(Collection<BuildExpiryType> expiryType, int duration, String period, int buildsToKeep)
public BuildExpiryConfig(Collection<BuildExpiryType> expiryType, int duration, String period, int buildsToKeep, String labelsToKeep)
public boolean isExpiryTypeNothing()
public void setExpiryTypeNothing(boolean expiryTypeNothing)
public boolean isExpiryTypeResult()
public void setExpiryTypeResult(boolean expiryTypeResult)
public boolean isExpiryTypeArtifact()
public void setExpiryTypeArtifact(boolean expiryTypeArtifact)
public boolean isExpiryTypeBuildLog()
public void setExpiryTypeBuildLog(boolean expiryTypeBuildLog)
@NotNull public Collection<BuildExpiryType> getBuildExpiryTypes()
public void setBuildExpiryTypes(Collection<BuildExpiryType> expiryTypes)
public String getPeriod()
public int getDuration()
public int getBuildsToKeep()
public void setBuildsToKeep(int buildsToKeep)
public void setPeriod(String myPeriod)
public void setDuration(int myDuration)
public boolean isExpireByDate()
public boolean isExpireByBuild()
@Deprecated @Nullable public String getLabelsToKeep()
getLabelsList()
public void setLabelsToKeep(String labelsToKeep)
public int getMaximumBuildsToKeep()
public void setMaximumBuildsToKeep(int maximumBuildsToKeep)
public boolean hasMaximumBuildsToKeep()
@NotNull public String getCronExpression()
public void setCronExpression(String cronExpression)
@NotNull public List<String> getLabelsList()
public org.joda.time.Period getExpiryPeriod()
Period
objectIllegalArgumentException
- if the period text is of an unknown typepublic long getMaxIgnoredLogSize()
public void setMaxIgnoredLogSize(long maxIgnoredLogSize)
public boolean isEnabled()
public void setEnabled(boolean enabled)
protected Object readResolve()
Copyright © 2019 Atlassian Software Systems Pty Ltd. All rights reserved.