Interface RepositoryTestService
-
- All Known Implementing Classes:
RepositoryTestServiceImpl
public interface RepositoryTestService
Provides repository-related functionality for functional testing.
-
-
Method Summary
All Methods Instance Methods Abstract 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
-
-
-
Method Detail
-
createLinkedRepository
@NotNull @NotNull RestRepositoryDefinition createLinkedRepository(@NotNull @NotNull RestRepositoryConfig repositoryConfig, @NotNull @NotNull com.atlassian.user.User user)
Creates a linked repository as a specific user. This method has a lot lof limitations, and currently only supports few types of repositories.- Parameters:
repositoryConfig
- repository configurationuser
- user which is creating the repository- Returns:
- repository definition with ID of the created repository
-
deleteLinkedRepository
boolean deleteLinkedRepository(long repositoryId)
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.- Parameters:
repositoryId
- id of the linked repository to delete- Returns:
- true if deletion was successful, false otherwise
-
deleteLinkedRepository
boolean deleteLinkedRepository(String repositoryName)
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.- Parameters:
repositoryName
- name of the linked repository to delete- Returns:
- true if deletion was successful, false otherwise
-
deleteAllLinkedRepositories
void deleteAllLinkedRepositories()
Deletes all linked repositories.
-
enableRss
boolean enableRss(String repositoryName)
Enables RSS and gives access to all projects for given repository- Parameters:
repositoryName
- name of the linked repository
-
enableRss
boolean enableRss(String repositoryName, String projectKey)
Enables RSS- Parameters:
repositoryName
- name of the project repositoryprojectKey
- project Key
-
isRssEnabled
boolean isRssEnabled(String repositoryName)
- Parameters:
repositoryName
- name of the linked repository- Returns:
- true if Repository Stored Specs are enabled for given repository, false otherwise
-
revokeRSSAccessToAllProjects
boolean revokeRSSAccessToAllProjects(String repositoryName)
Revokes RSS repository access to all projects- Parameters:
repositoryName
- name of the linked repository- Returns:
- true if revoking access was successful, false otherwise
-
-