Class CloudWebhookManager
java.lang.Object
com.cloudbees.jenkins.plugins.bitbucket.impl.webhook.cloud.CloudWebhookManager
- All Implemented Interfaces:
BitbucketWebhookManager
,ExtensionPoint
-
Nested Class Summary
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
apply
(BitbucketWebhookConfiguration configuration) The configuration that returned this implementation class.void
apply
(jenkins.scm.api.trait.SCMSourceTrait configurationTrait) Trait instance associate to aSCMSource
where gather extra configuration options.read
(BitbucketAuthenticatedClient client) Returns the list of all registered webhook at this repository related to this Jenkins.void
register
(BitbucketAuthenticatedClient client) Save a webhook (updating or creating a new one) using the actual configuration.void
remove
(String webhookId, BitbucketAuthenticatedClient client) Remove the webhook from the Bitbucket repository with the given identifier.void
setCallbackURL
(String callbackURL, BitbucketEndpoint endpoint) The callback URL where send event payload.Collection<Class<? extends jenkins.scm.api.trait.SCMSourceTrait>>
A list of traits class that this manager supports to obtain additional configuration options.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.cloudbees.jenkins.plugins.bitbucket.api.webhook.BitbucketWebhookManager
withTraits
-
Constructor Details
-
CloudWebhookManager
public CloudWebhookManager()
-
-
Method Details
-
supportedTraits
Description copied from interface:BitbucketWebhookManager
A list of traits class that this manager supports to obtain additional configuration options.- Specified by:
supportedTraits
in interfaceBitbucketWebhookManager
- Returns:
- a list of
SCMSourceTrait
classes.
-
apply
public void apply(jenkins.scm.api.trait.SCMSourceTrait configurationTrait) Description copied from interface:BitbucketWebhookManager
Trait instance associate to aSCMSource
where gather extra configuration options.Each
BitbucketWebhookConfiguration
that would obtain additional configuration options per project must provide an own specific trait implementation.- Specified by:
apply
in interfaceBitbucketWebhookManager
- Parameters:
configurationTrait
- to apply
-
apply
Description copied from interface:BitbucketWebhookManager
The configuration that returned this implementation class.- Specified by:
apply
in interfaceBitbucketWebhookManager
- Parameters:
configuration
- to apply
-
setCallbackURL
Description copied from interface:BitbucketWebhookManager
The callback URL where send event payload.The method is called with the URL of the default receiver and processed using an appropriate
BitbucketWebhookProcessor
. The implementation could decide to ignore given URL and use an own servlet endpoint to process own events.- Specified by:
setCallbackURL
in interfaceBitbucketWebhookManager
- Parameters:
callbackURL
- used to send webhook payload.endpoint
- this webhook is registered for, it could be used to retrieve additional information to compose the callbackURL
-
read
@NonNull public Collection<BitbucketWebHook> read(@NonNull BitbucketAuthenticatedClient client) throws IOException Description copied from interface:BitbucketWebhookManager
Returns the list of all registered webhook at this repository related to this Jenkins.- Specified by:
read
in interfaceBitbucketWebhookManager
- Parameters:
client
- authenticated to communicate with Bitbucket- Returns:
- a list of registered
BitbucketWebHook
. - Throws:
IOException
- in case of communication issue with Bitbucket
-
remove
public void remove(@NonNull String webhookId, @NonNull BitbucketAuthenticatedClient client) throws IOException Description copied from interface:BitbucketWebhookManager
Remove the webhook from the Bitbucket repository with the given identifier.- Specified by:
remove
in interfaceBitbucketWebhookManager
- Parameters:
webhookId
- webhook identifier to delete.client
- authenticated to communicate with Bitbucket- Throws:
IOException
- in case of communication issue with Bitbucket
-
register
Description copied from interface:BitbucketWebhookManager
Save a webhook (updating or creating a new one) using the actual configuration.- Specified by:
register
in interfaceBitbucketWebhookManager
- Parameters:
client
- authenticated to communicate with Bitbucket- Throws:
IOException
- in case of communication issue with Bitbucket
-