Class DeleteCommandParameters

java.lang.Object
com.atlassian.bitbucket.util.BuilderSupport
com.atlassian.bitbucket.scm.AbstractCommandParameters
com.atlassian.bitbucket.scm.DeleteCommandParameters

public class DeleteCommandParameters extends com.atlassian.bitbucket.scm.AbstractCommandParameters
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
     
  • Field Summary

    Fields inherited from class com.atlassian.bitbucket.util.BuilderSupport

    NOT_BLANK
  • Method Summary

    Modifier and Type
    Method
    Description
    Provides the IDs of all repositories that were forked from the repository being deleted which have not, themselves, been deleted.
    boolean
    Retrieves a flag indicating whether the deleted repository has forks.
    boolean
    Returns whether the repository that is being deleted was the last fork of the origin repository.
    boolean
    Retrieves a flag indicating whether this repository was the last in its hierarchy, allowing the SCM to perform any additional cleanup that is necessary when an entire hierarchy is deleted.

    Methods inherited from class com.atlassian.bitbucket.util.BuilderSupport

    addIf, addIf, addIf, addIf, addIf, addIf, checkNotBlank, requireNonBlank

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • getForkIds

      @Nonnull public Set<Integer> getForkIds()
      Provides the IDs of all repositories that were forked from the repository being deleted which have not, themselves, been deleted. As the repository has already been deleted from the database, the host application must provide these IDs because it is no longer possible to query for them.

      The returned set will always be empty for the last repository in a hierarchy.

      Returns:
      a set containing 0 or more fork IDs
    • hasForks

      public boolean hasForks()
      Retrieves a flag indicating whether the deleted repository has forks.

      If isLastInHierarchy() is true, this will always be false.

      Returns:
      true if the fork ID set is not empty; otherwise, false
    • isLastForkOfOrigin

      public boolean isLastForkOfOrigin()
      Returns whether the repository that is being deleted was the last fork of the origin repository.

      If hasForks() is true, this will always be false.

      Returns:
      true if the deleted repository was the last remaining fork of the origin; otherwise, false
      Since:
      8.19.4
    • isLastInHierarchy

      public boolean isLastInHierarchy()
      Retrieves a flag indicating whether this repository was the last in its hierarchy, allowing the SCM to perform any additional cleanup that is necessary when an entire hierarchy is deleted.
      Returns:
      true if this repository is the last in its hierarchy; otherwise, false if at least one repository remains in the hierarchy