java.lang.Object
com.cloudbees.jenkins.plugins.bitbucket.impl.webhook.AbstractWebhookManager<T>
All Implemented Interfaces:
BitbucketWebhookManager, ExtensionPoint
Direct Known Subclasses:
CloudWebhookManager, ServerWebhookManager

public abstract class AbstractWebhookManager<T extends AbstractBitbucketWebhookConfiguration> extends Object implements BitbucketWebhookManager
  • Field Details

  • Constructor Details

    • AbstractWebhookManager

      public AbstractWebhookManager()
  • Method Details

    • setCallbackURL

      public void setCallbackURL(String callbackURL, BitbucketEndpoint endpoint)
      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 interface BitbucketWebhookManager
      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

      public void apply(BitbucketWebhookConfiguration configuration)
      Description copied from interface: BitbucketWebhookManager
      The configuration that returned this implementation class.
      Specified by:
      apply in interface BitbucketWebhookManager
      Parameters:
      configuration - to apply
    • buildCacheKey

      @Nullable protected String buildCacheKey(@NonNull BitbucketAuthenticatedClient client)
    • isCacheEnabled

      protected boolean isCacheEnabled(@NonNull BitbucketAuthenticatedClient client)
    • getEndpointJenkinsRootURL

      @Nullable protected String getEndpointJenkinsRootURL()
    • isValidWebhook

      protected boolean isValidWebhook(String webhookCallbackURL)