public class RepositoryResource extends Object
Constructor and Description |
---|
RepositoryResource(com.atlassian.sal.api.ApplicationProperties applicationProperties,
CachedPlanManager cachedPlanManager,
VcsRepositoryManager vcsRepositoryManager,
RepositoryDefinitionManager repositoryDefinitionManager,
BambooPermissionManager bambooPermissionManager,
CustomVariableContext customVariableContext,
ValidationService validationService,
ValidationFunctionFactory validationFunctionFactory,
com.atlassian.sal.api.message.I18nResolver i18nResolver,
VcsConfigurationHelper vcsConfigurationHelper,
VcsRepositoryConfigurationService vcsRepositoryConfigurationService,
RssPermissionManager rssPermissionManager,
FeatureManager featureManager,
CachedRepositoryDefinitionManager cachedRepositoryDefinitionManager) |
Modifier and Type | Method and Description |
---|---|
javax.ws.rs.core.Response |
enableAllProjectsAccess(Map<String,Object> requestData,
Long repositoryId)
Enables access (i.e.
|
javax.ws.rs.core.Response |
enableAllRepositoriesAccess(Map<String,Object> requestData,
Long repositoryId)
Enables access (i.e.
|
javax.ws.rs.core.Response |
enableCi(Map<String,Object> requestData,
Long repositoryId)
Enables or disables detection of Bamboo Specs stored in the repository.
|
List<RestRepository> |
getRssRepositoriesAllowedToAccessRepository(Long targetRepositoryId)
Fetch list of RSS repositories which can use given repository by RSS code.
|
javax.ws.rs.core.Response |
grantRssRepositoryAccess(Long targetRepositoryId,
RestIdContainer idContainer,
javax.ws.rs.core.UriInfo uriInfo)
Grant repository with RSS code to use target repository in build plans and deployments.
|
javax.ws.rs.core.Response |
revokePermissionToUseRepositoryByRssRepo(Long targetRepositoryId,
Long repositoryId)
Revoke access of RSS code stored in repository defined by repositoryId from repository defined by targetRepositoryId.
|
RestRepositoryList |
searchAvailableRepositories(Long targetRepositoryId,
String searchTerm,
javax.ws.rs.core.UriInfo uriInfo)
Search for existing linked repositories which can be granted to use given repository by RSS.
|
RestRepositoryConnectionResult |
testConnection(Map<String,Object> requestData)
Tests connection to a repository if the repository type supports connection testing.
|
public RepositoryResource(com.atlassian.sal.api.ApplicationProperties applicationProperties, CachedPlanManager cachedPlanManager, VcsRepositoryManager vcsRepositoryManager, RepositoryDefinitionManager repositoryDefinitionManager, BambooPermissionManager bambooPermissionManager, CustomVariableContext customVariableContext, ValidationService validationService, ValidationFunctionFactory validationFunctionFactory, com.atlassian.sal.api.message.I18nResolver i18nResolver, VcsConfigurationHelper vcsConfigurationHelper, VcsRepositoryConfigurationService vcsRepositoryConfigurationService, RssPermissionManager rssPermissionManager, FeatureManager featureManager, CachedRepositoryDefinitionManager cachedRepositoryDefinitionManager)
public RestRepositoryConnectionResult testConnection(@NotNull Map<String,Object> requestData) throws Exception
Exception
public javax.ws.rs.core.Response enableCi(@NotNull Map<String,Object> requestData, Long repositoryId) throws WebValidationException
Request body is JSON with one attribute :
{ enable: true/false }
requestData
- request bodyrepositoryId
- id of the repositoryWebValidationException
public javax.ws.rs.core.Response enableAllProjectsAccess(@NotNull Map<String,Object> requestData, Long repositoryId) throws WebValidationException
Request body is JSON with one attribute :
{ enable: true/false }
requestData
- request bodyrepositoryId
- id of the repositoryWebValidationException
public javax.ws.rs.core.Response enableAllRepositoriesAccess(@NotNull Map<String,Object> requestData, Long repositoryId) throws WebValidationException
Request body is JSON with one attribute :
{ enable: true/false }
requestData
- request bodyrepositoryId
- id of the repositoryWebValidationException
public javax.ws.rs.core.Response grantRssRepositoryAccess(Long targetRepositoryId, RestIdContainer idContainer, @Context javax.ws.rs.core.UriInfo uriInfo) throws NotFoundException, WebValidationException
targetRepositoryId
- target repository ididContainer
- repository idNotFoundException
- if repository not foundWebValidationException
- if idContainer is empty or nullAccessDeniedException
- when user has not administration permission to target repositorypublic RestRepositoryList searchAvailableRepositories(Long targetRepositoryId, String searchTerm, @Context javax.ws.rs.core.UriInfo uriInfo) throws NotFoundException
targetRepositoryId
- target repository idsearchTerm
- part of repository name. Used to filter output.NotFoundException
- if repository not foundAccessDeniedException
- when user has not administration permission to target repositorypublic List<RestRepository> getRssRepositoriesAllowedToAccessRepository(Long targetRepositoryId) throws NotFoundException
targetRepositoryId
- target repository idNotFoundException
- if repository not foundAccessDeniedException
- when user has not administration permission to repositorypublic javax.ws.rs.core.Response revokePermissionToUseRepositoryByRssRepo(Long targetRepositoryId, Long repositoryId) throws NotFoundException, WebValidationException
targetRepositoryId
- target repository idrepositoryId
- linked repository root idNotFoundException
- if can't find repositoryAccessDeniedException
- when user has not administration permission to target repositoryWebValidationException
Copyright © 2018 Atlassian Software Systems Pty Ltd. All rights reserved.