aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-ws
diff options
context:
space:
mode:
authorJacek <52388493+jacek-poreda-sonarsource@users.noreply.github.com>2019-07-22 17:14:53 +0200
committerSonarTech <sonartech@sonarsource.com>2019-07-22 20:21:09 +0200
commit44a69c797469630104009f6786d5b519ccf39472 (patch)
tree026a7afb68c214c903c35f5b3156bb5e567e9dc7 /sonar-ws
parenta746e93757faef10826e0971c22ab45bc33af759 (diff)
downloadsonarqube-44a69c797469630104009f6786d5b519ccf39472.tar.gz
sonarqube-44a69c797469630104009f6786d5b519ccf39472.zip
SONAR-12259 - remove deprecated request params, response fields from api/projects (#1881)
* remove deprecated params from api/projects/bulk_delete * remove deprecated projectsIds param * update documentation for api/projects/bulk_delete * remove deprecated params from api/projects/bulk_update_key * remove deprecated params: key, projectId, id * update documentation for api/projects/bulk_update_key * remove deprecated params from api/projects/create * remove deprecated param: key * update documentation for api/projects/create * remove deprecated params from api/projects/delete * remove deprecated param: projectId, key * update documentation for api/projects/delete * remove deprecated apis: api/projects/ghosts | index | provisioned * remove deprecated params from api/projects/search * remove deprecated param: projectIds * remove deprecated response fields: id (uuid) * remove all usage of deprecated params: page, pageSize (remove associated tests) * update documentation for api/projects/search * remove deprecated params from api/projects/search_my_projects * remove deprecated response fields: id (uuid) * update documentation for api/projects/search_my_projects * remove deprecated params from api/projects/update_key * remove deprecated params: id, projectId, key, newKey * change "from" param to be mandatory * remove ProjectListTest.java file as endpoint does not exist anymore * bump orchestrator version * remove ComponentDao and ComponentMapper methods associated with deprecated code * use "project" param when calling api/projects/create * update ProjectDumpOperations#renameProjectKey to use api/projects/update_key endpoint * use java api calls instead of URLs * bump orchestrator version to latest released 3.26.0.2111
Diffstat (limited to 'sonar-ws')
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/projects/BulkDeleteRequest.java15
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/projects/BulkUpdateKeyRequest.java17
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/projects/DeleteRequest.java14
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/projects/GhostsRequest.java106
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/projects/IndexRequest.java151
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/projects/ProjectsService.java71
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/projects/ProvisionedRequest.java106
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/projects/UpdateKeyRequest.java15
-rw-r--r--sonar-ws/src/main/protobuf/ws-projects.proto2
9 files changed, 1 insertions, 496 deletions
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/projects/BulkDeleteRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/projects/BulkDeleteRequest.java
index 6cc860aa78c..dedb3886134 100644
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/projects/BulkDeleteRequest.java
+++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/projects/BulkDeleteRequest.java
@@ -34,7 +34,6 @@ public class BulkDeleteRequest {
private String analyzedBefore;
private String onProvisionedOnly;
private String organization;
- private List<String> projectIds;
private List<String> projects;
private String q;
private List<String> qualifiers;
@@ -83,20 +82,6 @@ public class BulkDeleteRequest {
}
/**
- * Example value: "AU-Tpxb--iU5OvuD2FLy,AU-TpxcA-iU5OvuD2FLz"
- * @deprecated since 6.4
- */
- @Deprecated
- public BulkDeleteRequest setProjectIds(List<String> projectIds) {
- this.projectIds = projectIds;
- return this;
- }
-
- public List<String> getProjectIds() {
- return projectIds;
- }
-
- /**
* Example value: "my_project,another_project"
*/
public BulkDeleteRequest setProjects(List<String> projects) {
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/projects/BulkUpdateKeyRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/projects/BulkUpdateKeyRequest.java
index 04d3be7f0d0..3ebd96fc157 100644
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/projects/BulkUpdateKeyRequest.java
+++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/projects/BulkUpdateKeyRequest.java
@@ -19,7 +19,6 @@
*/
package org.sonarqube.ws.client.projects;
-import java.util.List;
import javax.annotation.Generated;
/**
@@ -34,7 +33,6 @@ public class BulkUpdateKeyRequest {
private String dryRun;
private String from;
private String project;
- private String projectId;
private String to;
/**
@@ -69,6 +67,7 @@ public class BulkUpdateKeyRequest {
}
/**
+ * This is a mandatory parameter.
* Example value: "my_old_project"
*/
public BulkUpdateKeyRequest setProject(String project) {
@@ -81,20 +80,6 @@ public class BulkUpdateKeyRequest {
}
/**
- * Example value: "AU-Tpxb--iU5OvuD2FLy"
- * @deprecated since 6.4
- */
- @Deprecated
- public BulkUpdateKeyRequest setProjectId(String projectId) {
- this.projectId = projectId;
- return this;
- }
-
- public String getProjectId() {
- return projectId;
- }
-
- /**
* This is a mandatory parameter.
* Example value: "_new"
*/
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/projects/DeleteRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/projects/DeleteRequest.java
index 8a6d70103f9..a9363dd9260 100644
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/projects/DeleteRequest.java
+++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/projects/DeleteRequest.java
@@ -32,7 +32,6 @@ import javax.annotation.Generated;
public class DeleteRequest {
private String project;
- private String projectId;
/**
* Example value: "my_project"
@@ -46,17 +45,4 @@ public class DeleteRequest {
return project;
}
- /**
- * Example value: "ce4c03d6-430f-40a9-b777-ad877c00aa4d"
- * @deprecated since 6.4
- */
- @Deprecated
- public DeleteRequest setProjectId(String projectId) {
- this.projectId = projectId;
- return this;
- }
-
- public String getProjectId() {
- return projectId;
- }
}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/projects/GhostsRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/projects/GhostsRequest.java
deleted file mode 100644
index 2fc40cdff04..00000000000
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/projects/GhostsRequest.java
+++ /dev/null
@@ -1,106 +0,0 @@
-/*
- * SonarQube
- * Copyright (C) 2009-2019 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.projects;
-
-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/projects/ghosts">Further information about this action online (including a response example)</a>
- * @since 5.2
- */
-@Generated("sonar-ws-generator")
-public class GhostsRequest {
-
- private List<String> f;
- private String organization;
- private String p;
- private String ps;
- private String q;
-
- /**
- * Possible values:
- * <ul>
- * <li>"name"</li>
- * <li>"creationDate"</li>
- * <li>"visibility"</li>
- * <li>"uuid"</li>
- * <li>"key"</li>
- * </ul>
- */
- public GhostsRequest setF(List<String> f) {
- this.f = f;
- return this;
- }
-
- public List<String> getF() {
- return f;
- }
-
- /**
- * This is part of the internal API.
- */
- public GhostsRequest setOrganization(String organization) {
- this.organization = organization;
- return this;
- }
-
- public String getOrganization() {
- return organization;
- }
-
- /**
- * Example value: "42"
- */
- public GhostsRequest setP(String p) {
- this.p = p;
- return this;
- }
-
- public String getP() {
- return p;
- }
-
- /**
- * Example value: "20"
- */
- public GhostsRequest setPs(String ps) {
- this.ps = ps;
- return this;
- }
-
- public String getPs() {
- return ps;
- }
-
- /**
- * Example value: "sonar"
- */
- public GhostsRequest setQ(String q) {
- this.q = q;
- return this;
- }
-
- public String getQ() {
- return q;
- }
-}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/projects/IndexRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/projects/IndexRequest.java
deleted file mode 100644
index aa9ec1678f8..00000000000
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/projects/IndexRequest.java
+++ /dev/null
@@ -1,151 +0,0 @@
-/*
- * SonarQube
- * Copyright (C) 2009-2019 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.projects;
-
-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/projects/index">Further information about this action online (including a response example)</a>
- * @since 2.10
- */
-@Generated("sonar-ws-generator")
-public class IndexRequest {
-
- private String desc;
- private String format;
- private String libs;
- private String project;
- private String search;
- private String subprojects;
- private String versions;
- private String views;
-
- /**
- * @deprecated since 6.3
- */
- @Deprecated
- public IndexRequest setDesc(String desc) {
- this.desc = desc;
- return this;
- }
-
- public String getDesc() {
- return desc;
- }
-
- /**
- * Possible values:
- * <ul>
- * <li>"json"</li>
- * </ul>
- */
- public IndexRequest setFormat(String format) {
- this.format = format;
- return this;
- }
-
- public String getFormat() {
- return format;
- }
-
- /**
- * @deprecated since 6.3
- */
- @Deprecated
- public IndexRequest setLibs(String libs) {
- this.libs = libs;
- return this;
- }
-
- public String getLibs() {
- return libs;
- }
-
- /**
- * Example value: "my_project"
- */
- public IndexRequest setProject(String project) {
- this.project = project;
- return this;
- }
-
- public String getProject() {
- return project;
- }
-
- /**
- * Example value: "Sonar"
- */
- public IndexRequest setSearch(String search) {
- this.search = search;
- return this;
- }
-
- public String getSearch() {
- return search;
- }
-
- /**
- * Possible values:
- * <ul>
- * <li>"true"</li>
- * <li>"false"</li>
- * <li>"yes"</li>
- * <li>"no"</li>
- * </ul>
- */
- public IndexRequest setSubprojects(String subprojects) {
- this.subprojects = subprojects;
- return this;
- }
-
- public String getSubprojects() {
- return subprojects;
- }
-
- /**
- * @deprecated since 6.3
- */
- @Deprecated
- public IndexRequest setVersions(String versions) {
- this.versions = versions;
- return this;
- }
-
- public String getVersions() {
- return versions;
- }
-
- /**
- * @deprecated since 6.3
- */
- @Deprecated
- public IndexRequest setViews(String views) {
- this.views = views;
- return this;
- }
-
- public String getViews() {
- return views;
- }
-}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/projects/ProjectsService.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/projects/ProjectsService.java
index ccf78e13b9a..472b06c5470 100644
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/projects/ProjectsService.java
+++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/projects/ProjectsService.java
@@ -54,7 +54,6 @@ public class ProjectsService extends BaseService {
.setParam("analyzedBefore", request.getAnalyzedBefore())
.setParam("onProvisionedOnly", request.getOnProvisionedOnly())
.setParam("organization", request.getOrganization())
- .setParam("projectIds", request.getProjectIds() == null ? null : request.getProjectIds().stream().collect(Collectors.joining(",")))
.setParam("projects", request.getProjects() == null ? null : request.getProjects().stream().collect(Collectors.joining(",")))
.setParam("q", request.getQ())
.setParam("qualifiers", request.getQualifiers() == null ? null : request.getQualifiers().stream().collect(Collectors.joining(",")))
@@ -76,7 +75,6 @@ public class ProjectsService extends BaseService {
.setParam("dryRun", request.getDryRun())
.setParam("from", request.getFrom())
.setParam("project", request.getProject())
- .setParam("projectId", request.getProjectId())
.setParam("to", request.getTo()),
BulkUpdateKeyWsResponse.parser());
}
@@ -110,73 +108,6 @@ public class ProjectsService extends BaseService {
call(
new PostRequest(path("delete"))
.setParam("project", request.getProject())
- .setParam("projectId", request.getProjectId())
- .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/projects/ghosts">Further information about this action online (including a response example)</a>
- * @since 5.2
- * @deprecated since 6.6
- */
- @Deprecated
- public String ghosts(GhostsRequest request) {
- return call(
- new GetRequest(path("ghosts"))
- .setParam("f", request.getF() == null ? null : request.getF().stream().collect(Collectors.joining(",")))
- .setParam("organization", request.getOrganization())
- .setParam("p", request.getP())
- .setParam("ps", request.getPs())
- .setParam("q", request.getQ())
- .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/projects/index">Further information about this action online (including a response example)</a>
- * @since 2.10
- * @deprecated since 6.3
- */
- @Deprecated
- public String index(IndexRequest request) {
- return call(
- new GetRequest(path("index"))
- .setParam("desc", request.getDesc())
- .setParam("format", request.getFormat())
- .setParam("libs", request.getLibs())
- .setParam("project", request.getProject())
- .setParam("search", request.getSearch())
- .setParam("subprojects", request.getSubprojects())
- .setParam("versions", request.getVersions())
- .setParam("views", request.getViews())
- .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/projects/provisioned">Further information about this action online (including a response example)</a>
- * @since 5.2
- * @deprecated since 6.6
- */
- @Deprecated
- public String provisioned(ProvisionedRequest request) {
- return call(
- new GetRequest(path("provisioned"))
- .setParam("f", request.getF() == null ? null : request.getF().stream().collect(Collectors.joining(",")))
- .setParam("organization", request.getOrganization())
- .setParam("p", request.getP())
- .setParam("ps", request.getPs())
- .setParam("q", request.getQ())
.setMediaType(MediaTypes.JSON)
).content();
}
@@ -195,7 +126,6 @@ public class ProjectsService extends BaseService {
.setParam("onProvisionedOnly", request.getOnProvisionedOnly())
.setParam("organization", request.getOrganization())
.setParam("p", request.getP())
- .setParam("projectIds", request.getProjectIds() == null ? null : request.getProjectIds().stream().collect(Collectors.joining(",")))
.setParam("projects", request.getProjects() == null ? null : request.getProjects().stream().collect(Collectors.joining(",")))
.setParam("ps", request.getPs())
.setParam("q", request.getQ())
@@ -230,7 +160,6 @@ public class ProjectsService extends BaseService {
call(
new PostRequest(path("update_key"))
.setParam("from", request.getFrom())
- .setParam("projectId", request.getProjectId())
.setParam("to", request.getTo())
.setMediaType(MediaTypes.JSON)
).content();
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/projects/ProvisionedRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/projects/ProvisionedRequest.java
deleted file mode 100644
index ab9ea4e25c3..00000000000
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/projects/ProvisionedRequest.java
+++ /dev/null
@@ -1,106 +0,0 @@
-/*
- * SonarQube
- * Copyright (C) 2009-2019 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.projects;
-
-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/projects/provisioned">Further information about this action online (including a response example)</a>
- * @since 5.2
- */
-@Generated("sonar-ws-generator")
-public class ProvisionedRequest {
-
- private List<String> f;
- private String organization;
- private String p;
- private String ps;
- private String q;
-
- /**
- * Possible values:
- * <ul>
- * <li>"name"</li>
- * <li>"creationDate"</li>
- * <li>"visibility"</li>
- * <li>"uuid"</li>
- * <li>"key"</li>
- * </ul>
- */
- public ProvisionedRequest setF(List<String> f) {
- this.f = f;
- return this;
- }
-
- public List<String> getF() {
- return f;
- }
-
- /**
- * This is part of the internal API.
- */
- public ProvisionedRequest setOrganization(String organization) {
- this.organization = organization;
- return this;
- }
-
- public String getOrganization() {
- return organization;
- }
-
- /**
- * Example value: "42"
- */
- public ProvisionedRequest setP(String p) {
- this.p = p;
- return this;
- }
-
- public String getP() {
- return p;
- }
-
- /**
- * Example value: "20"
- */
- public ProvisionedRequest setPs(String ps) {
- this.ps = ps;
- return this;
- }
-
- public String getPs() {
- return ps;
- }
-
- /**
- * Example value: "sonar"
- */
- public ProvisionedRequest setQ(String q) {
- this.q = q;
- return this;
- }
-
- public String getQ() {
- return q;
- }
-}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/projects/UpdateKeyRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/projects/UpdateKeyRequest.java
index 5440c295045..b898a36dca8 100644
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/projects/UpdateKeyRequest.java
+++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/projects/UpdateKeyRequest.java
@@ -32,7 +32,6 @@ import javax.annotation.Generated;
public class UpdateKeyRequest {
private String from;
- private String projectId;
private String to;
/**
@@ -48,20 +47,6 @@ public class UpdateKeyRequest {
}
/**
- * Example value: "AU-Tpxb--iU5OvuD2FLy"
- * @deprecated since 6.4
- */
- @Deprecated
- public UpdateKeyRequest setProjectId(String projectId) {
- this.projectId = projectId;
- return this;
- }
-
- public String getProjectId() {
- return projectId;
- }
-
- /**
* This is a mandatory parameter.
* Example value: "my_new_project"
*/
diff --git a/sonar-ws/src/main/protobuf/ws-projects.proto b/sonar-ws/src/main/protobuf/ws-projects.proto
index be060144e48..c34ce90b4b1 100644
--- a/sonar-ws/src/main/protobuf/ws-projects.proto
+++ b/sonar-ws/src/main/protobuf/ws-projects.proto
@@ -28,7 +28,6 @@ option optimize_for = SPEED;
message SearchMyProjectsWsResponse {
message Project {
- optional string id = 1;
optional string key = 2;
optional string name = 4;
optional string description = 5;
@@ -66,7 +65,6 @@ message SearchWsResponse {
message Component {
optional string organization = 1;
- optional string id = 2;
optional string key = 3;
optional string name = 4;
optional string qualifier = 5;