Class CloudPullRequestWebhookProcessor
java.lang.Object
com.cloudbees.jenkins.plugins.bitbucket.impl.webhook.AbstractWebhookProcessor
com.cloudbees.jenkins.plugins.bitbucket.impl.webhook.cloud.CloudPullRequestWebhookProcessor
- All Implemented Interfaces:
BitbucketWebhookProcessor,ExtensionPoint
@Extension
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class)
@RestrictedSince("933.3.0")
public class CloudPullRequestWebhookProcessor
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_HEADERFields inherited from interface com.cloudbees.jenkins.plugins.bitbucket.api.webhook.BitbucketWebhookProcessor
SCAN_ON_EMPTY_CHANGES_PROPERTY_NAME -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancanHandle(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 configuredBitbucketEndpoints.voidprocess(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, verifyPayloadMethods 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.BitbucketWebhookProcessor
buildHookContext, notifyEvent, reindexOnEmptyChanges
-
Constructor Details
-
CloudPullRequestWebhookProcessor
public CloudPullRequestWebhookProcessor()
-
-
Method Details
-
canHandle
public boolean canHandle(@NonNull Map<String, String> headers, @NonNull org.apache.commons.collections4.MultiValuedMap<String, String> parameters) Description copied from interface:BitbucketWebhookProcessorCalled by first for this processor that must respond if is able to handle this specific request- Parameters:
headers- requestparameters- request- Returns:
trueif this processor is able to handle this hook request,falseotherwise.
-
getServerURL
@NonNull public String getServerURL(@NonNull Map<String, String> headers, @NonNull org.apache.commons.collections4.MultiValuedMap<String, String> parameters) Description copied from interface:BitbucketWebhookProcessorExtracts the server URL from where this request coming from, the URL must match one of the configuredBitbucketEndpoints.- Specified by:
getServerURLin interfaceBitbucketWebhookProcessor- Overrides:
getServerURLin 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:BitbucketWebhookProcessorSee 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
-