|
11 | 11 | import hudson.model.ParametersDefinitionProperty;
|
12 | 12 | import hudson.model.Queue;
|
13 | 13 | import hudson.model.StringParameterValue;
|
| 14 | +import jakarta.servlet.ServletException; |
14 | 15 | import java.io.BufferedReader;
|
15 | 16 | import java.io.IOException;
|
16 | 17 | import java.io.OutputStream;
|
17 | 18 | import java.nio.charset.StandardCharsets;
|
18 | 19 | import java.util.ArrayList;
|
19 | 20 | import java.util.List;
|
20 | 21 | import java.util.Objects;
|
21 |
| -import javax.servlet.ServletException; |
22 | 22 | import jenkins.model.Jenkins;
|
23 | 23 | import net.sf.json.JSONException;
|
24 | 24 | import net.sf.json.JSONObject;
|
25 | 25 | import org.jenkinsci.plugins.electricflow.causes.EFCause;
|
26 |
| -import org.kohsuke.stapler.StaplerRequest; |
27 |
| -import org.kohsuke.stapler.StaplerResponse; |
| 26 | +import org.kohsuke.stapler.StaplerRequest2; |
| 27 | +import org.kohsuke.stapler.StaplerResponse2; |
28 | 28 | import org.kohsuke.stapler.verb.GET;
|
29 | 29 | import org.kohsuke.stapler.verb.POST;
|
30 | 30 |
|
@@ -63,15 +63,15 @@ public String getUrlName() {
|
63 | 63 | // action methods
|
64 | 64 | @GET
|
65 | 65 | @POST
|
66 |
| - public void doIndex(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException { |
| 66 | + public void doIndex(StaplerRequest2 req, StaplerResponse2 rsp) throws IOException, ServletException { |
67 | 67 | rsp.setStatus(201);
|
68 | 68 | JSONObject jsonObject = this.getEFRunIndexResponse();
|
69 | 69 | this.sendJSONResponse(rsp, jsonObject);
|
70 | 70 | }
|
71 | 71 |
|
72 | 72 | @POST
|
73 | 73 | @GET
|
74 |
| - public void doBuild(StaplerRequest req, StaplerResponse rsp |
| 74 | + public void doBuild(StaplerRequest2 req, StaplerResponse2 rsp |
75 | 75 | // @QueryParameter final JSONObject json
|
76 | 76 | // @QueryParameter("value") final String value,
|
77 | 77 | // JSONObject formData
|
@@ -237,11 +237,12 @@ private List<ParameterDefinition> getParameterDefinitions() {
|
237 | 237 | return new ArrayList<ParameterDefinition>();
|
238 | 238 | }
|
239 | 239 |
|
240 |
| - private void sendJSONResponse(StaplerResponse rsp, JSONObject responseObject) throws IOException, ServletException { |
| 240 | + private void sendJSONResponse(StaplerResponse2 rsp, JSONObject responseObject) |
| 241 | + throws IOException, ServletException { |
241 | 242 | this.sendJSONResponse(201, rsp, responseObject);
|
242 | 243 | }
|
243 | 244 |
|
244 |
| - private void sendJSONResponse(int responseCode, StaplerResponse rsp, JSONObject responseObject) |
| 245 | + private void sendJSONResponse(int responseCode, StaplerResponse2 rsp, JSONObject responseObject) |
245 | 246 | throws IOException, ServletException {
|
246 | 247 | rsp.setStatus(responseCode);
|
247 | 248 | String responseString = responseObject.toString();
|
|
0 commit comments