Class RepositoryResource
- java.lang.Object
-
- com.atlassian.bamboo.plugins.rest.resource.RepositoryResource
-
public class RepositoryResource extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
RepositoryResource.RestEnableContainer
-
Constructor Summary
Constructors Constructor 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, AdministrationConfigurationAccessor administrationConfigurationAccessor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description javax.ws.rs.core.Response
enableAllProjectsAccess(Long repositoryId, @Nullable RepositoryResource.RestEnableContainer enableContainer)
javax.ws.rs.core.Response
enableAllRepositoriesAccess(Long repositoryId, @Nullable RepositoryResource.RestEnableContainer enableContainer)
javax.ws.rs.core.Response
enableCi(Long repositoryId, @Nullable RepositoryResource.RestEnableContainer enableContainer)
javax.ws.rs.core.Response
enableProjectCreation(Long repositoryId, @Nullable RepositoryResource.RestEnableContainer enableContainer)
RestRepositoryList
findRepository(String searchTerm, javax.ws.rs.core.UriInfo uriInfo)
RestRepositoryUsageModel
findUsage(@NotNull Long repositoryId, int maxPlans, int maxEnvironments)
List<RestRepository>
getRssRepositoriesAllowedToAccessRepository(Long targetRepositoryId)
RestVcsLocationSpecsStatus
getSpecsDetectionStatus(long repositoryId, @Nullable String branch, @Nullable Integer maxResults)
javax.ws.rs.core.Response
grantRssRepositoryAccess(Long targetRepositoryId, RestIdContainer idContainer, javax.ws.rs.core.UriInfo uriInfo)
javax.ws.rs.core.Response
revokePermissionToUseRepositoryByRssRepo(Long targetRepositoryId, Long repositoryId)
RestRepositoryList
searchAvailableRepositories(Long targetRepositoryId, String searchTerm, javax.ws.rs.core.UriInfo uriInfo)
RestBranchList
searchSpecsBranches(long repositoryId, String searchTerm, javax.ws.rs.core.UriInfo uriInfo)
RestRepositoryConnectionResult
testConnection(@NotNull Map<String,Object> requestData)
javax.ws.rs.core.Response
triggerSpecsScanning(@NotNull Long repositoryId, @Nullable String branch)
javax.ws.rs.core.Response
triggerSpecsScanning(@Nullable Long id, @Nullable Long repositoryId, @Nullable String name, @Nullable String repositoryName)
-
-
-
Constructor Detail
-
RepositoryResource
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, AdministrationConfigurationAccessor administrationConfigurationAccessor)
-
-
Method Detail
-
testConnection
public RestRepositoryConnectionResult testConnection(@NotNull @NotNull Map<String,Object> requestData) throws Exception
- Throws:
Exception
-
enableCi
public javax.ws.rs.core.Response enableCi(Long repositoryId, @Nullable @Nullable RepositoryResource.RestEnableContainer enableContainer) throws WebValidationException
- Throws:
WebValidationException
-
enableAllProjectsAccess
public javax.ws.rs.core.Response enableAllProjectsAccess(Long repositoryId, @Nullable @Nullable RepositoryResource.RestEnableContainer enableContainer) throws WebValidationException
- Throws:
WebValidationException
-
enableAllRepositoriesAccess
public javax.ws.rs.core.Response enableAllRepositoriesAccess(Long repositoryId, @Nullable @Nullable RepositoryResource.RestEnableContainer enableContainer) throws WebValidationException
- Throws:
WebValidationException
-
enableProjectCreation
public javax.ws.rs.core.Response enableProjectCreation(Long repositoryId, @Nullable @Nullable RepositoryResource.RestEnableContainer enableContainer) throws WebValidationException
- Throws:
WebValidationException
-
grantRssRepositoryAccess
public javax.ws.rs.core.Response grantRssRepositoryAccess(Long targetRepositoryId, RestIdContainer idContainer, @Context javax.ws.rs.core.UriInfo uriInfo) throws NotFoundException, WebValidationException
-
searchAvailableRepositories
public RestRepositoryList searchAvailableRepositories(Long targetRepositoryId, String searchTerm, @Context javax.ws.rs.core.UriInfo uriInfo) throws NotFoundException
- Throws:
NotFoundException
-
getRssRepositoriesAllowedToAccessRepository
public List<RestRepository> getRssRepositoriesAllowedToAccessRepository(Long targetRepositoryId) throws NotFoundException
- Throws:
NotFoundException
-
revokePermissionToUseRepositoryByRssRepo
public javax.ws.rs.core.Response revokePermissionToUseRepositoryByRssRepo(Long targetRepositoryId, Long repositoryId) throws NotFoundException, WebValidationException
-
findRepository
public RestRepositoryList findRepository(String searchTerm, @Context javax.ws.rs.core.UriInfo uriInfo)
-
searchSpecsBranches
public RestBranchList searchSpecsBranches(long repositoryId, String searchTerm, @Context javax.ws.rs.core.UriInfo uriInfo) throws WebValidationException
- Throws:
WebValidationException
-
getSpecsDetectionStatus
public RestVcsLocationSpecsStatus getSpecsDetectionStatus(long repositoryId, @Nullable @Nullable String branch, @Nullable @Nullable Integer maxResults)
-
triggerSpecsScanning
public javax.ws.rs.core.Response triggerSpecsScanning(@Nullable @Nullable Long id, @Nullable @Nullable Long repositoryId, @Nullable @Nullable String name, @Nullable @Nullable String repositoryName) throws WebValidationException
- Throws:
WebValidationException
-
triggerSpecsScanning
public javax.ws.rs.core.Response triggerSpecsScanning(@NotNull @NotNull Long repositoryId, @Nullable @Nullable String branch) throws WebValidationException
- Throws:
WebValidationException
-
findUsage
public RestRepositoryUsageModel findUsage(@NotNull @NotNull Long repositoryId, int maxPlans, int maxEnvironments)
-
-