Class BuildExpiryConfig

java.lang.Object
com.atlassian.bamboo.build.expiry.BuildExpiryConfig
All Implemented Interfaces:
Serializable

public class BuildExpiryConfig extends Object implements Serializable
This class is a simple POJO containing the BuildExpiry configuration settings.
See Also:
  • Field Details

  • Constructor Details

    • BuildExpiryConfig

      public BuildExpiryConfig()
    • BuildExpiryConfig

      public BuildExpiryConfig(int buildsToKeep)
    • BuildExpiryConfig

      public BuildExpiryConfig(int duration, String period)
    • BuildExpiryConfig

      public BuildExpiryConfig(int duration, String period, int buildsToKeep)
    • 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

      @NotNull public @NotNull Collection<BuildExpiryType> getBuildExpiryTypes()
    • setBuildExpiryTypes

      public void setBuildExpiryTypes(Collection<BuildExpiryType> expiryTypes)
    • getPeriod

      public String getPeriod()
      One of "days", "weeks", or "months"
    • getDuration

      public int getDuration()
    • getBuildsToKeep

      public int getBuildsToKeep()
    • setBuildsToKeep

      public void setBuildsToKeep(int buildsToKeep)
    • setPeriod

      public void setPeriod(String myPeriod)
    • setDuration

      public void setDuration(int myDuration)
    • isExpireByDate

      public boolean isExpireByDate()
    • isExpireByBuild

      public boolean isExpireByBuild()
    • getLabelsToKeep

      @Deprecated @Nullable public @Nullable String getLabelsToKeep()
      Deprecated.
      since 5.7 refer to getLabelsList()
    • setLabelsToKeep

      public void setLabelsToKeep(String labelsToKeep)
    • getMaximumBuildsToKeep

      public int getMaximumBuildsToKeep()
    • setMaximumBuildsToKeep

      public void setMaximumBuildsToKeep(int maximumBuildsToKeep)
    • hasMaximumBuildsToKeep

      public boolean hasMaximumBuildsToKeep()
    • getCronExpression

      @NotNull public @NotNull String getCronExpression()
    • setCronExpression

      public void setCronExpression(String cronExpression)
    • getLabelsList

      @NotNull public @NotNull List<String> getLabelsList()
      Returns an immutable list of labels that should be matched
      Returns:
      immutable list of Strings representing the labels
    • getExpiryPeriod

      public Period getExpiryPeriod()
      Get the expiry period as a Period 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

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toPeriod

      public static Period toPeriod(int myDuration, String myPeriod)
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • readResolve

      protected Object readResolve()