diff options
author | Julien Lancelot <julien.lancelot@sonarsource.com> | 2019-04-04 17:45:26 +0200 |
---|---|---|
committer | SonarTech <sonartech@sonarsource.com> | 2019-04-04 20:21:05 +0200 |
commit | d08c839cb2433f58a35505da8f58e418c23ce1ae (patch) | |
tree | 3cee508a6cc4d0e2d6415de289ecb3b6eee2797f /sonar-ws/src/main/java/org/sonarqube | |
parent | f3dffef937f4c1608e23a02f43ded50ab7854ac1 (diff) | |
download | sonarqube-d08c839cb2433f58a35505da8f58e418c23ce1ae.tar.gz sonarqube-d08c839cb2433f58a35505da8f58e418c23ce1ae.zip |
Revert "SONAR-11876 Remove ws deprecated in SonarQube 5.X"
This reverts commit e1559e763aa1d3b436b46044a352a43e16aaa38a.
Diffstat (limited to 'sonar-ws/src/main/java/org/sonarqube')
18 files changed, 442 insertions, 1 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 587899c7824..d83de740725 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 @@ -44,6 +44,7 @@ import org.sonarqube.ws.client.notifications.NotificationsService; import org.sonarqube.ws.client.organizations.OrganizationsService; import org.sonarqube.ws.client.permissions.PermissionsService; import org.sonarqube.ws.client.plugins.PluginsService; +import org.sonarqube.ws.client.profiles.ProfilesService; import org.sonarqube.ws.client.projectanalyses.ProjectAnalysesService; import org.sonarqube.ws.client.projectbadges.ProjectBadgesService; import org.sonarqube.ws.client.projectbranches.ProjectBranchesService; @@ -55,6 +56,7 @@ import org.sonarqube.ws.client.projecttags.ProjectTagsService; import org.sonarqube.ws.client.properties.PropertiesService; import org.sonarqube.ws.client.qualitygates.QualitygatesService; import org.sonarqube.ws.client.qualityprofiles.QualityprofilesService; +import org.sonarqube.ws.client.resources.ResourcesService; import org.sonarqube.ws.client.roots.RootsService; import org.sonarqube.ws.client.rules.RulesService; import org.sonarqube.ws.client.securityreports.SecurityReportsService; @@ -107,6 +109,7 @@ class DefaultWsClient implements WsClient { private final OrganizationsService organizationsService; private final PermissionsService permissionsService; private final PluginsService pluginsService; + private final ProfilesService profilesService; private final ProjectAnalysesService projectAnalysesService; private final ProjectBadgesService projectBadgesService; private final ProjectBranchesService projectBranchesService; @@ -118,6 +121,7 @@ class DefaultWsClient implements WsClient { private final PropertiesService propertiesService; private final QualitygatesService qualitygatesService; private final QualityprofilesService qualityprofilesService; + private final ResourcesService resourcesService; private final RootsService rootsService; private final RulesService rulesService; private final ServerService serverService; @@ -163,6 +167,7 @@ class DefaultWsClient implements WsClient { this.organizationsService = new OrganizationsService(wsConnector); this.permissionsService = new PermissionsService(wsConnector); this.pluginsService = new PluginsService(wsConnector); + this.profilesService = new ProfilesService(wsConnector); this.projectAnalysesService = new ProjectAnalysesService(wsConnector); this.projectBadgesService = new ProjectBadgesService(wsConnector); this.projectBranchesService = new ProjectBranchesService(wsConnector); @@ -174,6 +179,7 @@ class DefaultWsClient implements WsClient { this.propertiesService = new PropertiesService(wsConnector); this.qualitygatesService = new QualitygatesService(wsConnector); this.qualityprofilesService = new QualityprofilesService(wsConnector); + this.resourcesService = new ResourcesService(wsConnector); this.rootsService = new RootsService(wsConnector); this.rulesService = new RulesService(wsConnector); this.serverService = new ServerService(wsConnector); @@ -316,6 +322,11 @@ class DefaultWsClient implements WsClient { } @Override + public ProfilesService profiles() { + return profilesService; + } + + @Override public ProjectAnalysesService projectAnalyses() { return projectAnalysesService; } @@ -371,6 +382,11 @@ class DefaultWsClient implements WsClient { } @Override + public ResourcesService resources() { + return resourcesService; + } + + @Override public RootsService roots() { return rootsService; } 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 5fdba68259d..30df290cd00 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 @@ -44,6 +44,7 @@ import org.sonarqube.ws.client.notifications.NotificationsService; import org.sonarqube.ws.client.organizations.OrganizationsService; import org.sonarqube.ws.client.permissions.PermissionsService; import org.sonarqube.ws.client.plugins.PluginsService; +import org.sonarqube.ws.client.profiles.ProfilesService; import org.sonarqube.ws.client.projectanalyses.ProjectAnalysesService; import org.sonarqube.ws.client.projectbadges.ProjectBadgesService; import org.sonarqube.ws.client.projectbranches.ProjectBranchesService; @@ -55,6 +56,7 @@ import org.sonarqube.ws.client.projecttags.ProjectTagsService; import org.sonarqube.ws.client.properties.PropertiesService; import org.sonarqube.ws.client.qualitygates.QualitygatesService; import org.sonarqube.ws.client.qualityprofiles.QualityprofilesService; +import org.sonarqube.ws.client.resources.ResourcesService; import org.sonarqube.ws.client.roots.RootsService; import org.sonarqube.ws.client.rules.RulesService; import org.sonarqube.ws.client.securityreports.SecurityReportsService; @@ -142,6 +144,8 @@ public interface WsClient { PluginsService plugins(); + ProfilesService profiles(); + ProjectAnalysesService projectAnalyses(); ProjectBadgesService projectBadges(); @@ -164,6 +168,8 @@ public interface WsClient { QualityprofilesService qualityprofiles(); + ResourcesService resources(); + RootsService roots(); RulesService rules(); diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/ce/ActivityRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/ce/ActivityRequest.java index 9b4cafe70ae..ad47a8c0a8b 100644 --- a/sonar-ws/src/main/java/org/sonarqube/ws/client/ce/ActivityRequest.java +++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/ce/ActivityRequest.java @@ -32,9 +32,11 @@ import javax.annotation.Generated; public class ActivityRequest { private String componentId; + private String componentQuery; private String maxExecutedAt; private String minSubmittedAt; private String onlyCurrents; + private String p; private String ps; private String q; private List<String> status; @@ -53,6 +55,20 @@ public class ActivityRequest { } /** + * Example value: "Apache" + * @deprecated since 5.5 + */ + @Deprecated + public ActivityRequest setComponentQuery(String componentQuery) { + this.componentQuery = componentQuery; + return this; + } + + public String getComponentQuery() { + return componentQuery; + } + + /** * Example value: "2017-10-19T13:00:00+0200" */ public ActivityRequest setMaxExecutedAt(String maxExecutedAt) { @@ -95,6 +111,19 @@ public class ActivityRequest { } /** + * @deprecated since 5.5 + */ + @Deprecated + public ActivityRequest setP(String p) { + this.p = p; + return this; + } + + public String getP() { + return p; + } + + /** * Example value: "20" */ public ActivityRequest setPs(String ps) { diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/ce/CeService.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/ce/CeService.java index 030f8d30c83..2269d55f60f 100644 --- a/sonar-ws/src/main/java/org/sonarqube/ws/client/ce/CeService.java +++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/ce/CeService.java @@ -57,9 +57,11 @@ public class CeService extends BaseService { return call( new GetRequest(path("activity")) .setParam("componentId", request.getComponentId()) + .setParam("componentQuery", request.getComponentQuery()) .setParam("maxExecutedAt", request.getMaxExecutedAt()) .setParam("minSubmittedAt", request.getMinSubmittedAt()) .setParam("onlyCurrents", request.getOnlyCurrents()) + .setParam("p", request.getP()) .setParam("ps", request.getPs()) .setParam("q", request.getQ()) .setParam("status", request.getStatus() == null ? null : request.getStatus().stream().collect(Collectors.joining(","))) diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/issue/IssuesWsParameters.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/issue/IssuesWsParameters.java index 551ee1e4130..041813066b1 100644 --- a/sonar-ws/src/main/java/org/sonarqube/ws/client/issue/IssuesWsParameters.java +++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/issue/IssuesWsParameters.java @@ -52,8 +52,11 @@ public class IssuesWsParameters { public static final String PARAM_STATUSES = "statuses"; public static final String PARAM_RESOLUTIONS = "resolutions"; public static final String PARAM_RESOLVED = "resolved"; + public static final String PARAM_COMPONENTS = "components"; public static final String PARAM_COMPONENT_KEYS = "componentKeys"; public static final String PARAM_COMPONENT_UUIDS = "componentUuids"; + public static final String PARAM_COMPONENT_ROOTS = "componentRoots"; + public static final String PARAM_COMPONENT_ROOT_UUIDS = "componentRootUuids"; public static final String PARAM_MODULE_UUIDS = "moduleUuids"; public static final String PARAM_PROJECTS = "projects"; public static final String PARAM_PROJECT_KEYS = "projectKeys"; @@ -67,10 +70,23 @@ public class IssuesWsParameters { public static final String PARAM_ASSIGN = "assign"; public static final String PARAM_SET_SEVERITY = "set_severity"; public static final String PARAM_SET_TYPE = "set_type"; + public static final String PARAM_PLAN = "plan"; public static final String PARAM_DO_TRANSITION = "do_transition"; public static final String PARAM_ADD_TAGS = "add_tags"; public static final String PARAM_REMOVE_TAGS = "remove_tags"; public static final String PARAM_SEND_NOTIFICATIONS = "sendNotifications"; + + /** + * @deprecated since 5.5, action plan feature has been removed + */ + @Deprecated + public static final String DEPRECATED_PARAM_ACTION_PLANS = "actionPlans"; + + /** + * @deprecated since 5.5, manual issue feature has been dropped. + */ + @Deprecated + public static final String PARAM_REPORTERS = "reporters"; public static final String PARAM_ASSIGNEES = "assignees"; /** @@ -87,6 +103,12 @@ public class IssuesWsParameters { public static final String PARAM_SANS_TOP_25 = "sansTop25"; public static final String PARAM_CWE = "cwe"; public static final String PARAM_ASSIGNED = "assigned"; + + /** + * @deprecated since 5.5, action plan feature has been removed + */ + @Deprecated + public static final String PARAM_PLANNED = "planned"; public static final String PARAM_HIDE_COMMENTS = "hideComments"; public static final String PARAM_CREATED_AFTER = "createdAfter"; public static final String PARAM_CREATED_AT = "createdAt"; diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/issues/AssignRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/issues/AssignRequest.java index dd377affe65..525b7878ccd 100644 --- a/sonar-ws/src/main/java/org/sonarqube/ws/client/issues/AssignRequest.java +++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/issues/AssignRequest.java @@ -33,6 +33,7 @@ public class AssignRequest { private String assignee; private String issue; + private String me; /** * Example value: "admin" @@ -59,4 +60,23 @@ public class AssignRequest { return issue; } + /** + * Possible values: + * <ul> + * <li>"true"</li> + * <li>"false"</li> + * <li>"yes"</li> + * <li>"no"</li> + * </ul> + * @deprecated since 5.2 + */ + @Deprecated + public AssignRequest setMe(String me) { + this.me = me; + return this; + } + + public String getMe() { + return me; + } } diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/issues/BulkChangeRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/issues/BulkChangeRequest.java index cc9a67ef188..29a2305259b 100644 --- a/sonar-ws/src/main/java/org/sonarqube/ws/client/issues/BulkChangeRequest.java +++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/issues/BulkChangeRequest.java @@ -36,6 +36,7 @@ public class BulkChangeRequest { private List<String> comment; private String doTransition; private List<String> issues; + private List<String> plan; private String removeTags; private String sendNotifications; private List<String> setSeverity; @@ -113,6 +114,19 @@ public class BulkChangeRequest { } /** + * @deprecated since 5.5 + */ + @Deprecated + public BulkChangeRequest setPlan(List<String> plan) { + this.plan = plan; + return this; + } + + public List<String> getPlan() { + return plan; + } + + /** * Example value: "security,java8" */ public BulkChangeRequest setRemoveTags(String removeTags) { diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/issues/IssuesService.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/issues/IssuesService.java index 5ba7108f346..bd898f434d9 100644 --- a/sonar-ws/src/main/java/org/sonarqube/ws/client/issues/IssuesService.java +++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/issues/IssuesService.java @@ -75,7 +75,8 @@ public class IssuesService extends BaseService { return call( new PostRequest(path("assign")) .setParam("assignee", request.getAssignee()) - .setParam("issue", request.getIssue()), + .setParam("issue", request.getIssue()) + .setParam("me", request.getMe()), AssignResponse.parser()); } @@ -111,6 +112,7 @@ public class IssuesService extends BaseService { .setParam("comment", request.getComment() == null ? null : request.getComment().stream().collect(Collectors.joining(","))) .setParam("do_transition", request.getDoTransition()) .setParam("issues", request.getIssues() == null ? null : request.getIssues().stream().collect(Collectors.joining(","))) + .setParam("plan", request.getPlan() == null ? null : request.getPlan().stream().collect(Collectors.joining(","))) .setParam("remove_tags", request.getRemoveTags()) .setParam("sendNotifications", request.getSendNotifications()) .setParam("set_severity", request.getSetSeverity() == null ? null : request.getSetSeverity().stream().collect(Collectors.joining(","))) @@ -212,7 +214,10 @@ public class IssuesService extends BaseService { .setParam("authors", request.getAuthors() == null ? null : request.getAuthors().stream().collect(Collectors.joining(","))) .setParam("branch", request.getBranch()) .setParam("componentKeys", request.getComponentKeys() == null ? null : request.getComponentKeys().stream().collect(Collectors.joining(","))) + .setParam("componentRootUuids", request.getComponentRootUuids()) + .setParam("componentRoots", request.getComponentRoots()) .setParam("componentUuids", request.getComponentUuids() == null ? null : request.getComponentUuids().stream().collect(Collectors.joining(","))) + .setParam("components", request.getComponents()) .setParam("createdAfter", request.getCreatedAfter()) .setParam("createdAt", request.getCreatedAt()) .setParam("createdBefore", request.getCreatedBefore()) diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/issues/SearchRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/issues/SearchRequest.java index 8d2c4cd012d..08407bcda0e 100644 --- a/sonar-ws/src/main/java/org/sonarqube/ws/client/issues/SearchRequest.java +++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/issues/SearchRequest.java @@ -39,7 +39,10 @@ public class SearchRequest { private List<String> authors; private String branch; private List<String> componentKeys; + private String componentRootUuids; + private String componentRoots; private List<String> componentUuids; + private String components; private String createdAfter; private String createdAt; private String createdBefore; @@ -192,6 +195,32 @@ public class SearchRequest { } /** + * @deprecated since 5.1 + */ + @Deprecated + public SearchRequest setComponentRootUuids(String componentRootUuids) { + this.componentRootUuids = componentRootUuids; + return this; + } + + public String getComponentRootUuids() { + return componentRootUuids; + } + + /** + * @deprecated since 5.1 + */ + @Deprecated + public SearchRequest setComponentRoots(String componentRoots) { + this.componentRoots = componentRoots; + return this; + } + + public String getComponentRoots() { + return componentRoots; + } + + /** * Example value: "584a89f2-8037-4f7b-b82c-8b45d2d63fb2" * @deprecated since 6.5 */ @@ -206,6 +235,19 @@ public class SearchRequest { } /** + * @deprecated since 5.1 + */ + @Deprecated + public SearchRequest setComponents(String components) { + this.components = components; + return this; + } + + public String getComponents() { + return components; + } + + /** * Example value: "2017-10-19 or 2017-10-19T13:00:00+0200" */ public SearchRequest setCreatedAfter(String createdAfter) { diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/profiles/ProfilesService.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/profiles/ProfilesService.java new file mode 100644 index 00000000000..c1b2f9cb5a2 --- /dev/null +++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/profiles/ProfilesService.java @@ -0,0 +1,71 @@ +/* + * 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.profiles; + +import java.util.stream.Collectors; +import javax.annotation.Generated; +import org.sonarqube.ws.MediaTypes; +import org.sonarqube.ws.client.BaseService; +import org.sonarqube.ws.client.GetRequest; +import org.sonarqube.ws.client.PostRequest; +import org.sonarqube.ws.client.WsConnector; + +/** + * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/profiles">Further information about this web service online</a> + */ +@Generated("sonar-ws-generator") +public class ProfilesService extends BaseService { + + public ProfilesService(WsConnector wsConnector) { + super(wsConnector, "api/profiles"); + } + + /** + * + * This is part of the internal API. + * This is a GET request. + * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/profiles/index">Further information about this action online (including a response example)</a> + * @since 3.3 + * @deprecated since 5.2 + */ + @Deprecated + public String index() { + return call( + new GetRequest(path("index")) + .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/profiles/list">Further information about this action online (including a response example)</a> + * @since 3.3 + * @deprecated since 5.2 + */ + @Deprecated + public String list() { + return call( + new GetRequest(path("list")) + .setMediaType(MediaTypes.JSON) + ).content(); + } +} diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/profiles/package-info.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/profiles/package-info.java new file mode 100644 index 00000000000..006b0a0e14c --- /dev/null +++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/profiles/package-info.java @@ -0,0 +1,26 @@ +/* + * 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. + */ +@ParametersAreNonnullByDefault +@Generated("sonar-ws-generator") +package org.sonarqube.ws.client.profiles; + +import javax.annotation.ParametersAreNonnullByDefault; +import javax.annotation.Generated; + diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/resources/ResourcesService.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/resources/ResourcesService.java new file mode 100644 index 00000000000..1fb3839586f --- /dev/null +++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/resources/ResourcesService.java @@ -0,0 +1,53 @@ +/* + * 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.resources; + +import javax.annotation.Generated; +import org.sonarqube.ws.MediaTypes; +import org.sonarqube.ws.client.BaseService; +import org.sonarqube.ws.client.GetRequest; +import org.sonarqube.ws.client.WsConnector; + +/** + * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/resources">Further information about this web service online</a> + */ +@Generated("sonar-ws-generator") +public class ResourcesService extends BaseService { + + public ResourcesService(WsConnector wsConnector) { + super(wsConnector, "api/resources"); + } + + /** + * + * This is part of the internal API. + * This is a GET request. + * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/resources/index">Further information about this action online (including a response example)</a> + * @since 2.10 + * @deprecated since 5.4 + */ + @Deprecated + public String index() { + return call( + new GetRequest(path("index")) + .setMediaType(MediaTypes.JSON) + ).content(); + } +} diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/resources/package-info.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/resources/package-info.java new file mode 100644 index 00000000000..889693352d6 --- /dev/null +++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/resources/package-info.java @@ -0,0 +1,26 @@ +/* + * 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. + */ +@ParametersAreNonnullByDefault +@Generated("sonar-ws-generator") +package org.sonarqube.ws.client.resources; + +import javax.annotation.ParametersAreNonnullByDefault; +import javax.annotation.Generated; + diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/rules/CreateRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/rules/CreateRequest.java index 12ee49ce9f2..4f4258db45f 100644 --- a/sonar-ws/src/main/java/org/sonarqube/ws/client/rules/CreateRequest.java +++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/rules/CreateRequest.java @@ -32,6 +32,7 @@ import javax.annotation.Generated; public class CreateRequest { private String customKey; + private String manualKey; private String markdownDescription; private String name; private List<String> params; @@ -55,6 +56,20 @@ public class CreateRequest { } /** + * Example value: "Error_handling" + * @deprecated since 5.5 + */ + @Deprecated + public CreateRequest setManualKey(String manualKey) { + this.manualKey = manualKey; + return this; + } + + public String getManualKey() { + return manualKey; + } + + /** * This is a mandatory parameter. * Example value: "Description of my custom rule" */ diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/rules/RulesService.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/rules/RulesService.java index 9e0f771a90b..9765e85ed3f 100644 --- a/sonar-ws/src/main/java/org/sonarqube/ws/client/rules/RulesService.java +++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/rules/RulesService.java @@ -68,6 +68,7 @@ public class RulesService extends BaseService { call( new PostRequest(path("create")) .setParam("custom_key", request.getCustomKey()) + .setParam("manual_key", request.getManualKey()) .setParam("markdown_description", request.getMarkdownDescription()) .setParam("name", request.getName()) .setParam("params", request.getParams() == null ? null : request.getParams().stream().collect(Collectors.joining(","))) @@ -203,6 +204,10 @@ public class RulesService extends BaseService { public void update(UpdateRequest request) { call( new PostRequest(path("update")) + .setParam("debt_remediation_fn_offset", request.getDebtRemediationFnOffset()) + .setParam("debt_remediation_fn_type", request.getDebtRemediationFnType()) + .setParam("debt_remediation_fy_coeff", request.getDebtRemediationFyCoeff()) + .setParam("debt_sub_characteristic", request.getDebtSubCharacteristic()) .setParam("key", request.getKey()) .setParam("markdown_description", request.getMarkdownDescription()) .setParam("markdown_note", request.getMarkdownNote()) diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/rules/UpdateRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/rules/UpdateRequest.java index c741af1eacc..bb36c8fbc36 100644 --- a/sonar-ws/src/main/java/org/sonarqube/ws/client/rules/UpdateRequest.java +++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/rules/UpdateRequest.java @@ -31,6 +31,10 @@ import javax.annotation.Generated; @Generated("sonar-ws-generator") public class UpdateRequest { + private String debtRemediationFnOffset; + private String debtRemediationFnType; + private String debtRemediationFyCoeff; + private String debtSubCharacteristic; private String key; private String markdownDescription; private String markdownNote; @@ -45,6 +49,64 @@ public class UpdateRequest { private List<String> tags; /** + * @deprecated since 5.5 + */ + @Deprecated + public UpdateRequest setDebtRemediationFnOffset(String debtRemediationFnOffset) { + this.debtRemediationFnOffset = debtRemediationFnOffset; + return this; + } + + public String getDebtRemediationFnOffset() { + return debtRemediationFnOffset; + } + + /** + * Possible values: + * <ul> + * <li>"LINEAR"</li> + * <li>"LINEAR_OFFSET"</li> + * <li>"CONSTANT_ISSUE"</li> + * </ul> + * @deprecated since 5.5 + */ + @Deprecated + public UpdateRequest setDebtRemediationFnType(String debtRemediationFnType) { + this.debtRemediationFnType = debtRemediationFnType; + return this; + } + + public String getDebtRemediationFnType() { + return debtRemediationFnType; + } + + /** + * @deprecated since 5.5 + */ + @Deprecated + public UpdateRequest setDebtRemediationFyCoeff(String debtRemediationFyCoeff) { + this.debtRemediationFyCoeff = debtRemediationFyCoeff; + return this; + } + + public String getDebtRemediationFyCoeff() { + return debtRemediationFyCoeff; + } + + /** + * @deprecated since 5.5 + */ + @Deprecated + public UpdateRequest setDebtSubCharacteristic(String debtSubCharacteristic) { + this.debtSubCharacteristic = debtSubCharacteristic; + return this; + } + + public String getDebtSubCharacteristic() { + return debtSubCharacteristic; + } + + /** * This is a mandatory parameter. * Example value: "javascript:NullCheck" */ diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/users/SearchRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/users/SearchRequest.java index 3b206b526e2..e3cfead6dae 100644 --- a/sonar-ws/src/main/java/org/sonarqube/ws/client/users/SearchRequest.java +++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/users/SearchRequest.java @@ -31,11 +31,37 @@ import javax.annotation.Generated; @Generated("sonar-ws-generator") public class SearchRequest { + private List<String> f; private String p; private String ps; private String q; /** + * Possible values: + * <ul> + * <li>"name"</li> + * <li>"email"</li> + * <li>"avatart"</li> + * <li>"scmAccounts"</li> + * <li>"groups"</li> + * <li>"active"</li> + * <li>"local"</li> + * <li>"externalIdentity"</li> + * <li>"externalProvider"</li> + * </ul> + * @deprecated since 5.4 + */ + @Deprecated + public SearchRequest setF(List<String> f) { + this.f = f; + return this; + } + + public List<String> getF() { + return f; + } + + /** * Example value: "42" */ public SearchRequest setP(String p) { diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/users/UsersService.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/users/UsersService.java index c96a7aa4930..dcbda8e2c2b 100644 --- a/sonar-ws/src/main/java/org/sonarqube/ws/client/users/UsersService.java +++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/users/UsersService.java @@ -149,6 +149,7 @@ public class UsersService extends BaseService { public SearchWsResponse search(SearchRequest request) { return call( new GetRequest(path("search")) + .setParam("f", request.getF() == null ? null : request.getF().stream().collect(Collectors.joining(","))) .setParam("p", request.getP()) .setParam("ps", request.getPs()) .setParam("q", request.getQ()), |