aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-ws/src/main/java/org/sonarqube/ws/client/webservices
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@sonarsource.com>2017-11-24 14:00:02 +0100
committerDaniel Schwarz <bartfastiel@users.noreply.github.com>2017-11-29 20:24:11 +0100
commit12f9e1c990deb948912f4da725b0e8c49cdac163 (patch)
tree4d212a23c401d17af32c2794f2b6d4793f5b53a3 /sonar-ws/src/main/java/org/sonarqube/ws/client/webservices
parent10fe82e5c55f29460d1a3a46f6f32215af68a3f8 (diff)
downloadsonarqube-12f9e1c990deb948912f4da725b0e8c49cdac163.tar.gz
sonarqube-12f9e1c990deb948912f4da725b0e8c49cdac163.zip
Merge sonar-ws-generated into sonar-ws
Diffstat (limited to 'sonar-ws/src/main/java/org/sonarqube/ws/client/webservices')
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/webservices/ListRequest.java56
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/webservices/ResponseExampleRequest.java67
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/webservices/WebservicesService.java71
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/webservices/package-info.java24
4 files changed, 218 insertions, 0 deletions
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/webservices/ListRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/webservices/ListRequest.java
new file mode 100644
index 00000000000..4505ab69093
--- /dev/null
+++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/webservices/ListRequest.java
@@ -0,0 +1,56 @@
+/*
+ * SonarQube
+ * Copyright (C) 2009-2017 SonarSource SA
+ * mailto:info AT sonarsource DOT com
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+package org.sonarqube.ws.client.webservices;
+
+import javax.annotation.Generated;
+
+/**
+ * List web services
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/webservices/list">Further information about this action online (including a response example)</a>
+ * @since 4.2
+ */
+@Generated("sonar-ws-generator")
+public class ListRequest {
+
+ private String includeInternals;
+
+ /**
+ * Include web services that are implemented for internal use only. Their forward-compatibility is not assured
+ *
+ * Possible values:
+ * <ul>
+ * <li>"true"</li>
+ * <li>"false"</li>
+ * <li>"yes"</li>
+ * <li>"no"</li>
+ * </ul>
+ */
+ public ListRequest setIncludeInternals(String includeInternals) {
+ this.includeInternals = includeInternals;
+ return this;
+ }
+
+ public String getIncludeInternals() {
+ return includeInternals;
+ }
+}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/webservices/ResponseExampleRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/webservices/ResponseExampleRequest.java
new file mode 100644
index 00000000000..79657974c31
--- /dev/null
+++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/webservices/ResponseExampleRequest.java
@@ -0,0 +1,67 @@
+/*
+ * SonarQube
+ * Copyright (C) 2009-2017 SonarSource SA
+ * mailto:info AT sonarsource DOT com
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+package org.sonarqube.ws.client.webservices;
+
+import javax.annotation.Generated;
+
+/**
+ * Display web service response example
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/webservices/response_example">Further information about this action online (including a response example)</a>
+ * @since 4.4
+ */
+@Generated("sonar-ws-generator")
+public class ResponseExampleRequest {
+
+ private String action;
+ private String controller;
+
+ /**
+ * Action of the web service
+ *
+ * This is a mandatory parameter.
+ * Example value: "search"
+ */
+ public ResponseExampleRequest setAction(String action) {
+ this.action = action;
+ return this;
+ }
+
+ public String getAction() {
+ return action;
+ }
+
+ /**
+ * Controller of the web service
+ *
+ * This is a mandatory parameter.
+ * Example value: "api/issues"
+ */
+ public ResponseExampleRequest setController(String controller) {
+ this.controller = controller;
+ return this;
+ }
+
+ public String getController() {
+ return controller;
+ }
+}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/webservices/WebservicesService.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/webservices/WebservicesService.java
new file mode 100644
index 00000000000..14912772103
--- /dev/null
+++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/webservices/WebservicesService.java
@@ -0,0 +1,71 @@
+/*
+ * SonarQube
+ * Copyright (C) 2009-2017 SonarSource SA
+ * mailto:info AT sonarsource DOT com
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+package org.sonarqube.ws.client.webservices;
+
+import javax.annotation.Generated;
+import org.sonarqube.ws.MediaTypes;
+import org.sonarqube.ws.client.BaseService;
+import org.sonarqube.ws.client.GetRequest;
+import org.sonarqube.ws.client.WsConnector;
+
+/**
+ * Get information on the web api supported on this instance.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/webservices">Further information about this web service online</a>
+ */
+@Generated("sonar-ws-generator")
+public class WebservicesService extends BaseService {
+
+ public WebservicesService(WsConnector wsConnector) {
+ super(wsConnector, "api/webservices");
+ }
+
+ /**
+ * List web services
+ *
+ * This is part of the internal API.
+ * This is a GET request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/webservices/list">Further information about this action online (including a response example)</a>
+ * @since 4.2
+ */
+ public String list(ListRequest request) {
+ return call(
+ new GetRequest(path("list"))
+ .setParam("include_internals", request.getIncludeInternals())
+ .setMediaType(MediaTypes.JSON)
+ ).content();
+ }
+
+ /**
+ * Display web service response example
+ *
+ * This is part of the internal API.
+ * This is a GET request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/webservices/response_example">Further information about this action online (including a response example)</a>
+ * @since 4.4
+ */
+ public String responseExample(ResponseExampleRequest request) {
+ return call(
+ new GetRequest(path("response_example"))
+ .setParam("action", request.getAction())
+ .setParam("controller", request.getController())
+ .setMediaType(MediaTypes.JSON)
+ ).content();
+ }
+}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/webservices/package-info.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/webservices/package-info.java
new file mode 100644
index 00000000000..d8ec8cbb9d7
--- /dev/null
+++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/webservices/package-info.java
@@ -0,0 +1,24 @@
+/*
+ * SonarQube
+ * Copyright (C) 2009-2017 SonarSource SA
+ * mailto:info AT sonarsource DOT com
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+@ParametersAreNonnullByDefault
+package org.sonarqube.ws.client.webservices;
+
+import javax.annotation.ParametersAreNonnullByDefault;
+