Class BitbucketWebhookClientImpl
- java.lang.Object
-
- com.atlassian.bitbucket.jenkins.internal.client.BitbucketWebhookClientImpl
-
- All Implemented Interfaces:
BitbucketWebhookClient
public class BitbucketWebhookClientImpl extends Object implements BitbucketWebhookClient
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
deleteWebhook(int webhookId)
deletes a webhook with given idStream<BitbucketWebhook>
getWebhooks(String... eventIdFilter)
Returns a stream of existing webhooks.BitbucketWebhook
registerWebhook(BitbucketWebhookRequest request)
Registers the given webhook in the Bitbucket Server.BitbucketWebhook
updateWebhook(int id, BitbucketWebhookRequest request)
Updates the existing webhook
-
-
-
Method Detail
-
deleteWebhook
public void deleteWebhook(int webhookId)
Description copied from interface:BitbucketWebhookClient
deletes a webhook with given id- Specified by:
deleteWebhook
in interfaceBitbucketWebhookClient
- Parameters:
webhookId
- , webhook id.
-
updateWebhook
public BitbucketWebhook updateWebhook(int id, BitbucketWebhookRequest request)
Description copied from interface:BitbucketWebhookClient
Updates the existing webhook- Specified by:
updateWebhook
in interfaceBitbucketWebhookClient
- Parameters:
id
- webhook identifierrequest
- webhook with update field- Returns:
- updated webhook
-
getWebhooks
public Stream<BitbucketWebhook> getWebhooks(String... eventIdFilter)
Description copied from interface:BitbucketWebhookClient
Returns a stream of existing webhooks. Result could be further filtered by passing in event id filters. every subsequent fetch ofBitbucketPage
results in a remote call to Bitbucket server.- Specified by:
getWebhooks
in interfaceBitbucketWebhookClient
- Parameters:
eventIdFilter
- , Event id filters. These ids are the same as the one recieved asBitbucketWebhookSupportedEvents
- Returns:
- a stream of webhooks.
-
registerWebhook
public BitbucketWebhook registerWebhook(BitbucketWebhookRequest request)
Description copied from interface:BitbucketWebhookClient
Registers the given webhook in the Bitbucket Server.- Specified by:
registerWebhook
in interfaceBitbucketWebhookClient
- Parameters:
request
- Webhook details- Returns:
- returns the registered webhook
-
-