Class MutableExpiryCriteria
java.lang.Object
com.atlassian.bamboo.resultsummary.MutableExpiryCriteria
- All Implemented Interfaces:
ExpiryCriteria
A mutable version of
ExpiryCriteria
.-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionA set of labellings to exclude from the search (so to avoid expiring build results with certain labels).@Nullable Date
A criterion for result summaries completion date - will cause to fetch only results completed before the date.@Nullable Integer
A criterion for result summaries that will cause to fetch only results with smaller than or equal build number.@Nullable Long
A threshold for result summariesImmutableResultsSummary.getLogSize()
- the log size must be either unknown or greater than the given value.int
Number of results to return.A criterion for result summaries that will cause to fetch results with smaller build number, regardless ofExpiryCriteria.getMaxBuildCompletedDate()
@NotNull PlanKey
A plan key by which theresult summaries
should be filtered.@NotNull Class<? extends ResultsSummary>
The actual class of returned result summaries (eg.boolean
A filter for result summaries that requires them to have a directly or indirectly linked artifact (eg.void
setLabelsToExclude
(@NotNull Iterable<String> labelsToExclude) void
setMaxBuildCompletedDate
(@Nullable Date maxBuildCompletedDate) void
setMaxBuildNumber
(@Nullable Integer maxBuildNumber) void
setMaxIgnoredLogSize
(@Nullable Long maxIgnoredLogSize) void
setMaxResults
(long maxResults) void
setMinBuildNumberToKeep
(Integer minBuildNumberToKeep) void
setRequireArtifactLinks
(boolean requireArtifactLinks)
-
Field Details
-
planKey
-
resultsSummaryClass
-
requireArtifactLinks
protected boolean requireArtifactLinks -
maxIgnoredLogSize
-
maxBuildNumber
-
minBuildNumberToKeep
-
maxBuildCompletedDate
-
labelsToExclude
-
maxResults
protected long maxResults
-
-
Constructor Details
-
MutableExpiryCriteria
-
-
Method Details
-
getPlanKey
Description copied from interface:ExpiryCriteria
A plan key by which theresult summaries
should be filtered.- Specified by:
getPlanKey
in interfaceExpiryCriteria
-
getResultsSummaryClass
Description copied from interface:ExpiryCriteria
The actual class of returned result summaries (eg.ChainResultsSummary
orBuildResultsSummary
).- Specified by:
getResultsSummaryClass
in interfaceExpiryCriteria
-
isRequireArtifactLinks
public boolean isRequireArtifactLinks()Description copied from interface:ExpiryCriteria
A filter for result summaries that requires them to have a directly or indirectly linked artifact (eg. an artifact link exists for a job result of a chain result).Note that this search criterion and
ExpiryCriteria.getMaxIgnoredLogSize()
criterion are a disjunction (either of the conditions must be met).- Specified by:
isRequireArtifactLinks
in interfaceExpiryCriteria
-
getMaxIgnoredLogSize
Description copied from interface:ExpiryCriteria
A threshold for result summariesImmutableResultsSummary.getLogSize()
- the log size must be either unknown or greater than the given value.Note that this search criterion and
ExpiryCriteria.isRequireArtifactLinks()
criterion are a disjunction (either of the conditions must be met).- Specified by:
getMaxIgnoredLogSize
in interfaceExpiryCriteria
- Returns:
- the log size threshold (inclusive) or null, if the criterion is not set
-
getMaxBuildNumber
Description copied from interface:ExpiryCriteria
A criterion for result summaries that will cause to fetch only results with smaller than or equal build number.- Specified by:
getMaxBuildNumber
in interfaceExpiryCriteria
- Returns:
- the maximum result build number or null, if the criterion is not set
-
getMaxBuildCompletedDate
Description copied from interface:ExpiryCriteria
A criterion for result summaries completion date - will cause to fetch only results completed before the date.- Specified by:
getMaxBuildCompletedDate
in interfaceExpiryCriteria
- Returns:
- the date or null, if the criterion is not set
-
getLabelsToExclude
Description copied from interface:ExpiryCriteria
A set of labellings to exclude from the search (so to avoid expiring build results with certain labels).- Specified by:
getLabelsToExclude
in interfaceExpiryCriteria
- Returns:
- an immutable set of labels to exclude
-
getMaxResults
public int getMaxResults()Description copied from interface:ExpiryCriteria
Number of results to return.- Specified by:
getMaxResults
in interfaceExpiryCriteria
-
setRequireArtifactLinks
public void setRequireArtifactLinks(boolean requireArtifactLinks) -
setMaxIgnoredLogSize
-
setMaxBuildNumber
-
setMaxBuildCompletedDate
-
setLabelsToExclude
-
setMaxResults
public void setMaxResults(long maxResults) -
getMinBuildNumberToKeep
Description copied from interface:ExpiryCriteria
A criterion for result summaries that will cause to fetch results with smaller build number, regardless ofExpiryCriteria.getMaxBuildCompletedDate()
- Specified by:
getMinBuildNumberToKeep
in interfaceExpiryCriteria
- Returns:
- the first build number that should be kept or null, if the criterion is not set
-
setMinBuildNumberToKeep
-