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 |
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.
|
void |
tearDown()
Cleanup resources
|
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 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
Copyright © 2017 Atlassian Software Systems Pty Ltd. All rights reserved.