public class RepositoryControl extends BackdoorControl<RepositoryControl>
BackdoorControl.AddXsrfNoCheckTokenFilter, BackdoorControl.JsonMediaTypeFilter
ADMIN_REST_PATH, API_REST_PATH, DEFAULT_REST_PATH, rootPath
Constructor and Description |
---|
RepositoryControl(BambooEnvironmentData environmentData) |
Modifier and Type | Method and Description |
---|---|
void |
allowRssRepoAccess(String repositoryId,
String targetRepositoryId)
Grant permission of repository defined by repositoryId to use repository defined by
targetRepositoryId in build plans and deployments when import RSS
|
void |
changeRSSAccessToAllProjects(String repositoryId,
boolean canAccessAllProjects)
Changes repository 'all projects access' rss permission.
|
RestRepositoryDefinition |
createLinkedRepository(Repository repository,
String displayName)
Deprecated.
Prefer using
createLinkedRepository(VcsRepository) |
RestRepositoryDefinition |
createLinkedRepository(RestRepositoryConfig restRepositoryConfig)
Deprecated.
Prefer using
createLinkedRepository(VcsRepository) |
Long |
createLinkedRepository(com.atlassian.bamboo.specs.api.builders.repository.VcsRepository vcsRepository)
Creates a linked repository as the default auth user.
|
void |
deleteAllLinkedRepositories()
Deletes all linked repositories.
|
boolean |
deleteLinkedRepository(long repositoryId)
Deletes a linked repository as
TestUser.ADMIN . |
boolean |
deleteLinkedRepository(String repositoryName) |
void |
enableRss(String sharedRepositoryName)
Enables RSS for given repository and grants 'all projects access' permission.
|
List<Long> |
getRssRepositoriesAllowedToAccessRepository(String targetRepositoryId) |
boolean |
isPullRequestClosed(String repositoryName,
String pullRequestKey)
Check if pull request is marked as closed in Bamboo DB
|
boolean |
isRssEnabled(String sharedRepositoryName) |
void |
tearDown()
Cleanup resources
|
void |
triggerRssDetection(String repositoryName)
Trigger RSS detection
|
client, createResource, createResourceForPath, get, getEnvironmentData, getRestModulePath, percentEncode, ping, post, resourceRoot
public RepositoryControl(@NotNull BambooEnvironmentData environmentData)
public void tearDown()
BackdoorControl
tearDown
in class BackdoorControl<RepositoryControl>
@NotNull @Deprecated public RestRepositoryDefinition createLinkedRepository(@NotNull RestRepositoryConfig restRepositoryConfig)
createLinkedRepository(VcsRepository)
tearDown()
.
This method has a lot of limitations - see the relevant backdoor resource for more details.restRepositoryConfig
- repository configurationpublic Long createLinkedRepository(@NotNull com.atlassian.bamboo.specs.api.builders.repository.VcsRepository vcsRepository)
tearDown()
.vcsRepository
- repository configuration@NotNull @Deprecated public RestRepositoryDefinition createLinkedRepository(@NotNull Repository repository, @NotNull String displayName)
createLinkedRepository(VcsRepository)
tearDown()
.
This method has a lot of limitations - see the relevant backdoor resource for more details.repository
- repository configurationdisplayName
- display name of the linked repository to createpublic boolean deleteLinkedRepository(long repositoryId)
TestUser.ADMIN
. Returns true if repository with the given ID existed and
was deleted successfully, false otherwise.repositoryId
- id of the linked repositorypublic boolean deleteLinkedRepository(String repositoryName)
public void deleteAllLinkedRepositories()
public void enableRss(String sharedRepositoryName)
sharedRepositoryName
- namepublic boolean isRssEnabled(String sharedRepositoryName)
public void changeRSSAccessToAllProjects(String repositoryId, boolean canAccessAllProjects) throws com.opensymphony.webwork.dispatcher.json.JSONException
repositoryId
- linked repository idcanAccessAllProjects
- true if repository should have all projects access, false otherwisecom.opensymphony.webwork.dispatcher.json.JSONException
public boolean isPullRequestClosed(String repositoryName, String pullRequestKey)
public void allowRssRepoAccess(String repositoryId, String targetRepositoryId)
repositoryId
- which will have USE permission grantedtargetRepositoryId
- which can be used by RSS code in repositoryId repositorypublic List<Long> getRssRepositoriesAllowedToAccessRepository(String targetRepositoryId)
targetRepositoryId
- repository idpublic void triggerRssDetection(@NotNull String repositoryName)
repositoryName
- nameCopyright © 2018 Atlassian Software Systems Pty Ltd. All rights reserved.