Class MutableExpiryCriteria

java.lang.Object
com.atlassian.bamboo.resultsummary.MutableExpiryCriteria
All Implemented Interfaces:
ExpiryCriteria

public class MutableExpiryCriteria extends Object implements ExpiryCriteria
A mutable version of ExpiryCriteria.
  • Field Details

    • planKey

      protected PlanKey planKey
    • resultsSummaryClass

      protected Class<? extends ResultsSummary> resultsSummaryClass
    • maxIgnoredLogSize

      protected Long maxIgnoredLogSize
    • maxBuildNumber

      protected Integer maxBuildNumber
    • minBuildNumberToKeep

      protected Integer minBuildNumberToKeep
    • maxBuildCompletedDate

      protected Date maxBuildCompletedDate
    • labelsToExclude

      protected com.google.common.collect.ImmutableSet<String> labelsToExclude
    • maxResults

      protected long maxResults
  • Constructor Details

    • MutableExpiryCriteria

      public MutableExpiryCriteria(@NotNull @NotNull PlanKey planKey)
  • Method Details

    • getPlanKey

      @NotNull public @NotNull PlanKey getPlanKey()
      Description copied from interface: ExpiryCriteria
      A plan key by which the result summaries should be filtered.
      Specified by:
      getPlanKey in interface ExpiryCriteria
    • getResultsSummaryClass

      @NotNull public @NotNull Class<? extends ResultsSummary> getResultsSummaryClass()
      Description copied from interface: ExpiryCriteria
      The actual class of returned result summaries (eg. ChainResultsSummary or BuildResultsSummary).
      Specified by:
      getResultsSummaryClass in interface ExpiryCriteria
    • 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 interface ExpiryCriteria
    • getMaxIgnoredLogSize

      @Nullable public @Nullable Long getMaxIgnoredLogSize()
      Description copied from interface: ExpiryCriteria
      A threshold for result summaries ImmutableResultsSummary.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 interface ExpiryCriteria
      Returns:
      the log size threshold (inclusive) or null, if the criterion is not set
    • getMaxBuildNumber

      @Nullable public @Nullable Integer 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 interface ExpiryCriteria
      Returns:
      the maximum result build number or null, if the criterion is not set
    • getMaxBuildCompletedDate

      @Nullable public @Nullable Date 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 interface ExpiryCriteria
      Returns:
      the date or null, if the criterion is not set
    • getLabelsToExclude

      @NotNull public @NotNull Set<String> 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 interface ExpiryCriteria
      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 interface ExpiryCriteria
    • 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 Date maxBuildCompletedDate)
    • setLabelsToExclude

      public void setLabelsToExclude(@NotNull @NotNull Iterable<String> labelsToExclude)
    • setMaxResults

      public void setMaxResults(long maxResults)
    • getMinBuildNumberToKeep

      public Integer getMinBuildNumberToKeep()
      Description copied from interface: ExpiryCriteria
      A criterion for result summaries that will cause to fetch results with smaller build number, regardless of ExpiryCriteria.getMaxBuildCompletedDate()
      Specified by:
      getMinBuildNumberToKeep in interface ExpiryCriteria
      Returns:
      the first build number that should be kept or null, if the criterion is not set
    • setMinBuildNumberToKeep

      public void setMinBuildNumberToKeep(Integer minBuildNumberToKeep)