Class RepositoryFinder

java.lang.Object
com.atlassian.bamboo.plugins.git.api.RepositoryFinder
Direct Known Subclasses:
BitbucketRepositoryFinder, GithubRepositoryFinder

public abstract class RepositoryFinder extends Object
The RepositoryFinder class is an abstract class that provides methods to find and filter repositories based on certain criteria. It is used in the context of handling webhooks for Git-based repositories in Bamboo.
Since:
10.1
  • Field Details

  • Constructor Details

  • Method Details

    • getPluginKey

      protected abstract String getPluginKey()
      Returns the plugin key for the repository. This method must be implemented by subclasses.
      Returns:
      the plugin key for the repository
    • getIndexKeyFromSlug

      protected abstract VcsLocationIndexKey getIndexKeyFromSlug(@NotNull @NotNull String repositorySlug)
      Returns the indexing key based on repositorySlug.
      Since:
      12.0
    • getIndexKey

      @Nullable protected @Nullable VcsLocationIndexKey getIndexKey(@NotNull @NotNull VcsRepositoryData repositoryData)
      Returns the repository index key based on stored data.
      Since:
      12.0
    • findMatchingRepositories

      @NotNull public @NotNull Stream<VcsRepositoryData> findMatchingRepositories(@NotNull @NotNull String repositorySlug, @NotNull @NotNull Collection<GitRef> refs)
      Finds and returns a Stream of VcsRepositoryData objects that match the specified repository slug and collection of GitRef objects.
      Parameters:
      repositorySlug - the repository slug to match
      refs - the collection of GitRef objects to match
      Returns:
      a Stream of matching VcsRepositoryData objects
    • repoMatchesBranch

      @NotNull public static @NotNull Predicate<? super VcsRepositoryData> repoMatchesBranch(@NotNull BambooStringUtils.AffixFilteringTree refsFilteringTree)
    • findRepositories

      protected Stream<VcsRepositoryData> findRepositories(@NotNull @NotNull String repositorySlug)