diff options
author | Teryk Bellahsene <teryk.bellahsene@sonarsource.com> | 2017-02-22 17:38:47 +0100 |
---|---|---|
committer | Teryk Bellahsene <teryk.bellahsene@sonarsource.com> | 2017-02-22 17:53:39 +0100 |
commit | aeaa04dec0e136a4afd75c8e0e7ef58d44e98ccc (patch) | |
tree | 0e2df3f143b8611f67b9e6d7674896b991992ed0 | |
parent | 65c5b7358240046919e6056e2f0f38376d552901 (diff) | |
download | sonarqube-aeaa04dec0e136a4afd75c8e0e7ef58d44e98ccc.tar.gz sonarqube-aeaa04dec0e136a4afd75c8e0e7ef58d44e98ccc.zip |
SONAR-8775 Deprecate component uuid in parameters and responses for components and projects WS
10 files changed, 24 insertions, 1 deletions
diff --git a/server/sonar-server/src/main/java/org/sonar/server/component/ws/ShowAction.java b/server/sonar-server/src/main/java/org/sonar/server/component/ws/ShowAction.java index 04f1aafca1c..c60d687b1d1 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/component/ws/ShowAction.java +++ b/server/sonar-server/src/main/java/org/sonar/server/component/ws/ShowAction.java @@ -69,11 +69,13 @@ public class ShowAction implements ComponentsWsAction { .setResponseExample(getClass().getResource("show-example.json")) .setSince("5.4") .setChangelog(new Change("6.4", "Analysis date has been added to the response")) + .setChangelog(new Change("6.4", "The field 'id' is deprecated in the response")) .setHandler(this); action.createParam(PARAM_COMPONENT_ID) .setDescription("Component id") .setDeprecatedKey("id", "6.4") + .setDeprecatedSince("6.4") .setExampleValue(UUID_EXAMPLE_01); action.createParam(PARAM_COMPONENT) diff --git a/server/sonar-server/src/main/java/org/sonar/server/component/ws/TreeAction.java b/server/sonar-server/src/main/java/org/sonar/server/component/ws/TreeAction.java index c5e8be4a337..c5b0a8254cf 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/component/ws/TreeAction.java +++ b/server/sonar-server/src/main/java/org/sonar/server/component/ws/TreeAction.java @@ -33,6 +33,7 @@ import java.util.Set; import javax.annotation.CheckForNull; import org.sonar.api.i18n.I18n; import org.sonar.api.resources.ResourceTypes; +import org.sonar.api.server.ws.Change; import org.sonar.api.server.ws.Request; import org.sonar.api.server.ws.Response; import org.sonar.api.server.ws.WebService; @@ -114,12 +115,15 @@ public class TreeAction implements ComponentsWsAction { PARAM_COMPONENT_ID, PARAM_COMPONENT, Param.TEXT_QUERY)) .setSince("5.4") .setResponseExample(getClass().getResource("tree-example.json")) + .setChangelog( + new Change("6.4", "The field 'id' is deprecated in the response")) .setHandler(this) .addPagingParams(100, MAX_SIZE); action.createParam(PARAM_COMPONENT_ID) .setDescription("Base component id. The search is based on this component.") .setDeprecatedKey("baseComponentId", "6.4") + .setDeprecatedSince("6.4") .setExampleValue(UUID_EXAMPLE_02); action.createParam(PARAM_COMPONENT) diff --git a/server/sonar-server/src/main/java/org/sonar/server/project/ws/BulkDeleteAction.java b/server/sonar-server/src/main/java/org/sonar/server/project/ws/BulkDeleteAction.java index 04d78a5b2f2..815763caf67 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/project/ws/BulkDeleteAction.java +++ b/server/sonar-server/src/main/java/org/sonar/server/project/ws/BulkDeleteAction.java @@ -68,6 +68,7 @@ public class BulkDeleteAction implements ProjectsWsAction { .createParam(PARAM_PROJECT_IDS) .setDescription("List of project IDs to delete") .setDeprecatedKey("ids", "6.4") + .setDeprecatedSince("6.4") .setExampleValue("ce4c03d6-430f-40a9-b777-ad877c00aa4d,c526ef20-131b-4486-9357-063fa64b5079"); action diff --git a/server/sonar-server/src/main/java/org/sonar/server/project/ws/BulkUpdateKeyAction.java b/server/sonar-server/src/main/java/org/sonar/server/project/ws/BulkUpdateKeyAction.java index f7924fceda3..7c048152d8c 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/project/ws/BulkUpdateKeyAction.java +++ b/server/sonar-server/src/main/java/org/sonar/server/project/ws/BulkUpdateKeyAction.java @@ -100,6 +100,7 @@ public class BulkUpdateKeyAction implements ProjectsWsAction { action.createParam(PARAM_PROJECT_ID) .setDescription("Project or module ID") .setDeprecatedKey("id", "6.4") + .setDeprecatedSince("6.4") .setExampleValue(UUID_EXAMPLE_01); action.createParam(PARAM_PROJECT) diff --git a/server/sonar-server/src/main/java/org/sonar/server/project/ws/DeleteAction.java b/server/sonar-server/src/main/java/org/sonar/server/project/ws/DeleteAction.java index c05bfcdc3a3..099bac67616 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/project/ws/DeleteAction.java +++ b/server/sonar-server/src/main/java/org/sonar/server/project/ws/DeleteAction.java @@ -65,6 +65,7 @@ public class DeleteAction implements ProjectsWsAction { .createParam(PARAM_PROJECT_ID) .setDescription("Project ID") .setDeprecatedKey("id", "6.4") + .setDeprecatedSince("6.4") .setExampleValue("ce4c03d6-430f-40a9-b777-ad877c00aa4d"); action diff --git a/server/sonar-server/src/main/java/org/sonar/server/project/ws/GhostsAction.java b/server/sonar-server/src/main/java/org/sonar/server/project/ws/GhostsAction.java index 29f2900191d..7d6bda694e1 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/project/ws/GhostsAction.java +++ b/server/sonar-server/src/main/java/org/sonar/server/project/ws/GhostsAction.java @@ -24,6 +24,7 @@ import java.util.Date; import java.util.List; import java.util.Set; import javax.annotation.Nullable; +import org.sonar.api.server.ws.Change; import org.sonar.api.server.ws.Request; import org.sonar.api.server.ws.Response; import org.sonar.api.server.ws.WebService; @@ -61,6 +62,8 @@ public class GhostsAction implements ProjectsWsAction { public void define(WebService.NewController context) { WebService.NewAction action = context.createAction(ACTION); + action.setChangelog(new Change("6.4", "The 'uuid' field is deprecated in the response")); + action .setDescription("List ghost projects.<br /> Requires 'Administer System' permission.") .setResponseExample(Resources.getResource(getClass(), "projects-example-ghosts.json")) diff --git a/server/sonar-server/src/main/java/org/sonar/server/project/ws/ProvisionedAction.java b/server/sonar-server/src/main/java/org/sonar/server/project/ws/ProvisionedAction.java index 0cf263eea97..a56ea71fccb 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/project/ws/ProvisionedAction.java +++ b/server/sonar-server/src/main/java/org/sonar/server/project/ws/ProvisionedAction.java @@ -25,6 +25,7 @@ import java.util.List; import java.util.Set; import org.apache.ibatis.session.RowBounds; import org.sonar.api.resources.Qualifiers; +import org.sonar.api.server.ws.Change; import org.sonar.api.server.ws.Request; import org.sonar.api.server.ws.Response; import org.sonar.api.server.ws.WebService; @@ -74,6 +75,8 @@ public class ProvisionedAction implements ProjectsWsAction { .addSearchQuery("sonar", "names", "keys") .addFieldsParam(POSSIBLE_FIELDS); + action.setChangelog(new Change("6.4", "The 'uuid' field is deprecated in the response")); + support.addOrganizationParam(action); } diff --git a/server/sonar-server/src/main/java/org/sonar/server/project/ws/SearchAction.java b/server/sonar-server/src/main/java/org/sonar/server/project/ws/SearchAction.java index 2297fc93daf..77c59e029af 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/project/ws/SearchAction.java +++ b/server/sonar-server/src/main/java/org/sonar/server/project/ws/SearchAction.java @@ -20,6 +20,7 @@ package org.sonar.server.project.ws; import java.util.List; +import org.sonar.api.server.ws.Change; import org.sonar.api.server.ws.Request; import org.sonar.api.server.ws.Response; import org.sonar.api.server.ws.WebService; @@ -73,6 +74,9 @@ public class SearchAction implements ProjectsWsAction { .addSearchQuery("sona", "component names", "component keys") .setResponseExample(getClass().getResource("search-example.json")) .setHandler(this); + + action.setChangelog(new Change("6.4", "The 'uuid' field is deprecated in the response")); + action.createParam(PARAM_QUALIFIERS) .setDescription("Comma-separated list of component qualifiers. Filter the results with the specified qualifiers") .setPossibleValues(PROJECT, VIEW) diff --git a/server/sonar-server/src/main/java/org/sonar/server/project/ws/SearchMyProjectsAction.java b/server/sonar-server/src/main/java/org/sonar/server/project/ws/SearchMyProjectsAction.java index bee4a1e3ba1..421a6e68629 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/project/ws/SearchMyProjectsAction.java +++ b/server/sonar-server/src/main/java/org/sonar/server/project/ws/SearchMyProjectsAction.java @@ -20,6 +20,7 @@ package org.sonar.server.project.ws; import java.util.function.Function; +import org.sonar.api.server.ws.Change; import org.sonar.api.server.ws.Request; import org.sonar.api.server.ws.Response; import org.sonar.api.server.ws.WebService; @@ -54,13 +55,15 @@ public class SearchMyProjectsAction implements ProjectsWsAction { @Override public void define(WebService.NewController context) { - context.createAction("search_my_projects") + WebService.NewAction action = context.createAction("search_my_projects") .setDescription("Return list of projects for which the current user has 'Administer' permission.") .setResponseExample(getClass().getResource("search_my_projects-example.json")) .addPagingParams(100, MAX_SIZE) .setSince("6.0") .setInternal(true) .setHandler(this); + + action.setChangelog(new Change("6.4", "The 'id' field is deprecated in the response")); } @Override diff --git a/server/sonar-server/src/main/java/org/sonar/server/project/ws/UpdateKeyAction.java b/server/sonar-server/src/main/java/org/sonar/server/project/ws/UpdateKeyAction.java index e3bb3f848ae..f9d9d408e84 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/project/ws/UpdateKeyAction.java +++ b/server/sonar-server/src/main/java/org/sonar/server/project/ws/UpdateKeyAction.java @@ -74,6 +74,7 @@ public class UpdateKeyAction implements ProjectsWsAction { action.createParam(PARAM_PROJECT_ID) .setDescription("Project or module id") .setDeprecatedKey("id", "6.4") + .setDeprecatedSince("6.4") .setExampleValue(UUID_EXAMPLE_01); action.createParam(PARAM_FROM) |