From 97326aea65eda35a54cb8df8ee59a2ccf6c2b12a Mon Sep 17 00:00:00 2001 From: =?utf8?q?L=C3=A9o=20Geoffroy?= <99647462+leo-geoffroy-sonarsource@users.noreply.github.com> Date: Wed, 25 Jan 2023 16:56:09 +0100 Subject: [PATCH] SONAR-17705 Remove deprecated endpoints: AddLocalViewAction, LocalViewAction, AddSubViewAction --- .../java/org/sonar/db/issue/IssueDao.java | 1 - .../ws/client/views/AddLocalViewRequest.java | 60 ------------- .../ws/client/views/AddSubViewRequest.java | 84 ------------------- .../ws/client/views/LocalViewsRequest.java | 47 ----------- .../ws/client/views/ViewsService.java | 55 ------------ 5 files changed, 247 deletions(-) delete mode 100644 sonar-ws/src/main/java/org/sonarqube/ws/client/views/AddLocalViewRequest.java delete mode 100644 sonar-ws/src/main/java/org/sonarqube/ws/client/views/AddSubViewRequest.java delete mode 100644 sonar-ws/src/main/java/org/sonarqube/ws/client/views/LocalViewsRequest.java diff --git a/server/sonar-db-dao/src/main/java/org/sonar/db/issue/IssueDao.java b/server/sonar-db-dao/src/main/java/org/sonar/db/issue/IssueDao.java index de6cd440a31..e6ad7029e57 100644 --- a/server/sonar-db-dao/src/main/java/org/sonar/db/issue/IssueDao.java +++ b/server/sonar-db-dao/src/main/java/org/sonar/db/issue/IssueDao.java @@ -27,7 +27,6 @@ import org.sonar.db.Dao; import org.sonar.db.DbSession; import org.sonar.db.Pagination; import org.sonar.db.RowNotFoundException; -import org.sonar.db.WildcardPosition; import org.sonar.db.component.ComponentDto; import static org.sonar.db.DaoUtils.buildLikeValue; diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/views/AddLocalViewRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/views/AddLocalViewRequest.java deleted file mode 100644 index fa37b844197..00000000000 --- a/sonar-ws/src/main/java/org/sonarqube/ws/client/views/AddLocalViewRequest.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2023 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 java.util.List; -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 AddLocalViewRequest { - - private String key; - private String refKey; - - /** - * This is a mandatory parameter. - */ - public AddLocalViewRequest setKey(String key) { - this.key = key; - return this; - } - - public String getKey() { - return key; - } - - /** - * This is a mandatory parameter. - */ - public AddLocalViewRequest setRefKey(String refKey) { - this.refKey = refKey; - return this; - } - - public String getRefKey() { - return refKey; - } -} diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/views/AddSubViewRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/views/AddSubViewRequest.java deleted file mode 100644 index 9ac692162be..00000000000 --- a/sonar-ws/src/main/java/org/sonarqube/ws/client/views/AddSubViewRequest.java +++ /dev/null @@ -1,84 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2023 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 java.util.List; -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 AddSubViewRequest { - - private String description; - private String key; - private String name; - private String subKey; - - /** - */ - public AddSubViewRequest setDescription(String description) { - this.description = description; - return this; - } - - public String getDescription() { - return description; - } - - /** - * This is a mandatory parameter. - */ - public AddSubViewRequest setKey(String key) { - this.key = key; - return this; - } - - public String getKey() { - return key; - } - - /** - * This is a mandatory parameter. - */ - public AddSubViewRequest setName(String name) { - this.name = name; - return this; - } - - public String getName() { - return name; - } - - /** - */ - public AddSubViewRequest setSubKey(String subKey) { - this.subKey = subKey; - return this; - } - - public String getSubKey() { - return subKey; - } -} diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/views/LocalViewsRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/views/LocalViewsRequest.java deleted file mode 100644 index 72375b9418a..00000000000 --- a/sonar-ws/src/main/java/org/sonarqube/ws/client/views/LocalViewsRequest.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2023 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 java.util.List; -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 LocalViewsRequest { - - private String key; - - /** - * This is a mandatory parameter. - */ - public LocalViewsRequest setKey(String key) { - this.key = key; - return this; - } - - public String getKey() { - return key; - } -} 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 7dd41a0cc63..eb74613c654 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 @@ -53,24 +53,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 9.3 - */ - @Deprecated - public void addLocalView(AddLocalViewRequest request) { - call( - new PostRequest(path("add_local_view")) - .setParam("key", request.getKey()) - .setParam("ref_key", request.getRefKey()) - .setMediaType(MediaTypes.JSON) - ).content(); - } - /** * * This is part of the internal API. @@ -120,26 +102,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 9.3 - */ - @Deprecated - public void addSubView(AddSubViewRequest request) { - call( - new PostRequest(path("add_sub_view")) - .setParam("description", request.getDescription()) - .setParam("key", request.getKey()) - .setParam("name", request.getName()) - .setParam("subKey", request.getSubKey()) - .setMediaType(MediaTypes.JSON) - ).content(); - } - /** * * This is part of the internal API. @@ -236,23 +198,6 @@ public class ViewsService extends BaseService { ).content(); } - /** - * - * This is part of the internal API. - * This is a GET request. - * @see Further information about this action online (including a response example) - * @since 1.0 - * @deprecated since 9.3 - */ - @Deprecated - public String localViews(LocalViewsRequest request) { - return call( - new GetRequest(path("local_views")) - .setParam("key", request.getKey()) - .setMediaType(MediaTypes.JSON) - ).content(); - } - /** * * This is part of the internal API. -- 2.39.5