aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-ws
diff options
context:
space:
mode:
authorMichal Duda <michal.duda@sonarsource.com>2020-12-15 13:36:18 +0100
committersonartech <sonartech@sonarsource.com>2020-12-22 20:09:37 +0000
commit845542d4912f32222abe15a010a38e16622c158b (patch)
treeb5d20a8fea38862790c31b2c2e51723f1f087e49 /sonar-ws
parente88bf5b78cf19d5fd42bf12189499d5743d19367 (diff)
downloadsonarqube-845542d4912f32222abe15a010a38e16622c158b.tar.gz
sonarqube-845542d4912f32222abe15a010a38e16622c158b.zip
SONAR-13999 remove some organization WS
Diffstat (limited to 'sonar-ws')
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/organizations/AddMemberRequest.java61
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/organizations/CreateRequest.java99
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/organizations/DeleteRequest.java47
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/organizations/OrganizationsService.java92
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/organizations/RemoveMemberRequest.java61
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/organizations/UpdateRequest.java99
-rw-r--r--sonar-ws/src/main/protobuf/ws-organizations.proto25
7 files changed, 3 insertions, 481 deletions
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/organizations/AddMemberRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/organizations/AddMemberRequest.java
deleted file mode 100644
index 712089f29a0..00000000000
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/organizations/AddMemberRequest.java
+++ /dev/null
@@ -1,61 +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/add_member">Further information about this action online (including a response example)</a>
- * @since 6.4
- */
-@Generated("sonar-ws-generator")
-public class AddMemberRequest {
-
- private String login;
- private String organization;
-
- /**
- * This is a mandatory parameter.
- * Example value: "ray.bradbury"
- */
- public AddMemberRequest setLogin(String login) {
- this.login = login;
- return this;
- }
-
- public String getLogin() {
- return login;
- }
-
- /**
- * This is a mandatory parameter.
- * Example value: "my-org"
- */
- public AddMemberRequest setOrganization(String organization) {
- this.organization = organization;
- return this;
- }
-
- public String getOrganization() {
- return organization;
- }
-}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/organizations/CreateRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/organizations/CreateRequest.java
deleted file mode 100644
index 3b043c9a01e..00000000000
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/organizations/CreateRequest.java
+++ /dev/null
@@ -1,99 +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/create">Further information about this action online (including a response example)</a>
- * @since 6.2
- */
-@Generated("sonar-ws-generator")
-public class CreateRequest {
-
- private String avatar;
- private String description;
- private String key;
- private String name;
- private String url;
-
- /**
- * Example value: "https://www.foo.com/foo.png"
- */
- public CreateRequest setAvatar(String avatar) {
- this.avatar = avatar;
- return this;
- }
-
- public String getAvatar() {
- return avatar;
- }
-
- /**
- * Example value: "The Foo company produces quality software for Bar."
- */
- public CreateRequest setDescription(String description) {
- this.description = description;
- return this;
- }
-
- public String getDescription() {
- return description;
- }
-
- /**
- * Example value: "foo-company"
- */
- public CreateRequest setKey(String key) {
- this.key = key;
- return this;
- }
-
- public String getKey() {
- return key;
- }
-
- /**
- * This is a mandatory parameter.
- * Example value: "Foo Company"
- */
- public CreateRequest setName(String name) {
- this.name = name;
- return this;
- }
-
- public String getName() {
- return name;
- }
-
- /**
- * Example value: "https://www.foo.com"
- */
- public CreateRequest setUrl(String url) {
- this.url = url;
- return this;
- }
-
- public String getUrl() {
- return url;
- }
-}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/organizations/DeleteRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/organizations/DeleteRequest.java
deleted file mode 100644
index 65890a30691..00000000000
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/organizations/DeleteRequest.java
+++ /dev/null
@@ -1,47 +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/delete">Further information about this action online (including a response example)</a>
- * @since 6.2
- */
-@Generated("sonar-ws-generator")
-public class DeleteRequest {
-
- private String organization;
-
- /**
- * This is a mandatory parameter.
- * Example value: "foo-company"
- */
- public DeleteRequest setOrganization(String organization) {
- this.organization = organization;
- return this;
- }
-
- public String getOrganization() {
- return organization;
- }
-}
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
index d067cd8f3bf..fad2afd2bdc 100644
--- 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
@@ -22,15 +22,12 @@ 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;
-import org.sonarqube.ws.Organizations.AddMemberWsResponse;
-import org.sonarqube.ws.Organizations.CreateWsResponse;
-import org.sonarqube.ws.Organizations.SearchWsResponse;
-import org.sonarqube.ws.Organizations.SearchMembersWsResponse;
-import org.sonarqube.ws.Organizations.UpdateWsResponse;
/**
* @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/organizations">Further information about this web service online</a>
@@ -46,78 +43,13 @@ public class OrganizationsService extends BaseService {
*
* This is part of the internal API.
* This is a POST request.
- * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/organizations/add_member">Further information about this action online (including a response example)</a>
- * @since 6.4
- */
- public AddMemberWsResponse addMember(AddMemberRequest request) {
- return call(
- new PostRequest(path("add_member"))
- .setParam("login", request.getLogin())
- .setParam("organization", request.getOrganization()),
- AddMemberWsResponse.parser());
- }
-
- /**
- *
- * This is part of the internal API.
- * This is a POST request.
- * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/organizations/create">Further information about this action online (including a response example)</a>
- * @since 6.2
- */
- public CreateWsResponse create(CreateRequest request) {
- return call(
- new PostRequest(path("create"))
- .setParam("avatar", request.getAvatar())
- .setParam("description", request.getDescription())
- .setParam("key", request.getKey())
- .setParam("name", request.getName())
- .setParam("url", request.getUrl()),
- CreateWsResponse.parser());
- }
-
- /**
- *
- * This is part of the internal API.
- * This is a POST request.
- * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/organizations/delete">Further information about this action online (including a response example)</a>
- * @since 6.2
- */
- public void delete(DeleteRequest request) {
- call(
- new PostRequest(path("delete"))
- .setParam("organization", request.getOrganization())
- .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/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 POST request.
- * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/organizations/remove_member">Further information about this action online (including a response example)</a>
- * @since 6.4
- */
- public void removeMember(RemoveMemberRequest request) {
- call(
- new PostRequest(path("remove_member"))
- .setParam("login", request.getLogin())
- .setParam("organization", request.getOrganization())
- .setMediaType(MediaTypes.JSON)
- ).content();
+ .setMediaType(MediaTypes.JSON)).content();
}
/**
@@ -154,22 +86,4 @@ public class OrganizationsService extends BaseService {
.setParam("selected", request.getSelected()),
SearchMembersWsResponse.parser());
}
-
- /**
- *
- * This is part of the internal API.
- * This is a POST request.
- * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/organizations/update">Further information about this action online (including a response example)</a>
- * @since 6.2
- */
- public void update(UpdateRequest request) {
- call(
- new PostRequest(path("update"))
- .setParam("avatar", request.getAvatar())
- .setParam("description", request.getDescription())
- .setParam("key", request.getKey())
- .setParam("name", request.getName())
- .setParam("url", request.getUrl()),
- UpdateWsResponse.parser());
- }
}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/organizations/RemoveMemberRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/organizations/RemoveMemberRequest.java
deleted file mode 100644
index 4cf728cc6c2..00000000000
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/organizations/RemoveMemberRequest.java
+++ /dev/null
@@ -1,61 +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/remove_member">Further information about this action online (including a response example)</a>
- * @since 6.4
- */
-@Generated("sonar-ws-generator")
-public class RemoveMemberRequest {
-
- private String login;
- private String organization;
-
- /**
- * This is a mandatory parameter.
- * Example value: "ray.bradbury"
- */
- public RemoveMemberRequest setLogin(String login) {
- this.login = login;
- return this;
- }
-
- public String getLogin() {
- return login;
- }
-
- /**
- * This is a mandatory parameter.
- * Example value: "my-org"
- */
- public RemoveMemberRequest setOrganization(String organization) {
- this.organization = organization;
- return this;
- }
-
- public String getOrganization() {
- return organization;
- }
-}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/organizations/UpdateRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/organizations/UpdateRequest.java
deleted file mode 100644
index 0cfb983db00..00000000000
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/organizations/UpdateRequest.java
+++ /dev/null
@@ -1,99 +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/update">Further information about this action online (including a response example)</a>
- * @since 6.2
- */
-@Generated("sonar-ws-generator")
-public class UpdateRequest {
-
- private String avatar;
- private String description;
- private String key;
- private String name;
- private String url;
-
- /**
- * Example value: "https://www.foo.com/foo.png"
- */
- public UpdateRequest setAvatar(String avatar) {
- this.avatar = avatar;
- return this;
- }
-
- public String getAvatar() {
- return avatar;
- }
-
- /**
- * Example value: "The Foo company produces quality software for Bar."
- */
- public UpdateRequest setDescription(String description) {
- this.description = description;
- return this;
- }
-
- public String getDescription() {
- return description;
- }
-
- /**
- * This is a mandatory parameter.
- * Example value: "foo-company"
- */
- public UpdateRequest setKey(String key) {
- this.key = key;
- return this;
- }
-
- public String getKey() {
- return key;
- }
-
- /**
- * Example value: "Foo Company"
- */
- public UpdateRequest setName(String name) {
- this.name = name;
- return this;
- }
-
- public String getName() {
- return name;
- }
-
- /**
- * Example value: "https://www.foo.com"
- */
- public UpdateRequest setUrl(String url) {
- this.url = url;
- return this;
- }
-
- public String getUrl() {
- return url;
- }
-}
diff --git a/sonar-ws/src/main/protobuf/ws-organizations.proto b/sonar-ws/src/main/protobuf/ws-organizations.proto
index f16c6b7a40f..d4a87d2b74d 100644
--- a/sonar-ws/src/main/protobuf/ws-organizations.proto
+++ b/sonar-ws/src/main/protobuf/ws-organizations.proto
@@ -26,16 +26,6 @@ option java_package = "org.sonarqube.ws";
option java_outer_classname = "Organizations";
option optimize_for = SPEED;
-// WS api/organizations/create
-message CreateWsResponse {
- optional Organization organization = 1;
-}
-
-// WS api/organizations/update
-message UpdateWsResponse {
- optional Organization organization = 1;
-}
-
// WS api/organizations/search
message SearchWsResponse {
repeated Organization organizations = 1;
@@ -48,21 +38,6 @@ message SearchMembersWsResponse {
repeated User users = 2;
}
-// WS api/organizations/add_member
-message AddMemberWsResponse {
- optional User user = 1;
-}
-
-// WS api/organizations/prevent_user_deletion
-message PreventUserDeletionWsResponse {
- repeated Organization organizations = 1;
-
- message Organization {
- optional string key = 1;
- optional string name = 2;
- }
-}
-
message Organization {
optional string key = 1;
optional string name = 2;