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
    • getRepositorySelector

      protected abstract String getRepositorySelector()
      Returns the repository selector. This method must be implemented by subclasses.
      Returns:
      the repository selector
    • 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
    • findRepositories

      protected Stream<VcsRepositoryData> findRepositories()
    • isRepositoryMatchingEvent

      public boolean isRepositoryMatchingEvent(@NotNull @NotNull String repositorySlug, @NotNull @NotNull VcsRepositoryData vcsRepositoryData)
      Checks if a given VcsRepositoryData object matches a specified repository slug.
      Parameters:
      repositorySlug - the repository slug to match
      vcsRepositoryData - the VcsRepositoryData object to check
      Returns:
      true if the VcsRepositoryData object matches the repository slug, false otherwise