Class JSONWebHook
java.lang.Object
org.jenkinsci.plugins.registry.notification.webhook.JSONWebHook
- All Implemented Interfaces:
ExtensionPoint
,Action
,ModelObject
,RootAction
,UnprotectedRootAction
- Direct Known Subclasses:
ACRWebHook
,DockerHubWebHook
,DockerRegistryWebHook
-
Nested Class Summary
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected abstract WebHookPayload
createPushNotification
(net.sf.json.JSONObject data) void
doIndex
(org.kohsuke.stapler.StaplerRequest request, org.kohsuke.stapler.StaplerResponse response) If someone wanders in to the index page, redirect to Jenkins root.void
doNotify
(String payload, org.kohsuke.stapler.StaplerRequest request, org.kohsuke.stapler.StaplerResponse response) getDetails
(String sha) Stapler entry for the multi build result pagegetDynamic
(String token, org.kohsuke.stapler.StaplerResponse rsp) protected void
trigger
(org.kohsuke.stapler.StaplerResponse response, PushNotification pushNotification) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface hudson.model.Action
getUrlName
-
Constructor Details
-
JSONWebHook
public JSONWebHook()
-
-
Method Details
-
getIconFileName
- Specified by:
getIconFileName
in interfaceAction
-
getDisplayName
- Specified by:
getDisplayName
in interfaceAction
- Specified by:
getDisplayName
in interfaceModelObject
-
doNotify
public void doNotify(@QueryParameter(required=false) String payload, org.kohsuke.stapler.StaplerRequest request, org.kohsuke.stapler.StaplerResponse response) throws IOException - Throws:
IOException
-
getDynamic
public JSONWebHook.ValidApiToken getDynamic(String token, org.kohsuke.stapler.StaplerResponse rsp) throws IOException - Throws:
IOException
-
getDetails
Stapler entry for the multi build result page- Parameters:
sha
- the id of the trigger data.- Returns:
- the details
- Throws:
IOException
- if soInterruptedException
- if so
-
trigger
protected void trigger(org.kohsuke.stapler.StaplerResponse response, PushNotification pushNotification) throws IOException - Throws:
IOException
-
doIndex
public void doIndex(org.kohsuke.stapler.StaplerRequest request, org.kohsuke.stapler.StaplerResponse response) throws IOException If someone wanders in to the index page, redirect to Jenkins root.- Parameters:
request
- the request objectresponse
- the response object- Throws:
IOException
- if so
-
createPushNotification
-