Class RepositoryTestServiceImpl

java.lang.Object
com.atlassian.bamboo.plugins.testutils.repository.RepositoryTestServiceImpl
All Implemented Interfaces:
RepositoryTestService

public class RepositoryTestServiceImpl extends Object implements RepositoryTestService
Provides Repository-related functionality for functional testing
  • Constructor Details

  • Method Details

    • createLinkedRepository

      @NotNull public @NotNull RestRepositoryDefinition createLinkedRepository(@NotNull @NotNull RestRepositoryConfig repositoryConfig, @NotNull @NotNull com.atlassian.user.User user)
      Description copied from interface: RepositoryTestService
      Creates a linked repository as a specific user. This method has a lot lof limitations, and currently only supports few types of repositories.
      Specified by:
      createLinkedRepository in interface RepositoryTestService
      Parameters:
      repositoryConfig - repository configuration
      user - user which is creating the repository
      Returns:
      repository definition with ID of the created repository
    • deleteLinkedRepository

      public boolean deleteLinkedRepository(long repositoryId)
      Description copied from interface: RepositoryTestService
      Deletes a linked repository. Will do nothing if repository with the given ID does not exist - no exception will be thrown, false will be returned instead.
      Specified by:
      deleteLinkedRepository in interface RepositoryTestService
      Parameters:
      repositoryId - id of the linked repository to delete
      Returns:
      true if deletion was successful, false otherwise
    • deleteLinkedRepository

      public boolean deleteLinkedRepository(String repositoryName)
      Description copied from interface: RepositoryTestService
      Deletes a linked repository. Will do nothing if repository with the given name does not exist - no exception will be thrown, false will be returned instead.
      Specified by:
      deleteLinkedRepository in interface RepositoryTestService
      Parameters:
      repositoryName - name of the linked repository to delete
      Returns:
      true if deletion was successful, false otherwise
    • deleteAllLinkedRepositories

      public void deleteAllLinkedRepositories()
      Description copied from interface: RepositoryTestService
      Deletes all linked repositories.
      Specified by:
      deleteAllLinkedRepositories in interface RepositoryTestService
    • enableRss

      public boolean enableRss(String repositoryName)
      Description copied from interface: RepositoryTestService
      Enables RSS and gives access to all projects for given repository
      Specified by:
      enableRss in interface RepositoryTestService
      Parameters:
      repositoryName - name of the linked repository
    • enableRss

      public boolean enableRss(String repositoryName, String projectKey)
      Description copied from interface: RepositoryTestService
      Enables RSS
      Specified by:
      enableRss in interface RepositoryTestService
      Parameters:
      repositoryName - name of the project repository
      projectKey - project Key
    • isRssEnabled

      public boolean isRssEnabled(String repositoryName)
      Specified by:
      isRssEnabled in interface RepositoryTestService
      Parameters:
      repositoryName - name of the linked repository
      Returns:
      true if Repository Stored Specs are enabled for given repository, false otherwise
    • revokeRSSAccessToAllProjects

      public boolean revokeRSSAccessToAllProjects(String repositoryName)
      Description copied from interface: RepositoryTestService
      Revokes RSS repository access to all projects
      Specified by:
      revokeRSSAccessToAllProjects in interface RepositoryTestService
      Parameters:
      repositoryName - name of the linked repository
      Returns:
      true if revoking access was successful, false otherwise