Class StashBulkActionsResource
java.lang.Object
com.atlassian.bamboo.plugins.stash.v2.configurator.BitbucketServerSshKeyHandler
com.atlassian.bamboo.plugins.stash.rest.resource.StashBulkActionsResource
@Path("/bulk")
@Consumes("application/json")
@Produces("application/json")
@Singleton
public class StashBulkActionsResource
extends BitbucketServerSshKeyHandler
-
Constructor Summary
ConstructorDescriptionStashBulkActionsResource
(com.atlassian.sal.api.ApplicationProperties applicationProperties, BitbucketSeverMirrorHelper mirrorHelper, BambooPermissionManager permissionManager, PlanManager planManager, com.atlassian.sal.api.message.I18nResolver i18nResolver, RepositoryDefinitionManager repositoryDefinitionManager, VcsRepositoryConfigurationService vcsRepositoryConfigurationService, AdministrationConfigurationAccessor administrationConfigurationAccessor, ProjectManager projectManager, StashClientProvider stashClientProvider, CustomVariableContext customVariableContext, VcsRepositoryManager vcsRepositoryManager) -
Method Summary
Modifier and TypeMethodDescriptionjavax.ws.rs.core.Response
refreshKeysIfNeeded
(@Nullable BulkKeysRepairRequest keysRepairPayload) The bulk operation that refreshes ssh keys of all Bitbucket Server/DC repositories if the existing one cannot establish a connection with the origin repository.javax.ws.rs.core.Response
refreshKeysIfNeeded
(String appLinkId, @Nullable BulkKeysRepairRequest keysRepairPayload) The bulk operation that refreshes ssh keys of all Bitbucket Server/DC repositories if the existing one cannot establish a connection with the origin repository.javax.ws.rs.core.Response
updateMirrors
(String appLinkId, BulkUpdateMirrorRequest updateRequest) Bulk update of mirrors for all repositories connected to Bitbucket Server by applink id.Methods inherited from class com.atlassian.bamboo.plugins.stash.v2.configurator.BitbucketServerSshKeyHandler
generateKeyPair, getAuthenticationErrors, sshKeyLocationToString
-
Constructor Details
-
StashBulkActionsResource
@Inject public StashBulkActionsResource(com.atlassian.sal.api.ApplicationProperties applicationProperties, BitbucketSeverMirrorHelper mirrorHelper, BambooPermissionManager permissionManager, PlanManager planManager, com.atlassian.sal.api.message.I18nResolver i18nResolver, RepositoryDefinitionManager repositoryDefinitionManager, VcsRepositoryConfigurationService vcsRepositoryConfigurationService, AdministrationConfigurationAccessor administrationConfigurationAccessor, ProjectManager projectManager, StashClientProvider stashClientProvider, CustomVariableContext customVariableContext, VcsRepositoryManager vcsRepositoryManager)
-
-
Method Details
-
updateMirrors
@POST @Path("{appLinkId}/mirror") public javax.ws.rs.core.Response updateMirrors(@PathParam("appLinkId") String appLinkId, BulkUpdateMirrorRequest updateRequest) throws WebValidationException Bulk update of mirrors for all repositories connected to Bitbucket Server by applink id.- Parameters:
appLinkId
- id of AppLink which used for repositoryupdateRequest
- set of configuration for update- Returns:
- 200 if update happened successfully or
StashPageEntity<com.atlassian.bamboo.plugins.stash.rest.resource.StashBulkActionsResource.UpdateMirrorDryRunResult>
if dryRun option is provided - Throws:
WebValidationException
- if user has no OAuth authorization for Bitbucket Server, or provided wrong mirror id
-
refreshKeysIfNeeded
@POST @Path("keys/repair") public javax.ws.rs.core.Response refreshKeysIfNeeded(@Nullable @Nullable BulkKeysRepairRequest keysRepairPayload) The bulk operation that refreshes ssh keys of all Bitbucket Server/DC repositories if the existing one cannot establish a connection with the origin repository. This operation is performed against all existing app links.- Parameters:
keysRepairPayload
- optional filtering criteria- Returns:
- 200 if at least one repository was processed successfully
-
refreshKeysIfNeeded
@POST @Path("keys/repair/{appLinkId}") public javax.ws.rs.core.Response refreshKeysIfNeeded(@PathParam("appLinkId") String appLinkId, @Nullable @Nullable BulkKeysRepairRequest keysRepairPayload) throws WebValidationException The bulk operation that refreshes ssh keys of all Bitbucket Server/DC repositories if the existing one cannot establish a connection with the origin repository. This operation is performed only against repositories related to specified AppLink ID.- Parameters:
appLinkId
- id of AppLink used for repositories searchingkeysRepairPayload
- optional filtering criteria- Returns:
- 200 if at least one repository was processed successfully
- Throws:
WebValidationException
-