aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-ws/src/main/java/org/sonarqube/ws/client/views
diff options
context:
space:
mode:
authorJulien Lancelot <julien.lancelot@sonarsource.com>2018-08-31 13:57:22 +0200
committerSonarTech <sonartech@sonarsource.com>2018-09-07 20:20:56 +0200
commit4dd360e67d5a75e3618b9eb1a1ef9425d4133b88 (patch)
treed14cbd849dfe11065b3879aedfe6477225903e34 /sonar-ws/src/main/java/org/sonarqube/ws/client/views
parent7dd24b9fa152f98e91ada1066977e837c69b7341 (diff)
downloadsonarqube-4dd360e67d5a75e3618b9eb1a1ef9425d4133b88.tar.gz
sonarqube-4dd360e67d5a75e3618b9eb1a1ef9425d4133b88.zip
SONAR-11185 Add new ws to specify projects association mode
* Create api/views/set_manual_mode * Create api/views/set_remaining_projects_mode * Create api/views/set_regexp_mode * Deprecate api/views/mode
Diffstat (limited to 'sonar-ws/src/main/java/org/sonarqube/ws/client/views')
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/views/SetManualModeRequest.java47
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/views/SetRegexpModeRequest.java59
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/views/SetRemainingProjectsModeRequest.java47
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/views/ViewsService.java48
4 files changed, 201 insertions, 0 deletions
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/views/SetManualModeRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/views/SetManualModeRequest.java
new file mode 100644
index 00000000000..8fe2fda439f
--- /dev/null
+++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/views/SetManualModeRequest.java
@@ -0,0 +1,47 @@
+/*
+ * SonarQube
+ * Copyright (C) 2009-2018 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.views;
+
+import javax.annotation.Generated;
+
+/**
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/views/set_manual_mode">Further information about this action online (including a response example)</a>
+ * @since 7.4
+ */
+@Generated("sonar-ws-generator")
+public class SetManualModeRequest {
+
+ private String portfolio;
+
+ /**
+ * This is a mandatory parameter.
+ */
+ public SetManualModeRequest setPortfolio(String portfolio) {
+ this.portfolio = portfolio;
+ return this;
+ }
+
+ public String getPortfolio() {
+ return portfolio;
+ }
+
+}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/views/SetRegexpModeRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/views/SetRegexpModeRequest.java
new file mode 100644
index 00000000000..ed6d92325b7
--- /dev/null
+++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/views/SetRegexpModeRequest.java
@@ -0,0 +1,59 @@
+/*
+ * SonarQube
+ * Copyright (C) 2009-2018 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.views;
+
+import javax.annotation.Generated;
+
+/**
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/views/set_regexp_mode">Further information about this action online (including a response example)</a>
+ * @since 7.4
+ */
+@Generated("sonar-ws-generator")
+public class SetRegexpModeRequest {
+
+ private String portfolio;
+ private String regexp;
+
+ /**
+ * This is a mandatory parameter.
+ */
+ public SetRegexpModeRequest setPortfolio(String portfolio) {
+ this.portfolio = portfolio;
+ return this;
+ }
+
+ public String getPortfolio() {
+ return portfolio;
+ }
+
+ /**
+ * This is a mandatory parameter.
+ */
+ public SetRegexpModeRequest setRegexp(String regexp) {
+ this.regexp = regexp;
+ return this;
+ }
+
+ public String getRegexp() {
+ return regexp;
+ }
+}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/views/SetRemainingProjectsModeRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/views/SetRemainingProjectsModeRequest.java
new file mode 100644
index 00000000000..0c8203f25dc
--- /dev/null
+++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/views/SetRemainingProjectsModeRequest.java
@@ -0,0 +1,47 @@
+/*
+ * SonarQube
+ * Copyright (C) 2009-2018 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.views;
+
+import javax.annotation.Generated;
+
+/**
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/views/set_remaining_projects_mode">Further information about this action online (including a response example)</a>
+ * @since 7.4
+ */
+@Generated("sonar-ws-generator")
+public class SetRemainingProjectsModeRequest {
+
+ private String portfolio;
+
+ /**
+ * This is a mandatory parameter.
+ */
+ public SetRemainingProjectsModeRequest setPortfolio(String portfolio) {
+ this.portfolio = portfolio;
+ return this;
+ }
+
+ public String getPortfolio() {
+ return portfolio;
+ }
+
+}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/views/ViewsService.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/views/ViewsService.java
index 79839f0eb8e..b9055fdf88a 100644
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/views/ViewsService.java
+++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/views/ViewsService.java
@@ -216,6 +216,7 @@ public class ViewsService extends BaseService {
* This is a POST request.
* @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/views/mode">Further information about this action online (including a response example)</a>
* @since 2.6
+ * @deprecated since 7.4
*/
public void mode(ModeRequest request) {
call(
@@ -300,6 +301,7 @@ public class ViewsService extends BaseService {
* This is a POST request.
* @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/views/regexp">Further information about this action online (including a response example)</a>
* @since 1.0
+ * @deprecated since 7.4
*/
public void regexp(RegexpRequest request) {
call(
@@ -365,6 +367,52 @@ public class ViewsService extends BaseService {
*
* This is part of the internal API.
* This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/views/set_manual_mode">Further information about this action online (including a response example)</a>
+ * @since 7.4
+ */
+ public void setManualMode(SetManualModeRequest request) {
+ call(
+ new PostRequest(path("set_manual_mode"))
+ .setParam("portfolio", request.getPortfolio())
+ .setMediaType(MediaTypes.JSON)
+ ).content();
+ }
+
+ /**
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/views/set_remaining_projects_mode">Further information about this action online (including a response example)</a>
+ * @since 7.4
+ */
+ public void setRegexpMode(SetRegexpModeRequest request) {
+ call(
+ new PostRequest(path("set_regexp_mode"))
+ .setParam("portfolio", request.getPortfolio())
+ .setParam("regexp", request.getRegexp())
+ .setMediaType(MediaTypes.JSON)
+ ).content();
+ }
+
+ /**
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/views/set_remaining_projects_mode">Further information about this action online (including a response example)</a>
+ * @since 7.4
+ */
+ public void setRemainingProjectsMode(SetRemainingProjectsModeRequest request) {
+ call(
+ new PostRequest(path("set_remaining_projects_mode"))
+ .setParam("portfolio", request.getPortfolio())
+ .setMediaType(MediaTypes.JSON)
+ ).content();
+ }
+
+ /**
+ *
+ * This is part of the internal API.
+ * This is a POST request.
* @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/views/set_tags_mode">Further information about this action online (including a response example)</a>
* @since 7.4
*/