Class RepositoryTestServiceImpl
java.lang.Object
com.atlassian.bamboo.plugins.testutils.repository.RepositoryTestServiceImpl
- All Implemented Interfaces:
RepositoryTestService
Provides Repository-related functionality for functional testing
-
Constructor Summary
ConstructorDescriptionRepositoryTestServiceImpl
(RepositoryDefinitionManager repositoryDefinitionManager, VcsRepositoryManager vcsRepositoryManager, VcsRepositoryConfigurationService vcsRepositoryConfigurationService, RssPermissionManager rssPermissionManager, ProjectManager projectManager) -
Method Summary
Modifier and TypeMethodDescription@NotNull RestRepositoryDefinition
createLinkedRepository
(@NotNull RestRepositoryConfig repositoryConfig, @NotNull com.atlassian.user.User user) Creates a linked repository as a specific user.void
Deletes all linked repositories.boolean
deleteLinkedRepository
(long repositoryId) Deletes a linked repository.boolean
deleteLinkedRepository
(String repositoryName) Deletes a linked repository.boolean
Enables RSS and gives access to all projects for given repositoryboolean
Enables RSSboolean
isRssEnabled
(String repositoryName) boolean
revokeRSSAccessToAllProjects
(String repositoryName) Revokes RSS repository access to all projects
-
Constructor Details
-
RepositoryTestServiceImpl
@Autowired public RepositoryTestServiceImpl(RepositoryDefinitionManager repositoryDefinitionManager, VcsRepositoryManager vcsRepositoryManager, VcsRepositoryConfigurationService vcsRepositoryConfigurationService, RssPermissionManager rssPermissionManager, ProjectManager projectManager)
-
-
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 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
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
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
Description copied from interface:RepositoryTestService
Enables RSS- Specified by:
enableRss
in interfaceRepositoryTestService
- Parameters:
repositoryName
- name of the project repositoryprojectKey
- project Key
-
isRssEnabled
- 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
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
-