]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-11185 Add new ws to specify projects association mode
authorJulien Lancelot <julien.lancelot@sonarsource.com>
Fri, 31 Aug 2018 11:57:22 +0000 (13:57 +0200)
committerSonarTech <sonartech@sonarsource.com>
Fri, 7 Sep 2018 18:20:56 +0000 (20:20 +0200)
* Create api/views/set_manual_mode
* Create api/views/set_remaining_projects_mode
* Create api/views/set_regexp_mode
* Deprecate api/views/mode

sonar-ws/src/main/java/org/sonarqube/ws/client/views/SetManualModeRequest.java [new file with mode: 0644]
sonar-ws/src/main/java/org/sonarqube/ws/client/views/SetRegexpModeRequest.java [new file with mode: 0644]
sonar-ws/src/main/java/org/sonarqube/ws/client/views/SetRemainingProjectsModeRequest.java [new file with mode: 0644]
sonar-ws/src/main/java/org/sonarqube/ws/client/views/ViewsService.java

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 (file)
index 0000000..8fe2fda
--- /dev/null
@@ -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 (file)
index 0000000..ed6d923
--- /dev/null
@@ -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 (file)
index 0000000..0c8203f
--- /dev/null
@@ -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;
+  }
+
+}
index 79839f0eb8e51ec0113c6eb8ed607643b366f145..b9055fdf88ab6b39a25f1b44c7b7ea9fa77c32d7 100644 (file)
@@ -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(
@@ -361,6 +363,52 @@ public class ViewsService extends BaseService {
       ).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_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.