Class CloudPushWebhookProcessor
java.lang.Object
com.cloudbees.jenkins.plugins.bitbucket.impl.webhook.AbstractWebhookProcessor
com.cloudbees.jenkins.plugins.bitbucket.impl.webhook.cloud.CloudPushWebhookProcessor
- All Implemented Interfaces:
BitbucketWebhookProcessor
,ExtensionPoint
@Extension
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class)
@RestrictedSince("933.3.0")
public class CloudPushWebhookProcessor
extends AbstractWebhookProcessor
-
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.AbstractWebhookProcessor
EVENT_TYPE_HEADER, logger, REQUEST_ID_CLOUD_HEADER, REQUEST_ID_SERVER_HEADER, SERVER_URL_PARAMETER, SIGNATURE_HEADER
Fields inherited from interface com.cloudbees.jenkins.plugins.bitbucket.api.webhook.BitbucketWebhookProcessor
SCAN_ON_EMPTY_CHANGES_PROPERTY_NAME
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
canHandle
(Map<String, String> headers, org.apache.commons.collections4.MultiValuedMap<String, String> parameters) Called by first for this processor that must respond if is able to handle this specific requestgetServerURL
(Map<String, String> headers, org.apache.commons.collections4.MultiValuedMap<String, String> parameters) Extracts the server URL from where this request coming from, the URL must match one of the configuredBitbucketEndpoint
s.void
process
(String hookEventType, String payload, Map<String, Object> context, BitbucketEndpoint endpoint) See Event Payloads for more information about the payload parameter format.Methods inherited from class com.cloudbees.jenkins.plugins.bitbucket.impl.webhook.AbstractWebhookProcessor
getEventType, getOrigin, scmSourceReIndex, verifyPayload
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.BitbucketWebhookProcessor
buildHookContext, notifyEvent, reindexOnEmptyChanges
-
Constructor Details
-
CloudPushWebhookProcessor
public CloudPushWebhookProcessor()
-
-
Method Details
-
canHandle
public boolean canHandle(Map<String, String> headers, org.apache.commons.collections4.MultiValuedMap<String, String> parameters) Description copied from interface:BitbucketWebhookProcessor
Called by first for this processor that must respond if is able to handle this specific request- Parameters:
headers
- requestparameters
- request- Returns:
true
if this processor is able to handle this hook request,false
otherwise.
-
getServerURL
@NonNull public String getServerURL(@NonNull Map<String, String> headers, @NonNull org.apache.commons.collections4.MultiValuedMap<String, String> parameters) Description copied from interface:BitbucketWebhookProcessor
Extracts the server URL from where this request coming from, the URL must match one of the configuredBitbucketEndpoint
s.- Specified by:
getServerURL
in interfaceBitbucketWebhookProcessor
- Overrides:
getServerURL
in classAbstractWebhookProcessor
- Parameters:
headers
- requestparameters
- request- Returns:
- the URL of the server from where this request has been sent.
-
process
public void process(@NonNull String hookEventType, @NonNull String payload, @NonNull Map<String, Object> context, @NonNull BitbucketEndpoint endpoint) Description copied from interface:BitbucketWebhookProcessor
See Event Payloads for more information about the payload parameter format.- Parameters:
hookEventType
- the type of hook event.payload
- the hook payloadcontext
- build from incoming requestendpoint
- configured in the Jenkins global page
-