Class RepositoryResource
java.lang.Object
com.atlassian.bamboo.plugins.rest.resource.RepositoryResource
@Consumes("application/json")
@Produces("application/json")
@Path("repository")
public class RepositoryResource
extends Object
-
Nested Class Summary
-
Constructor Summary
ConstructorDescriptionRepositoryResource
(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
Modifier and TypeMethodDescriptionjavax.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) findRepository
(String searchTerm, javax.ws.rs.core.UriInfo uriInfo) getRssRepositoriesAllowedToAccessRepository
(Long targetRepositoryId) 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) searchAvailableRepositories
(Long targetRepositoryId, String searchTerm, javax.ws.rs.core.UriInfo uriInfo) searchSpecsBranches
(long repositoryId, String searchTerm, javax.ws.rs.core.UriInfo uriInfo) 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 Details
-
RepositoryResource
@Inject 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 Details
-
testConnection
@PUT @Path("testConnection") public RestRepositoryConnectionResult testConnection(@NotNull @NotNull Map<String, Object> requestData) throws Exception- Throws:
Exception
-
enableCi
@PUT @Path("{repositoryId}/enableCi") public javax.ws.rs.core.Response enableCi(@PathParam("repositoryId") Long repositoryId, @Nullable @Nullable RepositoryResource.RestEnableContainer enableContainer) throws WebValidationException - Throws:
WebValidationException
-
enableAllProjectsAccess
@PUT @Path("{repositoryId}/enableAllProjectsAccess") public javax.ws.rs.core.Response enableAllProjectsAccess(@PathParam("repositoryId") Long repositoryId, @Nullable @Nullable RepositoryResource.RestEnableContainer enableContainer) throws WebValidationException - Throws:
WebValidationException
-
enableAllRepositoriesAccess
@PUT @Path("{repositoryId}/enableAllRepositoriesAccess") public javax.ws.rs.core.Response enableAllRepositoriesAccess(@PathParam("repositoryId") Long repositoryId, @Nullable @Nullable RepositoryResource.RestEnableContainer enableContainer) throws WebValidationException - Throws:
WebValidationException
-
enableProjectCreation
@PUT @Path("{repositoryId}/enableProjectCreation") public javax.ws.rs.core.Response enableProjectCreation(@PathParam("repositoryId") Long repositoryId, @Nullable @Nullable RepositoryResource.RestEnableContainer enableContainer) throws WebValidationException - Throws:
WebValidationException
-
grantRssRepositoryAccess
@POST @Path("{repositoryId}/rssrepository") public javax.ws.rs.core.Response grantRssRepositoryAccess(@PathParam("repositoryId") Long targetRepositoryId, RestIdContainer idContainer, @Context javax.ws.rs.core.UriInfo uriInfo) throws NotFoundException, WebValidationException -
searchAvailableRepositories
@GET @Path("{repositoryId}/rssrepository/search") public RestRepositoryList searchAvailableRepositories(@PathParam("repositoryId") Long targetRepositoryId, @QueryParam("searchTerm") String searchTerm, @Context javax.ws.rs.core.UriInfo uriInfo) throws NotFoundException - Throws:
NotFoundException
-
getRssRepositoriesAllowedToAccessRepository
@GET @Path("{repositoryId}/rssrepository") public List<RestRepository> getRssRepositoriesAllowedToAccessRepository(@PathParam("repositoryId") Long targetRepositoryId) throws NotFoundException - Throws:
NotFoundException
-
revokePermissionToUseRepositoryByRssRepo
@DELETE @Path("{targetRepositoryId}/rssrepository/{repositoryId}") public javax.ws.rs.core.Response revokePermissionToUseRepositoryByRssRepo(@PathParam("targetRepositoryId") Long targetRepositoryId, @PathParam("repositoryId") Long repositoryId) throws NotFoundException, WebValidationException -
findRepository
@GET public RestRepositoryList findRepository(@QueryParam("searchTerm") String searchTerm, @Context javax.ws.rs.core.UriInfo uriInfo) -
searchSpecsBranches
@GET @Path("{repositoryId}/rssBranches") public RestBranchList searchSpecsBranches(@PathParam("repositoryId") long repositoryId, @QueryParam("searchTerm") @DefaultValue("") String searchTerm, @Context javax.ws.rs.core.UriInfo uriInfo) throws WebValidationException - Throws:
WebValidationException
-
getSpecsDetectionStatus
@GET @Path("{repositoryId}/scan/status") public RestVcsLocationSpecsStatus getSpecsDetectionStatus(@PathParam("repositoryId") long repositoryId, @Nullable @QueryParam("branch") @Nullable String branch, @Nullable @QueryParam("max-result") @Nullable Integer maxResults) -
triggerSpecsScanning
@POST @Path("scan") @Consumes public javax.ws.rs.core.Response triggerSpecsScanning(@Nullable @QueryParam("id") @Nullable Long id, @Nullable @QueryParam("repositoryId") @Nullable Long repositoryId, @Nullable @QueryParam("name") @Nullable String name, @Nullable @QueryParam("repositoryName") @Nullable String repositoryName) throws WebValidationException - Throws:
WebValidationException
-
triggerSpecsScanning
@POST @Path("{repositoryId}/scanNow") public javax.ws.rs.core.Response triggerSpecsScanning(@NotNull @PathParam("repositoryId") @NotNull Long repositoryId, @Nullable @QueryParam("branch") @Nullable String branch) throws WebValidationException - Throws:
WebValidationException
-
findUsage
@GET @Path("{repositoryId}/usage") public RestRepositoryUsageModel findUsage(@NotNull @PathParam("repositoryId") @NotNull Long repositoryId, @QueryParam("max-plans") @DefaultValue("20") int maxPlans, @QueryParam("max-environments") @DefaultValue("20") int maxEnvironments)
-