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 Summary
Constructors Constructor Description RepositoryTestServiceImpl(RepositoryDefinitionManager repositoryDefinitionManager, VcsRepositoryManager vcsRepositoryManager, VcsRepositoryConfigurationService vcsRepositoryConfigurationService, RssPermissionManager rssPermissionManager, ProjectManager projectManager)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @NotNull RestRepositoryDefinition
createLinkedRepository(@NotNull RestRepositoryConfig repositoryConfig, @NotNull com.atlassian.user.User user)
Creates a linked repository as a specific user.void
deleteAllLinkedRepositories()
Deletes all linked repositories.boolean
deleteLinkedRepository(long repositoryId)
Deletes a linked repository.boolean
deleteLinkedRepository(String repositoryName)
Deletes a linked repository.boolean
enableRss(String repositoryName)
Enables RSS and gives access to all projects for given repositoryboolean
enableRss(String repositoryName, String projectKey)
Enables RSSboolean
isRssEnabled(String repositoryName)
boolean
revokeRSSAccessToAllProjects(String repositoryName)
Revokes RSS repository access to all projects
-
-
-
Constructor Detail
-
RepositoryTestServiceImpl
@Autowired public RepositoryTestServiceImpl(RepositoryDefinitionManager repositoryDefinitionManager, VcsRepositoryManager vcsRepositoryManager, VcsRepositoryConfigurationService vcsRepositoryConfigurationService, RssPermissionManager rssPermissionManager, ProjectManager projectManager)
-
-
Method Detail
-
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 interfaceRepositoryTestService
- Parameters:
repositoryConfig
- repository configurationuser
- 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 interfaceRepositoryTestService
- 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 interfaceRepositoryTestService
- 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 interfaceRepositoryTestService
-
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 interfaceRepositoryTestService
- 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 interfaceRepositoryTestService
- Parameters:
repositoryName
- name of the project repositoryprojectKey
- project Key
-
isRssEnabled
public boolean isRssEnabled(String repositoryName)
- Specified by:
isRssEnabled
in interfaceRepositoryTestService
- 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 interfaceRepositoryTestService
- Parameters:
repositoryName
- name of the linked repository- Returns:
- true if revoking access was successful, false otherwise
-
-