aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-ws/src/main/java/org/sonarqube/ws
diff options
context:
space:
mode:
Diffstat (limited to 'sonar-ws/src/main/java/org/sonarqube/ws')
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/DefaultWsClient.java8
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/WsClient.java7
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/organization/CreateRequest.java100
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/organization/OrganizationService.java118
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/organization/SearchMembersRequest.java82
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/organization/SearchRequest.java84
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/organization/UpdateProjectVisibilityRequest.java68
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/organization/UpdateRequest.java103
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/organization/package-info.java24
9 files changed, 0 insertions, 594 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 9bf77e9cde0..81b23171f15 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
@@ -25,7 +25,6 @@ import org.sonarqube.ws.client.favorites.FavoritesService;
import org.sonarqube.ws.client.issues.IssuesService;
import org.sonarqube.ws.client.measures.MeasuresService;
import org.sonarqube.ws.client.notifications.NotificationsService;
-import org.sonarqube.ws.client.organization.OrganizationService;
import org.sonarqube.ws.client.organizations.OrganizationsService;
import org.sonarqube.ws.client.permissions.PermissionsService;
import org.sonarqube.ws.client.project.ProjectsService;
@@ -54,7 +53,6 @@ import org.sonarqube.ws.client.webhooks.WebhooksService;
class DefaultWsClient implements WsClient {
private final WsConnector wsConnector;
- private final OrganizationService organizationsOld;
private final OrganizationsService organizations;
private final org.sonarqube.ws.client.permission.PermissionsService permissionsOld;
private final PermissionsService permissions;
@@ -86,7 +84,6 @@ class DefaultWsClient implements WsClient {
DefaultWsClient(WsConnector wsConnector) {
this.wsConnector = wsConnector;
- this.organizationsOld = new OrganizationService(wsConnector);
this.organizations = new OrganizationsService(wsConnector);
this.permissionsOld = new org.sonarqube.ws.client.permission.PermissionsService(wsConnector);
this.permissions = new PermissionsService(wsConnector);
@@ -123,11 +120,6 @@ class DefaultWsClient implements WsClient {
}
@Override
- public OrganizationService organizationsOld() {
- return organizationsOld;
- }
-
- @Override
public OrganizationsService organizations() {
return organizations;
}
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 c6d200e935d..33eb13f191c 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
@@ -25,7 +25,6 @@ import org.sonarqube.ws.client.favorites.FavoritesService;
import org.sonarqube.ws.client.issues.IssuesService;
import org.sonarqube.ws.client.measures.MeasuresService;
import org.sonarqube.ws.client.notifications.NotificationsService;
-import org.sonarqube.ws.client.organization.OrganizationService;
import org.sonarqube.ws.client.organizations.OrganizationsService;
import org.sonarqube.ws.client.permissions.PermissionsService;
import org.sonarqube.ws.client.project.ProjectsService;
@@ -65,12 +64,6 @@ import org.sonarqube.ws.client.webhooks.WebhooksService;
*/
public interface WsClient {
- /**
- * @deprecated since 7.0 use {@link #organizations()} instead
- */
- @Deprecated
- OrganizationService organizationsOld();
-
OrganizationsService organizations();
/**
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/organization/CreateRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/organization/CreateRequest.java
deleted file mode 100644
index 000426a2833..00000000000
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/organization/CreateRequest.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- * SonarQube
- * Copyright (C) 2009-2017 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.organization;
-
-import javax.annotation.concurrent.Immutable;
-
-@Immutable
-public class CreateRequest {
- private final String name;
- private final String key;
- private final String description;
- private final String url;
- private final String avatar;
-
- private CreateRequest(Builder builder) {
- this.name = builder.name;
- this.key = builder.key;
- this.description = builder.description;
- this.url = builder.url;
- this.avatar = builder.avatar;
- }
-
- public String getName() {
- return name;
- }
-
- public String getKey() {
- return key;
- }
-
- public String getDescription() {
- return description;
- }
-
- public String getUrl() {
- return url;
- }
-
- public String getAvatar() {
- return avatar;
- }
-
- public static Builder builder() {
- return new Builder();
- }
-
- public static class Builder {
- private String name;
- private String key;
- private String description;
- private String url;
- private String avatar;
-
- public Builder setName(String name) {
- this.name = name;
- return this;
- }
-
- public Builder setKey(String key) {
- this.key = key;
- return this;
- }
-
- public Builder setDescription(String description) {
- this.description = description;
- return this;
- }
-
- public Builder setUrl(String url) {
- this.url = url;
- return this;
- }
-
- public Builder setAvatar(String avatar) {
- this.avatar = avatar;
- return this;
- }
-
- public CreateRequest build() {
- return new CreateRequest(this);
- }
- }
-}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/organization/OrganizationService.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/organization/OrganizationService.java
deleted file mode 100644
index 566558cf3c9..00000000000
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/organization/OrganizationService.java
+++ /dev/null
@@ -1,118 +0,0 @@
-/*
- * SonarQube
- * Copyright (C) 2009-2017 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.organization;
-
-import org.sonarqube.ws.Organizations.AddMemberWsResponse;
-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;
-
-import static java.util.Objects.requireNonNull;
-import static org.sonar.api.server.ws.WebService.Param.PAGE;
-import static org.sonar.api.server.ws.WebService.Param.PAGE_SIZE;
-import static org.sonar.api.server.ws.WebService.Param.TEXT_QUERY;
-import static org.sonarqube.ws.Organizations.CreateWsResponse;
-import static org.sonarqube.ws.Organizations.UpdateWsResponse;
-
-/**
- * @deprecated since 7.0, use {@link org.sonarqube.ws.client.organizations.OrganizationsService} instead
- */
-@Deprecated
-public class OrganizationService extends BaseService {
-
- public OrganizationService(WsConnector wsConnector) {
- super(wsConnector, "api/organizations");
- }
-
- public SearchWsResponse search(SearchRequest request) {
- GetRequest get = new GetRequest(path("search"))
- .setParam("organizations", inlineMultipleParamValue(request.getOrganizations()))
- .setParam(PAGE, request.getPage())
- .setParam(PAGE_SIZE, request.getPageSize());
-
- return call(get, SearchWsResponse.parser());
- }
-
- public CreateWsResponse create(CreateRequest request) {
- PostRequest post = new PostRequest(path("create"))
- .setParam("name", request.getName())
- .setParam("key", request.getKey())
- .setParam("description", request.getDescription())
- .setParam("url", request.getUrl())
- .setParam("avatar", request.getAvatar());
-
- return call(post, CreateWsResponse.parser());
- }
-
- public UpdateWsResponse update(UpdateRequest request) {
- PostRequest post = new PostRequest(path("update"))
- .setParam("key", request.getKey())
- .setParam("name", request.getName())
- .setParam("description", request.getDescription())
- .setParam("url", request.getUrl())
- .setParam("avatar", request.getAvatar());
-
- return call(post, UpdateWsResponse.parser());
- }
-
- public void delete(String key) {
- PostRequest post = new PostRequest(path("delete"))
- .setParam("organization", key);
-
- call(post).failIfNotSuccessful();
- }
-
- public SearchMembersWsResponse searchMembers(SearchMembersRequest request) {
- GetRequest get = new GetRequest(path("search_members"))
- .setParam("organization", request.getOrganization())
- .setParam("selected", request.getSelected())
- .setParam(TEXT_QUERY, request.getQuery())
- .setParam(PAGE, request.getPage())
- .setParam(PAGE_SIZE, request.getPageSize());
-
- return call(get, SearchMembersWsResponse.parser());
- }
-
- public AddMemberWsResponse addMember(String organizationKey, String login) {
- PostRequest post = new PostRequest(path("add_member"))
- .setParam("organization", requireNonNull(organizationKey))
- .setParam("login", requireNonNull(login));
-
- return call(post, AddMemberWsResponse.parser());
- }
-
- public void removeMember(String organizationKey, String login) {
- PostRequest post = new PostRequest(path("remove_member"))
- .setParam("organization", requireNonNull(organizationKey))
- .setParam("login", requireNonNull(login));
-
- call(post);
- }
-
- public void updateProjectVisibility(UpdateProjectVisibilityRequest request) {
- PostRequest post = new PostRequest(path("update_project_visibility"))
- .setParam("organization", request.getOrganization())
- .setParam("projectVisibility", request.getProjectVisibility());
- call(post, UpdateWsResponse.parser());
- }
-}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/organization/SearchMembersRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/organization/SearchMembersRequest.java
deleted file mode 100644
index 341a930d887..00000000000
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/organization/SearchMembersRequest.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * SonarQube
- * Copyright (C) 2009-2017 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.organization;
-
-import javax.annotation.CheckForNull;
-import javax.annotation.Nullable;
-
-public class SearchMembersRequest {
- private String organization;
- private String selected;
- private String query;
- private Integer page;
- private Integer pageSize;
-
- @CheckForNull
- public String getOrganization() {
- return organization;
- }
-
- public SearchMembersRequest setOrganization(@Nullable String organization) {
- this.organization = organization;
- return this;
- }
-
- @CheckForNull
- public String getSelected() {
- return selected;
- }
-
- public SearchMembersRequest setSelected(@Nullable String selected) {
- this.selected = selected;
- return this;
- }
-
- @CheckForNull
- public String getQuery() {
- return query;
- }
-
- public SearchMembersRequest setQuery(@Nullable String query) {
- this.query = query;
- return this;
- }
-
- @CheckForNull
- public Integer getPage() {
- return page;
- }
-
- public SearchMembersRequest setPage(@Nullable Integer page) {
- this.page = page;
- return this;
- }
-
- @CheckForNull
- public Integer getPageSize() {
- return pageSize;
- }
-
- public SearchMembersRequest setPageSize(@Nullable Integer pageSize) {
- this.pageSize = pageSize;
- return this;
- }
-}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/organization/SearchRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/organization/SearchRequest.java
deleted file mode 100644
index b3363ab8016..00000000000
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/organization/SearchRequest.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * SonarQube
- * Copyright (C) 2009-2017 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.organization;
-
-import java.util.List;
-import javax.annotation.CheckForNull;
-import javax.annotation.Nullable;
-import javax.annotation.concurrent.Immutable;
-
-import static java.util.Arrays.asList;
-
-@Immutable
-public class SearchRequest {
- private final Integer page;
- private final Integer pageSize;
- private final List<String> organizations;
-
- private SearchRequest(Builder builder) {
- this.page = builder.page;
- this.pageSize = builder.pageSize;
- this.organizations = builder.organizations;
- }
-
- @CheckForNull
- public Integer getPageSize() {
- return pageSize;
- }
-
- @CheckForNull
- public Integer getPage() {
- return page;
- }
-
- @CheckForNull
- public List<String> getOrganizations() {
- return organizations;
- }
-
- public static Builder builder() {
- return new Builder();
- }
-
- public static final class Builder {
- private Integer page;
- private Integer pageSize;
- private List<String> organizations;
-
- public Builder setPage(@Nullable Integer page) {
- this.page = page;
- return this;
- }
-
- public Builder setPageSize(@Nullable Integer pageSize) {
- this.pageSize = pageSize;
- return this;
- }
-
- public Builder setOrganizations(String... organizations) {
- this.organizations = asList(organizations);
- return this;
- }
-
- public SearchRequest build() {
- return new SearchRequest(this);
- }
- }
-}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/organization/UpdateProjectVisibilityRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/organization/UpdateProjectVisibilityRequest.java
deleted file mode 100644
index e6e320a66f4..00000000000
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/organization/UpdateProjectVisibilityRequest.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * SonarQube
- * Copyright (C) 2009-2017 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.organization;
-
-import javax.annotation.CheckForNull;
-import javax.annotation.Nullable;
-import javax.annotation.concurrent.Immutable;
-
-@Immutable
-public class UpdateProjectVisibilityRequest {
- private final String organization;
- private final String projectVisibility;
-
- private UpdateProjectVisibilityRequest(Builder builder) {
- this.organization = builder.organization;
- this.projectVisibility = builder.projectVisibility;
- }
-
- @CheckForNull
- public String getOrganization() {
- return organization;
- }
-
- @CheckForNull
- public String getProjectVisibility() {
- return projectVisibility;
- }
-
- public static Builder builder() {
- return new Builder();
- }
-
- public static class Builder {
- private String organization;
- private String projectVisibility;
-
- public Builder setOrganization(@Nullable String organization) {
- this.organization = organization;
- return this;
- }
-
- public Builder setProjectVisibility(@Nullable String projectVisibility) {
- this.projectVisibility = projectVisibility;
- return this;
- }
-
- public UpdateProjectVisibilityRequest build() {
- return new UpdateProjectVisibilityRequest(this);
- }
- }
-}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/organization/UpdateRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/organization/UpdateRequest.java
deleted file mode 100644
index eb2de7b7e6d..00000000000
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/organization/UpdateRequest.java
+++ /dev/null
@@ -1,103 +0,0 @@
-/*
- * SonarQube
- * Copyright (C) 2009-2017 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.organization;
-
-import javax.annotation.CheckForNull;
-import javax.annotation.Nullable;
-import javax.annotation.concurrent.Immutable;
-
-@Immutable
-public class UpdateRequest {
- private final String key;
- private final String name;
- private final String description;
- private final String url;
- private final String avatar;
-
- private UpdateRequest(Builder builder) {
- this.name = builder.name;
- this.key = builder.key;
- this.description = builder.description;
- this.url = builder.url;
- this.avatar = builder.avatar;
- }
-
- @CheckForNull
- public String getName() {
- return name;
- }
-
- @CheckForNull
- public String getKey() {
- return key;
- }
-
- @CheckForNull
- public String getDescription() {
- return description;
- }
-
- @CheckForNull
- public String getUrl() {
- return url;
- }
-
- @CheckForNull
- public String getAvatar() {
- return avatar;
- }
-
- public static class Builder {
- private String key;
- private String name;
- private String description;
- private String url;
- private String avatar;
-
- public Builder setKey(@Nullable String key) {
- this.key = key;
- return this;
- }
-
- public Builder setName(@Nullable String name) {
- this.name = name;
- return this;
- }
-
- public Builder setDescription(@Nullable String description) {
- this.description = description;
- return this;
- }
-
- public Builder setUrl(@Nullable String url) {
- this.url = url;
- return this;
- }
-
- public Builder setAvatar(@Nullable String avatar) {
- this.avatar = avatar;
- return this;
- }
-
- public UpdateRequest build() {
- return new UpdateRequest(this);
- }
- }
-}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/organization/package-info.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/organization/package-info.java
deleted file mode 100644
index 4a96eb871c6..00000000000
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/organization/package-info.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * SonarQube
- * Copyright (C) 2009-2017 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
-package org.sonarqube.ws.client.organization;
-
-import javax.annotation.ParametersAreNonnullByDefault;
-