Class ServerWebhookManager
java.lang.Object
com.cloudbees.jenkins.plugins.bitbucket.impl.webhook.AbstractWebhookManager<ServerWebhookConfiguration>
com.cloudbees.jenkins.plugins.bitbucket.impl.webhook.server.ServerWebhookManager
- All Implemented Interfaces:
BitbucketWebhookManager,ExtensionPoint
@Extension
public class ServerWebhookManager
extends AbstractWebhookManager<ServerWebhookConfiguration>
-
Nested Class Summary
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson -
Field Summary
Fields inherited from class com.cloudbees.jenkins.plugins.bitbucket.impl.webhook.AbstractWebhookManager
callbackURL, configuration -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidapply(BitbucketWebhookConfiguration configuration) The configuration that returned this implementation class.static voidread(BitbucketAuthenticatedClient client) Returns the list of all registered webhook at this repository related to this Jenkins.voidregister(BitbucketAuthenticatedClient client) Save a webhook (updating or creating a new one) using the actual configuration.voidremove(String webhookId, BitbucketAuthenticatedClient client) Remove the webhook from the Bitbucket repository with the given identifier.voidsetCallbackURL(String callbackURL, BitbucketEndpoint endpoint) The callback URL where send event payload.stats()Methods inherited from class com.cloudbees.jenkins.plugins.bitbucket.impl.webhook.AbstractWebhookManager
buildCacheKey, getEndpointJenkinsRootURL, isCacheEnabledMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.cloudbees.jenkins.plugins.bitbucket.api.webhook.BitbucketWebhookManager
apply, supportedTraits, withTraits
-
Constructor Details
-
ServerWebhookManager
public ServerWebhookManager()
-
-
Method Details
-
clearCaches
public static void clearCaches() -
stats
-
setCallbackURL
Description copied from interface:BitbucketWebhookManagerThe 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:
setCallbackURLin interfaceBitbucketWebhookManager- Overrides:
setCallbackURLin classAbstractWebhookManager<ServerWebhookConfiguration>- 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
-
apply
Description copied from interface:BitbucketWebhookManagerThe configuration that returned this implementation class.- Specified by:
applyin interfaceBitbucketWebhookManager- Overrides:
applyin classAbstractWebhookManager<ServerWebhookConfiguration>- Parameters:
configuration- to apply
-
read
@NonNull public Collection<BitbucketWebHook> read(@NonNull BitbucketAuthenticatedClient client) throws IOException Description copied from interface:BitbucketWebhookManagerReturns the list of all registered webhook at this repository related to this Jenkins.- 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:BitbucketWebhookManagerRemove the webhook from the Bitbucket repository with the given identifier.- 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:BitbucketWebhookManagerSave a webhook (updating or creating a new one) using the actual configuration.- Parameters:
client- authenticated to communicate with Bitbucket- Throws:
IOException- in case of communication issue with Bitbucket
-