Class WebhookManagementServiceImpl
- java.lang.Object
-
- com.atlassian.bamboo.plugins.bitbucket.v2.BitbucketCloudRestApiClient
-
- com.atlassian.bamboo.plugins.bitbucket.impl.WebhookManagementServiceImpl
-
- All Implemented Interfaces:
WebhookManagementService
public final class WebhookManagementServiceImpl extends BitbucketCloudRestApiClient implements WebhookManagementService
-
-
Field Summary
-
Fields inherited from class com.atlassian.bamboo.plugins.bitbucket.v2.BitbucketCloudRestApiClient
bitbucketClientSupplier
-
-
Constructor Summary
Constructors Constructor Description WebhookManagementServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description WebhookResponse
createRepositoryWebhook(@NotNull String owner, @NotNull String slug, @NotNull String username, @NotNull String password, @NotNull String bambooEntryPoint)
Create a webhooks for specified repository.void
destroyRepositoryWebhook(String owner, String slug, String username, String password, String webhookUuid)
Destroys a webhook with requested uuid for specified repository.ListWebhooksResponse
getRepositoryWebhooks(String owner, String slug, String username, String password)
Retrieve a list of all available webhooks specified for the specified repository.-
Methods inherited from class com.atlassian.bamboo.plugins.bitbucket.v2.BitbucketCloudRestApiClient
addFilters, getAuthFilter, getLoggingFilter, prepareResourceCall
-
-
-
-
Method Detail
-
createRepositoryWebhook
public WebhookResponse createRepositoryWebhook(@NotNull @NotNull String owner, @NotNull @NotNull String slug, @NotNull @NotNull String username, @NotNull @NotNull String password, @NotNull @NotNull String bambooEntryPoint)
Description copied from interface:WebhookManagementService
Create a webhooks for specified repository.- Specified by:
createRepositoryWebhook
in interfaceWebhookManagementService
- Parameters:
owner
- e.g. workspaceslug
- repository slugusername
- username of the user with access to perform rest callpassword
- password of the user, in most cases the app passwordbambooEntryPoint
- bamboo entrypoint used by bbc to send webhooks- Returns:
- Newly created webhook
-
destroyRepositoryWebhook
public void destroyRepositoryWebhook(String owner, String slug, String username, String password, String webhookUuid)
Description copied from interface:WebhookManagementService
Destroys a webhook with requested uuid for specified repository.- Specified by:
destroyRepositoryWebhook
in interfaceWebhookManagementService
- Parameters:
owner
- e.g. workspaceslug
- repository slugusername
- username of the user with access to perform rest callpassword
- password of the user, in most cases the app passwordwebhookUuid
- unique webhook uuid
-
getRepositoryWebhooks
public ListWebhooksResponse getRepositoryWebhooks(String owner, String slug, String username, String password)
Description copied from interface:WebhookManagementService
Retrieve a list of all available webhooks specified for the specified repository.- Specified by:
getRepositoryWebhooks
in interfaceWebhookManagementService
- Parameters:
owner
- e.g. workspaceslug
- repository slugusername
- username of the user with access to perform rest callpassword
- password of the user, in most cases the app password- Returns:
- List of webhooks
-
-