diff options
author | Michal Duda <michal.duda@sonarsource.com> | 2020-12-21 17:55:10 +0100 |
---|---|---|
committer | sonartech <sonartech@sonarsource.com> | 2020-12-22 20:09:39 +0000 |
commit | 5bfa95f6d5928460f1d8102417d5b6604f96feba (patch) | |
tree | b3bec61cc2bed8fbdbbb31d80385b228686ffa33 /sonar-ws/src/main | |
parent | 255d1fb82f78f046ef95f2e7a45cc5d4ba94c97e (diff) | |
download | sonarqube-5bfa95f6d5928460f1d8102417d5b6604f96feba.tar.gz sonarqube-5bfa95f6d5928460f1d8102417d5b6604f96feba.zip |
SONAR-13999 Remove OrganizationDbTester
Diffstat (limited to 'sonar-ws/src/main')
7 files changed, 0 insertions, 402 deletions
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/DefaultWsClient.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/DefaultWsClient.java index e79d59e8886..1338618065a 100644 --- a/sonar-ws/src/main/java/org/sonarqube/ws/client/DefaultWsClient.java +++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/DefaultWsClient.java @@ -44,7 +44,6 @@ import org.sonarqube.ws.client.metrics.MetricsService; import org.sonarqube.ws.client.navigation.NavigationService; import org.sonarqube.ws.client.newcodeperiods.NewCodePeriodsService; import org.sonarqube.ws.client.notifications.NotificationsService; -import org.sonarqube.ws.client.organizations.OrganizationsService; import org.sonarqube.ws.client.permissions.PermissionsService; import org.sonarqube.ws.client.plugins.PluginsService; import org.sonarqube.ws.client.projectanalyses.ProjectAnalysesService; @@ -110,7 +109,6 @@ class DefaultWsClient implements WsClient { private final NavigationService navigationService; private final NewCodePeriodsService newCodePeriodsService; private final NotificationsService notificationsService; - private final OrganizationsService organizationsService; private final PermissionsService permissionsService; private final PluginsService pluginsService; private final ProjectAnalysesService projectAnalysesService; @@ -169,7 +167,6 @@ class DefaultWsClient implements WsClient { this.navigationService = new NavigationService(wsConnector); this.newCodePeriodsService = new NewCodePeriodsService(wsConnector); this.notificationsService = new NotificationsService(wsConnector); - this.organizationsService = new OrganizationsService(wsConnector); this.permissionsService = new PermissionsService(wsConnector); this.pluginsService = new PluginsService(wsConnector); this.projectAnalysesService = new ProjectAnalysesService(wsConnector); @@ -325,11 +322,6 @@ class DefaultWsClient implements WsClient { } @Override - public OrganizationsService organizations() { - return organizationsService; - } - - @Override public PermissionsService permissions() { return permissionsService; } diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/WsClient.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/WsClient.java index 3f7243d0520..ad279d4d446 100644 --- a/sonar-ws/src/main/java/org/sonarqube/ws/client/WsClient.java +++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/WsClient.java @@ -44,7 +44,6 @@ import org.sonarqube.ws.client.metrics.MetricsService; import org.sonarqube.ws.client.navigation.NavigationService; import org.sonarqube.ws.client.newcodeperiods.NewCodePeriodsService; import org.sonarqube.ws.client.notifications.NotificationsService; -import org.sonarqube.ws.client.organizations.OrganizationsService; import org.sonarqube.ws.client.permissions.PermissionsService; import org.sonarqube.ws.client.plugins.PluginsService; import org.sonarqube.ws.client.projectanalyses.ProjectAnalysesService; @@ -145,8 +144,6 @@ public interface WsClient { NotificationsService notifications(); - OrganizationsService organizations(); - PermissionsService permissions(); PluginsService plugins(); diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/organizations/OrganizationsService.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/organizations/OrganizationsService.java deleted file mode 100644 index fad2afd2bdc..00000000000 --- a/sonar-ws/src/main/java/org/sonarqube/ws/client/organizations/OrganizationsService.java +++ /dev/null @@ -1,89 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2020 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.organizations; - -import java.util.stream.Collectors; -import javax.annotation.Generated; -import org.sonarqube.ws.MediaTypes; -import org.sonarqube.ws.Organizations.SearchMembersWsResponse; -import org.sonarqube.ws.Organizations.SearchWsResponse; -import org.sonarqube.ws.client.BaseService; -import org.sonarqube.ws.client.GetRequest; -import org.sonarqube.ws.client.PostRequest; -import org.sonarqube.ws.client.WsConnector; - -/** - * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/organizations">Further information about this web service online</a> - */ -@Generated("sonar-ws-generator") -public class OrganizationsService extends BaseService { - - public OrganizationsService(WsConnector wsConnector) { - super(wsConnector, "api/organizations"); - } - - /** - * - * This is part of the internal API. - * This is a POST request. - * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/organizations/enable_support">Further information about this action online (including a response example)</a> - * @since 6.3 - */ - public void enableSupport() { - call( - new PostRequest(path("enable_support")) - .setMediaType(MediaTypes.JSON)).content(); - } - - /** - * - * This is part of the internal API. - * This is a GET request. - * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/organizations/search">Further information about this action online (including a response example)</a> - * @since 6.2 - */ - public SearchWsResponse search(SearchRequest request) { - return call( - new GetRequest(path("search")) - .setParam("member", request.getMember()) - .setParam("organizations", request.getOrganizations() == null ? null : request.getOrganizations().stream().collect(Collectors.joining(","))) - .setParam("p", request.getP()) - .setParam("ps", request.getPs()), - SearchWsResponse.parser()); - } - - /** - * - * This is part of the internal API. - * This is a GET request. - * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/organizations/search_members">Further information about this action online (including a response example)</a> - * @since 6.4 - */ - public SearchMembersWsResponse searchMembers(SearchMembersRequest request) { - return call( - new GetRequest(path("search_members")) - .setParam("organization", request.getOrganization()) - .setParam("p", request.getP()) - .setParam("ps", request.getPs()) - .setParam("q", request.getQ()) - .setParam("selected", request.getSelected()), - SearchMembersWsResponse.parser()); - } -} diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/organizations/SearchMembersRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/organizations/SearchMembersRequest.java deleted file mode 100644 index 0e93fb3acad..00000000000 --- a/sonar-ws/src/main/java/org/sonarqube/ws/client/organizations/SearchMembersRequest.java +++ /dev/null @@ -1,103 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2020 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.organizations; - -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/organizations/search_members">Further information about this action online (including a response example)</a> - * @since 6.4 - */ -@Generated("sonar-ws-generator") -public class SearchMembersRequest { - - private String organization; - private String p; - private String ps; - private String q; - private String selected; - - /** - * This is part of the internal API. - */ - public SearchMembersRequest setOrganization(String organization) { - this.organization = organization; - return this; - } - - public String getOrganization() { - return organization; - } - - /** - * Example value: "42" - */ - public SearchMembersRequest setP(String p) { - this.p = p; - return this; - } - - public String getP() { - return p; - } - - /** - * Example value: "20" - */ - public SearchMembersRequest setPs(String ps) { - this.ps = ps; - return this; - } - - public String getPs() { - return ps; - } - - /** - * Example value: "orwe" - */ - public SearchMembersRequest setQ(String q) { - this.q = q; - return this; - } - - public String getQ() { - return q; - } - - /** - * This is part of the internal API. - * Possible values: - * <ul> - * <li>"selected"</li> - * <li>"deselected"</li> - * </ul> - */ - public SearchMembersRequest setSelected(String selected) { - this.selected = selected; - return this; - } - - public String getSelected() { - return selected; - } -} diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/organizations/SearchRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/organizations/SearchRequest.java deleted file mode 100644 index 145f632cf93..00000000000 --- a/sonar-ws/src/main/java/org/sonarqube/ws/client/organizations/SearchRequest.java +++ /dev/null @@ -1,92 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2020 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.organizations; - -import java.util.List; -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/organizations/search">Further information about this action online (including a response example)</a> - * @since 6.2 - */ -@Generated("sonar-ws-generator") -public class SearchRequest { - - private String member; - private List<String> organizations; - private String p; - private String ps; - - /** - * Possible values: - * <ul> - * <li>"true"</li> - * <li>"false"</li> - * <li>"yes"</li> - * <li>"no"</li> - * </ul> - */ - public SearchRequest setMember(String member) { - this.member = member; - return this; - } - - public String getMember() { - return member; - } - - /** - * Example value: "my-org-1,foocorp" - */ - public SearchRequest setOrganizations(List<String> organizations) { - this.organizations = organizations; - return this; - } - - public List<String> getOrganizations() { - return organizations; - } - - /** - * Example value: "42" - */ - public SearchRequest setP(String p) { - this.p = p; - return this; - } - - public String getP() { - return p; - } - - /** - * Example value: "20" - */ - public SearchRequest setPs(String ps) { - this.ps = ps; - return this; - } - - public String getPs() { - return ps; - } -} diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/organizations/package-info.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/organizations/package-info.java deleted file mode 100644 index 0740d543c20..00000000000 --- a/sonar-ws/src/main/java/org/sonarqube/ws/client/organizations/package-info.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2020 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 -@Generated("sonar-ws-generator") -package org.sonarqube.ws.client.organizations; - -import javax.annotation.ParametersAreNonnullByDefault; -import javax.annotation.Generated; - diff --git a/sonar-ws/src/main/protobuf/ws-organizations.proto b/sonar-ws/src/main/protobuf/ws-organizations.proto deleted file mode 100644 index d4a87d2b74d..00000000000 --- a/sonar-ws/src/main/protobuf/ws-organizations.proto +++ /dev/null @@ -1,81 +0,0 @@ -// SonarQube, open source software quality management tool. -// Copyright (C) 2008-2016 SonarSource -// mailto:contact AT sonarsource DOT com -// -// SonarQube 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. -// -// SonarQube 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. - -syntax = "proto2"; - -package sonarqube.ws.organizations; - -import "ws-commons.proto"; - -option java_package = "org.sonarqube.ws"; -option java_outer_classname = "Organizations"; -option optimize_for = SPEED; - -// WS api/organizations/search -message SearchWsResponse { - repeated Organization organizations = 1; - optional sonarqube.ws.commons.Paging paging = 2; -} - -// WS api/organizations/search_members -message SearchMembersWsResponse { - optional sonarqube.ws.commons.Paging paging = 1; - repeated User users = 2; -} - -message Organization { - optional string key = 1; - optional string name = 2; - optional string description = 3; - optional string url = 4; - optional string avatar = 5; - optional Alm alm = 8; - optional Actions actions = 9; - optional Subscription subscription = 10; - - message Alm { - optional string key = 1; - optional string url = 2; - optional bool personal = 3; - } - - message Actions { - optional bool admin = 1; - optional bool delete = 2; - optional bool provision = 3; - } -} - -message User { - optional string login = 1; - optional string name = 2; - optional string avatar = 3; - optional int32 groupCount = 4; -} - - -// See org.sonar.db.organization.OrganizationDto.Subscription -enum Subscription { - // Zero is required in order to not get LONG as default value - // See http://androiddevblog.com/protocol-buffers-pitfall-adding-enum-values/ - UNKNOWN = 0; - - SONARQUBE = 1; - FREE = 2; - PAID = 3; -} |