diff options
author | Teryk Bellahsene <teryk.bellahsene@sonarsource.com> | 2016-03-24 11:49:11 +0100 |
---|---|---|
committer | Julien Lancelot <julien.lancelot@sonarsource.com> | 2016-03-25 15:02:44 +0100 |
commit | 2404ce6699a1aa3a5c0cc8313f2953ad8af4d784 (patch) | |
tree | 09aa26c8c5d02cdb8203f00271d0ac1b9533f0ce /sonar-ws | |
parent | 83dd467a6b49b6048b86b1eb8a9416926a1d1077 (diff) | |
download | sonarqube-2404ce6699a1aa3a5c0cc8313f2953ad8af4d784.tar.gz sonarqube-2404ce6699a1aa3a5c0cc8313f2953ad8af4d784.zip |
SONAR-7468 SONAR-7199 Remove or update Action Plan related web services
Diffstat (limited to 'sonar-ws')
5 files changed, 23 insertions, 37 deletions
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/issue/IssueFilterParameters.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/issue/IssueFilterParameters.java index 90abaf64a31..fd443367ebe 100644 --- a/sonar-ws/src/main/java/org/sonarqube/ws/client/issue/IssueFilterParameters.java +++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/issue/IssueFilterParameters.java @@ -47,7 +47,12 @@ public class IssueFilterParameters { public static final String FILE_UUIDS = "fileUuids"; public static final String ON_COMPONENT_ONLY = "onComponentOnly"; public static final String RULES = "rules"; - public static final String ACTION_PLANS = "actionPlans"; + + /** + * @deprecated since 5.5, action plan feature has been removed + */ + @Deprecated + public static final String DEPRECATED_ACTION_PLANS = "actionPlans"; public static final String REPORTERS = "reporters"; public static final String ASSIGNEES = "assignees"; public static final String AUTHORS = "authors"; @@ -55,6 +60,11 @@ public class IssueFilterParameters { public static final String TAGS = "tags"; public static final String TYPES = "types"; public static final String ASSIGNED = "assigned"; + + /** + * @deprecated since 5.5, action plan feature has been removed + */ + @Deprecated public static final String PLANNED = "planned"; public static final String HIDE_RULES = "hideRules"; public static final String HIDE_COMMENTS = "hideComments"; @@ -82,7 +92,7 @@ public class IssueFilterParameters { public static final String FACET_ASSIGNED_TO_ME = "assigned_to_me"; public static final List<String> ALL = ImmutableList.of(ISSUES, SEVERITIES, STATUSES, RESOLUTIONS, RESOLVED, - COMPONENTS, COMPONENT_ROOTS, RULES, ACTION_PLANS, REPORTERS, TAGS, TYPES, + COMPONENTS, COMPONENT_ROOTS, RULES, DEPRECATED_ACTION_PLANS, REPORTERS, TAGS, TYPES, ASSIGNEES, LANGUAGES, ASSIGNED, PLANNED, HIDE_RULES, CREATED_AT, CREATED_AFTER, CREATED_BEFORE, CREATED_IN_LAST, COMPONENT_UUIDS, COMPONENT_ROOT_UUIDS, FACET_MODE, PROJECTS, PROJECT_UUIDS, PROJECT_KEYS, COMPONENT_KEYS, MODULE_UUIDS, DIRECTORIES, FILE_UUIDS, AUTHORS, diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/issue/IssuesService.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/issue/IssuesService.java index 11837e40285..aeb9a126811 100644 --- a/sonar-ws/src/main/java/org/sonarqube/ws/client/issue/IssuesService.java +++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/issue/IssuesService.java @@ -24,7 +24,6 @@ import org.sonarqube.ws.client.BaseService; import org.sonarqube.ws.client.GetRequest; import org.sonarqube.ws.client.WsConnector; -import static org.sonarqube.ws.client.issue.IssueFilterParameters.ACTION_PLANS; import static org.sonarqube.ws.client.issue.IssueFilterParameters.ADDITIONAL_FIELDS; import static org.sonarqube.ws.client.issue.IssueFilterParameters.ASC; import static org.sonarqube.ws.client.issue.IssueFilterParameters.ASSIGNED; @@ -39,6 +38,7 @@ import static org.sonarqube.ws.client.issue.IssueFilterParameters.CREATED_AFTER; import static org.sonarqube.ws.client.issue.IssueFilterParameters.CREATED_AT; import static org.sonarqube.ws.client.issue.IssueFilterParameters.CREATED_BEFORE; import static org.sonarqube.ws.client.issue.IssueFilterParameters.CREATED_IN_LAST; +import static org.sonarqube.ws.client.issue.IssueFilterParameters.DEPRECATED_ACTION_PLANS; import static org.sonarqube.ws.client.issue.IssueFilterParameters.DIRECTORIES; import static org.sonarqube.ws.client.issue.IssueFilterParameters.FACET_MODE; import static org.sonarqube.ws.client.issue.IssueFilterParameters.FILE_UUIDS; @@ -46,7 +46,6 @@ import static org.sonarqube.ws.client.issue.IssueFilterParameters.ISSUES; import static org.sonarqube.ws.client.issue.IssueFilterParameters.LANGUAGES; import static org.sonarqube.ws.client.issue.IssueFilterParameters.MODULE_UUIDS; import static org.sonarqube.ws.client.issue.IssueFilterParameters.ON_COMPONENT_ONLY; -import static org.sonarqube.ws.client.issue.IssueFilterParameters.PLANNED; import static org.sonarqube.ws.client.issue.IssueFilterParameters.PROJECTS; import static org.sonarqube.ws.client.issue.IssueFilterParameters.PROJECT_KEYS; import static org.sonarqube.ws.client.issue.IssueFilterParameters.PROJECT_UUIDS; @@ -68,7 +67,7 @@ public class IssuesService extends BaseService { public SearchWsResponse search(SearchWsRequest request) { return call( new GetRequest(path("search")) - .setParam(ACTION_PLANS, inlineMultipleParamValue(request.getActionPlans())) + .setParam(DEPRECATED_ACTION_PLANS, inlineMultipleParamValue(request.getActionPlans())) .setParam(ADDITIONAL_FIELDS, inlineMultipleParamValue(request.getAdditionalFields())) .setParam(ASC, request.getAsc()) .setParam(ASSIGNED, request.getAssigned()) @@ -93,7 +92,6 @@ public class IssuesService extends BaseService { .setParam(ON_COMPONENT_ONLY, request.getOnComponentOnly()) .setParam("p", request.getPage()) .setParam("ps", request.getPageSize()) - .setParam(PLANNED, request.getPlanned()) .setParam(PROJECT_KEYS, inlineMultipleParamValue(request.getProjectKeys())) .setParam(PROJECT_UUIDS, inlineMultipleParamValue(request.getProjectUuids())) .setParam(PROJECTS, inlineMultipleParamValue(request.getProjects())) diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/issue/SearchWsRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/issue/SearchWsRequest.java index e782c4d95ab..35f4e6d7e4c 100644 --- a/sonar-ws/src/main/java/org/sonarqube/ws/client/issue/SearchWsRequest.java +++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/issue/SearchWsRequest.java @@ -49,7 +49,6 @@ public class SearchWsRequest { private Boolean onComponentOnly; private Integer page; private Integer pageSize; - private Boolean planned; private List<String> projectKeys; private List<String> projectUuids; private List<String> projects; @@ -285,16 +284,6 @@ public class SearchWsRequest { } @CheckForNull - public Boolean getPlanned() { - return planned; - } - - public SearchWsRequest setPlanned(@Nullable Boolean planned) { - this.planned = planned; - return this; - } - - @CheckForNull public List<String> getProjectKeys() { return projectKeys; } diff --git a/sonar-ws/src/main/protobuf/ws-issues.proto b/sonar-ws/src/main/protobuf/ws-issues.proto index ad073765c8c..a253c424402 100644 --- a/sonar-ws/src/main/protobuf/ws-issues.proto +++ b/sonar-ws/src/main/protobuf/ws-issues.proto @@ -42,7 +42,9 @@ message SearchWsResponse { repeated Component components = 7; optional sonarqube.ws.commons.Rules rules = 8; optional sonarqube.ws.commons.Users users = 9; - optional ActionPlans actionPlans = 10; + + // Deprecated since 5.5, action plan has been removed + optional ActionPlans unusedActionPlans = 10; optional Languages languages = 11; optional sonarqube.ws.commons.Facets facets = 12; } @@ -53,7 +55,8 @@ message Operation { repeated Component components = 2; repeated sonarqube.ws.commons.Rule rules = 3; repeated sonarqube.ws.commons.User users = 4; - repeated ActionPlan actionPlans = 5; + // Deprecated since 5.5, action plan has been removed + repeated ActionPlan actiunusedActionPlansonPlans = 5; } message Issue { @@ -81,7 +84,9 @@ message Issue { // SCM login of the committer who introduced the issue optional string author = 17; + // Deprecated since 5.5, action plan has been removed optional string actionPlan = 18; + repeated string tags = 19; // the transitions allowed for the requesting user. @@ -136,6 +141,7 @@ message Comments { repeated Comment comments = 1; } +// Deprecated since 5.5 message ActionPlan { optional string key = 1; optional string name = 2; @@ -147,6 +153,7 @@ message ActionPlan { optional string project = 5; } +// Deprecated since 5.5 message ActionPlans { repeated ActionPlan actionPlans = 1; } diff --git a/sonar-ws/src/test/java/org/sonarqube/ws/client/issue/SearchWsRequestTest.java b/sonar-ws/src/test/java/org/sonarqube/ws/client/issue/SearchWsRequestTest.java index 9fc4bac7ccd..521dfb190b1 100644 --- a/sonar-ws/src/test/java/org/sonarqube/ws/client/issue/SearchWsRequestTest.java +++ b/sonar-ws/src/test/java/org/sonarqube/ws/client/issue/SearchWsRequestTest.java @@ -466,24 +466,6 @@ public class SearchWsRequestTest { } @Test - public void getPlanned_returns_null_when_SearchWsRequest_has_just_been_instantiated() { - assertThat(underTest.getPlanned()).isNull(); - } - - @Test - public void setPlanned_accepts_null() { - underTest.setPlanned(null); - } - - @Test - public void getPlanned_returns_boolean_from_setPlanned() { - underTest.setPlanned(true); - assertThat(underTest.getPlanned()).isTrue(); - underTest.setPlanned(false); - assertThat(underTest.getPlanned()).isFalse(); - } - - @Test public void getResolved_returns_null_when_SearchWsRequest_has_just_been_instantiated() { assertThat(underTest.getResolved()).isNull(); } |