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
ConstructorsConstructorDescriptionRepositoryTestServiceImpl(RepositoryDefinitionManager repositoryDefinitionManager, VcsRepositoryManager vcsRepositoryManager, VcsRepositoryConfigurationService vcsRepositoryConfigurationService, RssPermissionManager rssPermissionManager, ProjectManager projectManager) -
Method Summary
Modifier and TypeMethodDescription@NotNull RestRepositoryDefinitioncreateLinkedRepository(@NotNull RestRepositoryConfig repositoryConfig, @NotNull com.atlassian.user.User user) Creates a linked repository as a specific user.voidDeletes all linked repositories.booleandeleteLinkedRepository(long repositoryId) Deletes a linked repository.booleandeleteLinkedRepository(String repositoryName) Deletes a linked repository.booleanEnables RSS and gives access to all projects for given repositorybooleanEnables RSSbooleanisRssEnabled(String repositoryName) booleanrevokeRSSAccessToAllProjects(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:RepositoryTestServiceCreates a linked repository as a specific user. This method has a lot lof limitations, and currently only supports few types of repositories.- Specified by:
createLinkedRepositoryin 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:RepositoryTestServiceDeletes 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:
deleteLinkedRepositoryin interfaceRepositoryTestService- Parameters:
repositoryId- id of the linked repository to delete- Returns:
- true if deletion was successful, false otherwise
-
deleteLinkedRepository
Description copied from interface:RepositoryTestServiceDeletes 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:
deleteLinkedRepositoryin 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:RepositoryTestServiceDeletes all linked repositories.- Specified by:
deleteAllLinkedRepositoriesin interfaceRepositoryTestService
-
enableRss
Description copied from interface:RepositoryTestServiceEnables RSS and gives access to all projects for given repository- Specified by:
enableRssin interfaceRepositoryTestService- Parameters:
repositoryName- name of the linked repository
-
enableRss
Description copied from interface:RepositoryTestServiceEnables RSS- Specified by:
enableRssin interfaceRepositoryTestService- Parameters:
repositoryName- name of the project repositoryprojectKey- project Key
-
isRssEnabled
- Specified by:
isRssEnabledin 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:RepositoryTestServiceRevokes RSS repository access to all projects- Specified by:
revokeRSSAccessToAllProjectsin interfaceRepositoryTestService- Parameters:
repositoryName- name of the linked repository- Returns:
- true if revoking access was successful, false otherwise
-