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,
RssDetectionService rssDetectionService,
BambooSpecsManager bambooSpecsManager,
com.atlassian.event.api.EventPublisher eventPublisher,
SpecsConsumerFactory specsConsumerFactory,
EnvironmentService environmentService,
ProjectManager projectManager) |
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.
|
javax.ws.rs.core.Response |
enableProjectCreation(Map<String,Object> requestData,
Long repositoryId)
Enables build and deployment project creation by the Bamboo Specs code stored in this repository.
|
RestRepositoryList |
findRepository(String searchTerm,
javax.ws.rs.core.UriInfo uriInfo)
Search for existing linked repositories by name.
|
RestRepositoryUsageModel |
findUsage(Long repositoryId,
int maxPlans,
int maxEnvironments)
Search for usages of given repository.
|
List<RestRepository> |
getRssRepositoriesAllowedToAccessRepository(Long targetRepositoryId)
Fetch list of RSS repositories which can use given repository by RSS code.
|
RestVcsLocationSpecsStatus |
getSpecsDetectionStatus(long repositoryId,
String branch,
Integer maxResults)
Resource providing status of RSS processing for a given repository and optional branch.
|
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.
|
RestBranchList |
searchSpecsBranches(long repositoryId,
String searchTerm,
javax.ws.rs.core.UriInfo uriInfo)
Search for divergent branches names (i.e.
|
RestRepositoryConnectionResult |
testConnection(Map<String,Object> requestData)
Tests connection to a repository if the repository type supports connection testing.
|
javax.ws.rs.core.Response |
triggerSpecsScanning(Long id,
Long repositoryId,
String name,
String repositoryName)
Webhook resource for triggering Repository-stored Bamboo Specs.
|
javax.ws.rs.core.Response |
triggerSpecsScanning(Long repositoryId,
String branch)
Resource for triggering Repository-stored Bamboo Specs in a 'forced' way.
|
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, RssDetectionService rssDetectionService, BambooSpecsManager bambooSpecsManager, com.atlassian.event.api.EventPublisher eventPublisher, SpecsConsumerFactory specsConsumerFactory, EnvironmentService environmentService, ProjectManager projectManager)
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 enableProjectCreation(@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
public RestRepositoryList findRepository(String searchTerm, @Context javax.ws.rs.core.UriInfo uriInfo)
searchTerm
- part of repository name. Used to filter output.public RestBranchList searchSpecsBranches(long repositoryId, String searchTerm, @Context javax.ws.rs.core.UriInfo uriInfo) throws WebValidationException
repositoryId
- ID of the linked repository which stores Bamboo SpecssearchTerm
- part of branch name. Used to filter output.WebValidationException
public RestVcsLocationSpecsStatus getSpecsDetectionStatus(long repositoryId, @Nullable String branch, @Nullable Integer maxResults)
repositoryId
- ID of the linked repository which stores Bamboo Specsbranch
- optional branch of the repository. Works only if repository supports divergent branchesmaxResults
- maximum number of spec status entries returned in the responsepublic javax.ws.rs.core.Response triggerSpecsScanning(@Nullable Long id, @Nullable Long repositoryId, @Nullable String name, @Nullable String repositoryName) throws WebValidationException
Ambiguous requests, which reference more than one repository via the query params, will result in one parameter taking precedence over the others. There's no guarantee which one.
This resource does not require authorisation. It will always return HTTP 204 response on every valid request, even if the targeted repository doesn't exist or does not contain Bamboo Specs.
id
- ID of the linked repository which stores Bamboo SpecsrepositoryId
- alternative name of the query parameter to provide repository IDname
- unique name of the linked repository which stores Bamboo SpecsrepositoryName
- alternative name of the query parameter to provide repository nameWebValidationException
public javax.ws.rs.core.Response triggerSpecsScanning(@NotNull Long repositoryId, @Nullable String branch) throws WebValidationException
repositoryId
- id of the repository to triggerbranch
- optional branch of the repository. Works only if repository supports divergent branchesWebValidationException
public RestRepositoryUsageModel findUsage(@NotNull Long repositoryId, int maxPlans, int maxEnvironments)
repositoryId
- repository idmaxPlans
- maximum count of detailed plans at response. Default is 20.maxEnvironments
- maximum count of detailed environments at response. Default is 20.Copyright © 2021 Atlassian Software Systems Pty Ltd. All rights reserved.
View cookie preferences