Class MutableExpiryCriteria
- java.lang.Object
 - 
- com.atlassian.bamboo.resultsummary.MutableExpiryCriteria
 
 
- 
- All Implemented Interfaces:
 ExpiryCriteria
public class MutableExpiryCriteria extends Object implements ExpiryCriteria
A mutable version ofExpiryCriteria. 
- 
- 
Field Summary
Fields Modifier and Type Field Description protected com.google.common.collect.ImmutableSet<String>labelsToExcludeprotected org.joda.time.DateTimemaxBuildCompletedDateprotected IntegermaxBuildNumberprotected LongmaxIgnoredLogSizeprotected longmaxResultsprotected IntegerminBuildNumberToKeepprotected PlanKeyplanKeyprotected booleanrequireArtifactLinksprotected Class<? extends ResultsSummary>resultsSummaryClass 
- 
Constructor Summary
Constructors Constructor Description MutableExpiryCriteria(@NotNull PlanKey planKey) 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @NotNull Set<String>getLabelsToExclude()A set of labellings to exclude from the search (so to avoid expiring build results with certain labels).@Nullable org.joda.time.DateTimegetMaxBuildCompletedDate()A criterion for result summaries completion date - will cause to fetch only results completed before the date.@Nullable IntegergetMaxBuildNumber()A criterion for result summaries that will cause to fetch only results with smaller than or equal build number.@Nullable LonggetMaxIgnoredLogSize()A threshold for result summariesImmutableResultsSummary.getLogSize()- the log size must be either unknown or greater than the given value.intgetMaxResults()Number of results to return.IntegergetMinBuildNumberToKeep()A criterion for result summaries that will cause to fetch results with smaller build number, regardless ofExpiryCriteria.getMaxBuildCompletedDate()@NotNull PlanKeygetPlanKey()A plan key by which theresult summariesshould be filtered.@NotNull Class<? extends ResultsSummary>getResultsSummaryClass()The actual class of returned result summaries (eg.booleanisRequireArtifactLinks()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).voidsetLabelsToExclude(@NotNull Iterable<String> labelsToExclude)voidsetMaxBuildCompletedDate(@Nullable org.joda.time.DateTime maxBuildCompletedDate)voidsetMaxBuildNumber(@Nullable Integer maxBuildNumber)voidsetMaxIgnoredLogSize(@Nullable Long maxIgnoredLogSize)voidsetMaxResults(long maxResults)voidsetMinBuildNumberToKeep(Integer minBuildNumberToKeep)voidsetRequireArtifactLinks(boolean requireArtifactLinks) 
 - 
 
- 
- 
Field Detail
- 
planKey
protected PlanKey planKey
 
- 
resultsSummaryClass
protected Class<? extends ResultsSummary> resultsSummaryClass
 
- 
requireArtifactLinks
protected boolean requireArtifactLinks
 
- 
maxIgnoredLogSize
protected Long maxIgnoredLogSize
 
- 
maxBuildNumber
protected Integer maxBuildNumber
 
- 
minBuildNumberToKeep
protected Integer minBuildNumberToKeep
 
- 
maxBuildCompletedDate
protected org.joda.time.DateTime maxBuildCompletedDate
 
- 
labelsToExclude
protected com.google.common.collect.ImmutableSet<String> labelsToExclude
 
- 
maxResults
protected long maxResults
 
 - 
 
- 
Constructor Detail
- 
MutableExpiryCriteria
public MutableExpiryCriteria(@NotNull @NotNull PlanKey planKey) 
 - 
 
- 
Method Detail
- 
getPlanKey
@NotNull public @NotNull PlanKey getPlanKey()
Description copied from interface:ExpiryCriteriaA plan key by which theresult summariesshould be filtered.- Specified by:
 getPlanKeyin interfaceExpiryCriteria
 
- 
getResultsSummaryClass
@NotNull public @NotNull Class<? extends ResultsSummary> getResultsSummaryClass()
Description copied from interface:ExpiryCriteriaThe actual class of returned result summaries (eg.ChainResultsSummaryorBuildResultsSummary).- Specified by:
 getResultsSummaryClassin interfaceExpiryCriteria
 
- 
isRequireArtifactLinks
public boolean isRequireArtifactLinks()
Description copied from interface:ExpiryCriteriaA 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:
 isRequireArtifactLinksin interfaceExpiryCriteria
 
- 
getMaxIgnoredLogSize
@Nullable public @Nullable Long getMaxIgnoredLogSize()
Description copied from interface:ExpiryCriteriaA 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:
 getMaxIgnoredLogSizein interfaceExpiryCriteria- Returns:
 - the log size threshold (inclusive) or null, if the criterion is not set
 
 
- 
getMaxBuildNumber
@Nullable public @Nullable Integer getMaxBuildNumber()
Description copied from interface:ExpiryCriteriaA criterion for result summaries that will cause to fetch only results with smaller than or equal build number.- Specified by:
 getMaxBuildNumberin interfaceExpiryCriteria- Returns:
 - the maximum result build number or null, if the criterion is not set
 
 
- 
getMaxBuildCompletedDate
@Nullable public @Nullable org.joda.time.DateTime getMaxBuildCompletedDate()
Description copied from interface:ExpiryCriteriaA criterion for result summaries completion date - will cause to fetch only results completed before the date.- Specified by:
 getMaxBuildCompletedDatein interfaceExpiryCriteria- Returns:
 - the date or null, if the criterion is not set
 
 
- 
getLabelsToExclude
@NotNull public @NotNull Set<String> getLabelsToExclude()
Description copied from interface:ExpiryCriteriaA set of labellings to exclude from the search (so to avoid expiring build results with certain labels).- Specified by:
 getLabelsToExcludein interfaceExpiryCriteria- Returns:
 - an immutable set of labels to exclude
 
 
- 
getMaxResults
public int getMaxResults()
Description copied from interface:ExpiryCriteriaNumber of results to return.- Specified by:
 getMaxResultsin interfaceExpiryCriteria
 
- 
setRequireArtifactLinks
public void setRequireArtifactLinks(boolean requireArtifactLinks)
 
- 
setMaxIgnoredLogSize
public void setMaxIgnoredLogSize(@Nullable @Nullable Long maxIgnoredLogSize) 
- 
setMaxBuildNumber
public void setMaxBuildNumber(@Nullable @Nullable Integer maxBuildNumber) 
- 
setMaxBuildCompletedDate
public void setMaxBuildCompletedDate(@Nullable @Nullable org.joda.time.DateTime maxBuildCompletedDate) 
- 
setLabelsToExclude
public void setLabelsToExclude(@NotNull @NotNull Iterable<String> labelsToExclude) 
- 
setMaxResults
public void setMaxResults(long maxResults)
 
- 
getMinBuildNumberToKeep
public Integer getMinBuildNumberToKeep()
Description copied from interface:ExpiryCriteriaA criterion for result summaries that will cause to fetch results with smaller build number, regardless ofExpiryCriteria.getMaxBuildCompletedDate()- Specified by:
 getMinBuildNumberToKeepin interfaceExpiryCriteria- Returns:
 - the first build number that should be kept or null, if the criterion is not set
 
 
- 
setMinBuildNumberToKeep
public void setMinBuildNumberToKeep(Integer minBuildNumberToKeep)
 
 - 
 
 -