Class StashBulkActionsResource
- java.lang.Object
-
- com.atlassian.bamboo.plugins.stash.v2.configurator.BitbucketServerSshKeyHandler
-
- com.atlassian.bamboo.plugins.stash.rest.resource.StashBulkActionsResource
-
@Singleton public class StashBulkActionsResource extends BitbucketServerSshKeyHandler
-
-
Constructor Summary
Constructors Constructor Description 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)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description javax.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 Detail
-
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)
-
-
Method Detail
-
updateMirrors
public javax.ws.rs.core.Response updateMirrors(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
if dryRun option is provided - Throws:
WebValidationException
- if user has no OAuth authorization for Bitbucket Server, or provided wrong mirror id
-
refreshKeysIfNeeded
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
public javax.ws.rs.core.Response refreshKeysIfNeeded(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
-
-