Class BitbucketWebhookTriggerImpl
- java.lang.Object
-
- hudson.triggers.Trigger<Job<?,?>>
-
- com.atlassian.bitbucket.jenkins.internal.trigger.BitbucketWebhookTriggerImpl
-
- All Implemented Interfaces:
BitbucketWebhookTrigger
,ExtensionPoint
,Describable<Trigger<?>>
public class BitbucketWebhookTriggerImpl extends Trigger<Job<?,?>> implements BitbucketWebhookTrigger
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
BitbucketWebhookTriggerImpl.BitbucketWebhookTriggerDescriptor
-
Nested classes/interfaces inherited from class hudson.triggers.Trigger
Trigger.Cron
-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
-
Constructor Summary
Constructors Constructor Description BitbucketWebhookTriggerImpl(boolean pullRequestTrigger, boolean refTrigger)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BitbucketWebhookTriggerImpl.BitbucketWebhookTriggerDescriptor
getDescriptor()
boolean
isApplicableForEvent(AbstractWebhookEvent event)
Is the trigger applicable for the given webhook.boolean
isPullRequestTrigger()
boolean
isRefTrigger()
void
start(Job<?,?> project, boolean newInstance)
void
trigger(BitbucketWebhookTriggerRequest triggerRequest)
-
Methods inherited from class hudson.triggers.Trigger
all, checkTriggers, for_, getProjectAction, getProjectActions, getSpec, readResolve, run, stop, toString
-
-
-
-
Method Detail
-
getDescriptor
public BitbucketWebhookTriggerImpl.BitbucketWebhookTriggerDescriptor getDescriptor()
- Specified by:
getDescriptor
in interfaceDescribable<Trigger<?>>
- Overrides:
getDescriptor
in classTrigger<Job<?,?>>
-
isApplicableForEvent
public boolean isApplicableForEvent(AbstractWebhookEvent event)
Description copied from interface:BitbucketWebhookTrigger
Is the trigger applicable for the given webhook. If the trigger is configured for RefChange and the event is a PR opened event it should return false. The trigger should NOT trigger as a result of this call.- Specified by:
isApplicableForEvent
in interfaceBitbucketWebhookTrigger
- Parameters:
event
- the webhook as it was received- Returns:
- true if this trigger is applicable to the given webhook
-
isPullRequestTrigger
public boolean isPullRequestTrigger()
-
isRefTrigger
public boolean isRefTrigger()
-
start
public void start(Job<?,?> project, boolean newInstance)
-
trigger
public void trigger(BitbucketWebhookTriggerRequest triggerRequest)
- Specified by:
trigger
in interfaceBitbucketWebhookTrigger
-
-