From 680aed78d5a58249ae56ca36b5f495bb579bce1a Mon Sep 17 00:00:00 2001 From: Lukasz Jarocki Date: Thu, 26 Aug 2021 16:24:36 +0200 Subject: SONAR-15313 drop endpoints from WebAPI deprecated since 7.X Co-authored-by: Lukasz Jarocki Co-authored-by: Philippe Perrin Co-authored-by: MikeBirnstiehl --- .../sonarqube/ws/client/views/CreateRequest.java | 19 ---- .../org/sonarqube/ws/client/views/ModeRequest.java | 102 --------------------- .../sonarqube/ws/client/views/RegexpRequest.java | 59 ------------ .../ws/client/views/SetNoneModeRequest.java | 47 ++++++++++ .../sonarqube/ws/client/views/ViewsService.java | 53 +++-------- 5 files changed, 62 insertions(+), 218 deletions(-) delete mode 100644 sonar-ws/src/main/java/org/sonarqube/ws/client/views/ModeRequest.java delete mode 100644 sonar-ws/src/main/java/org/sonarqube/ws/client/views/RegexpRequest.java create mode 100644 sonar-ws/src/main/java/org/sonarqube/ws/client/views/SetNoneModeRequest.java (limited to 'sonar-ws/src/main/java/org/sonarqube/ws/client/views') diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/views/CreateRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/views/CreateRequest.java index b97a6d99b58..05c6bb4849e 100644 --- a/sonar-ws/src/main/java/org/sonarqube/ws/client/views/CreateRequest.java +++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/views/CreateRequest.java @@ -33,7 +33,6 @@ public class CreateRequest { private String description; private String key; private String name; - private String qualifier; private String visibility; /** @@ -70,24 +69,6 @@ public class CreateRequest { return name; } - /** - * Possible values: - *
    - *
  • "VW"
  • - *
  • "APP"
  • - *
- * @deprecated since 7.3 - */ - @Deprecated - public CreateRequest setQualifier(String qualifier) { - this.qualifier = qualifier; - return this; - } - - public String getQualifier() { - return qualifier; - } - /** * Possible values: *
    diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/views/ModeRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/views/ModeRequest.java deleted file mode 100644 index bd3593172d0..00000000000 --- a/sonar-ws/src/main/java/org/sonarqube/ws/client/views/ModeRequest.java +++ /dev/null @@ -1,102 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2021 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 Further information about this action online (including a response example) - * @since 2.6 - */ -@Generated("sonar-ws-generator") -public class ModeRequest { - - private String key; - private String measure; - private String regexp; - private String selectionMode; - private String value; - - /** - * This is a mandatory parameter. - */ - public ModeRequest setKey(String key) { - this.key = key; - return this; - } - - public String getKey() { - return key; - } - - /** - */ - public ModeRequest setMeasure(String measure) { - this.measure = measure; - return this; - } - - public String getMeasure() { - return measure; - } - - /** - */ - public ModeRequest setRegexp(String regexp) { - this.regexp = regexp; - return this; - } - - public String getRegexp() { - return regexp; - } - - /** - * This is a mandatory parameter. - * Possible values: - *
      - *
    • "MANUAL"
    • - *
    • "REGEXP"
    • - *
    • "MANUAL_MEASURE"
    • - *
    • "REST"
    • - *
    - */ - public ModeRequest setSelectionMode(String selectionMode) { - this.selectionMode = selectionMode; - return this; - } - - public String getSelectionMode() { - return selectionMode; - } - - /** - */ - public ModeRequest setValue(String value) { - this.value = value; - return this; - } - - public String getValue() { - return value; - } -} diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/views/RegexpRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/views/RegexpRequest.java deleted file mode 100644 index 743090dc706..00000000000 --- a/sonar-ws/src/main/java/org/sonarqube/ws/client/views/RegexpRequest.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2021 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 Further information about this action online (including a response example) - * @since 1.0 - */ -@Generated("sonar-ws-generator") -public class RegexpRequest { - - private String key; - private String regexp; - - /** - * This is a mandatory parameter. - */ - public RegexpRequest setKey(String key) { - this.key = key; - return this; - } - - public String getKey() { - return key; - } - - /** - * This is a mandatory parameter. - */ - public RegexpRequest 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/SetNoneModeRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/views/SetNoneModeRequest.java new file mode 100644 index 00000000000..b0582ae231d --- /dev/null +++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/views/SetNoneModeRequest.java @@ -0,0 +1,47 @@ +/* + * SonarQube + * Copyright (C) 2009-2021 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 Further information about this action online (including a response example) + * @since 9.1 + */ +@Generated("sonar-ws-generator") +public class SetNoneModeRequest { + + private String portfolio; + + /** + * This is a mandatory parameter. + */ + public SetNoneModeRequest 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 52ba65115e0..d81260983b8 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 @@ -114,7 +114,6 @@ public class ViewsService extends BaseService { .setParam("description", request.getDescription()) .setParam("key", request.getKey()) .setParam("name", request.getName()) - .setParam("qualifier", request.getQualifier()) .setParam("visibility", request.getVisibility()) .setMediaType(MediaTypes.JSON) ).content(); @@ -193,26 +192,6 @@ public class ViewsService extends BaseService { ).content(); } - /** - * - * This is part of the internal API. - * This is a POST request. - * @see Further information about this action online (including a response example) - * @since 2.6 - * @deprecated since 7.4 - */ - public void mode(ModeRequest request) { - call( - new PostRequest(path("mode")) - .setParam("key", request.getKey()) - .setParam("measure", request.getMeasure()) - .setParam("regexp", request.getRegexp()) - .setParam("selectionMode", request.getSelectionMode()) - .setParam("value", request.getValue()) - .setMediaType(MediaTypes.JSON) - ).content(); - } - /** * * This is part of the internal API. @@ -278,23 +257,6 @@ public class ViewsService extends BaseService { ).content(); } - /** - * - * This is part of the internal API. - * This is a POST request. - * @see Further information about this action online (including a response example) - * @since 1.0 - * @deprecated since 7.4 - */ - public void regexp(RegexpRequest request) { - call( - new PostRequest(path("regexp")) - .setParam("key", request.getKey()) - .setParam("regexp", request.getRegexp()) - .setMediaType(MediaTypes.JSON) - ).content(); - } - /** * * This is part of the internal API. @@ -361,6 +323,21 @@ public class ViewsService extends BaseService { ).content(); } + /** + * + * This is part of the internal API. + * This is a POST request. + * @see Further information about this action online (including a response example) + * @since 9.1 + */ + public void setNoneMode(SetNoneModeRequest request) { + call( + new PostRequest(path("set_none_mode")) + .setParam("portfolio", request.getPortfolio()) + .setMediaType(MediaTypes.JSON) + ).content(); + } + /** * * This is part of the internal API. -- cgit v1.2.3