aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-ws/src/main/java/org/sonarqube
diff options
context:
space:
mode:
authorDaniel Schwarz <daniel.schwarz@sonarsource.com>2017-12-02 16:17:48 +0100
committerDaniel Schwarz <bartfastiel@users.noreply.github.com>2017-12-06 14:40:17 +0100
commit460bb1a793ad325312c5d0644dbd3753d4835207 (patch)
treef28e95fbdc53bdb220dc7e2a3f0f21d06c5ad77a /sonar-ws/src/main/java/org/sonarqube
parent9cba9e0a34bd4b7fa24a7b9c9b8616c0c47273da (diff)
downloadsonarqube-460bb1a793ad325312c5d0644dbd3753d4835207.tar.gz
sonarqube-460bb1a793ad325312c5d0644dbd3753d4835207.zip
Remove legacy sonar-ws code for qualityprofiles
Diffstat (limited to 'sonar-ws/src/main/java/org/sonarqube')
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/DefaultWsClient.java8
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/WsClient.java7
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/qualityprofile/ActivateRuleRequest.java118
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/qualityprofile/AddGroupRequest.java93
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/qualityprofile/AddProjectRequest.java127
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/qualityprofile/AddUserRequest.java93
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/qualityprofile/ChangeParentRequest.java116
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/qualityprofile/ChangelogRequest.java126
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/qualityprofile/CopyRequest.java41
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/qualityprofile/CreateRequest.java87
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/qualityprofile/QualityProfilesService.java269
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/qualityprofile/RemoveGroupRequest.java93
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/qualityprofile/RemoveProjectRequest.java112
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/qualityprofile/RemoveUserRequest.java93
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/qualityprofile/RestoreRequest.java68
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/qualityprofile/SearchGroupsRequest.java127
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/qualityprofile/SearchRequest.java79
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/qualityprofile/SearchUsersRequest.java127
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/qualityprofile/SetDefaultRequest.java33
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/qualityprofile/ShowRequest.java49
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/qualityprofiles/QualityprofilesService.java4
21 files changed, 2 insertions, 1868 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 71d261c2718..3712426dd3a 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
@@ -32,7 +32,6 @@ import org.sonarqube.ws.client.projectanalyses.ProjectAnalysesService;
import org.sonarqube.ws.client.projectbranches.ProjectBranchesService;
import org.sonarqube.ws.client.projectlinks.ProjectLinksService;
import org.sonarqube.ws.client.qualitygates.QualitygatesService;
-import org.sonarqube.ws.client.qualityprofile.QualityProfilesService;
import org.sonarqube.ws.client.qualityprofiles.QualityprofilesService;
import org.sonarqube.ws.client.roots.RootsService;
import org.sonarqube.ws.client.rules.RulesService;
@@ -56,7 +55,6 @@ class DefaultWsClient implements WsClient {
private final PermissionsService permissions;
private final ComponentsService components;
private final FavoritesService favoritesService;
- private final QualityProfilesService qualityProfilesOld;
private final QualityprofilesService qualityprofiles;
private final IssuesService issues;
private final UsersService usersService;
@@ -82,7 +80,6 @@ class DefaultWsClient implements WsClient {
this.permissions = new PermissionsService(wsConnector);
this.components = new ComponentsService(wsConnector);
this.favoritesService = new FavoritesService(wsConnector);
- this.qualityProfilesOld = new QualityProfilesService(wsConnector);
this.qualityprofiles = new QualityprofilesService(wsConnector);
this.issues = new IssuesService(wsConnector);
this.usersService = new UsersService(wsConnector);
@@ -129,11 +126,6 @@ class DefaultWsClient implements WsClient {
}
@Override
- public QualityProfilesService qualityProfilesOld() {
- return qualityProfilesOld;
- }
-
- @Override
public QualityprofilesService qualityProfiles() {
return qualityprofiles;
}
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 75ac3a18e1c..88948a30469 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
@@ -32,7 +32,6 @@ import org.sonarqube.ws.client.projectanalyses.ProjectAnalysesService;
import org.sonarqube.ws.client.projectbranches.ProjectBranchesService;
import org.sonarqube.ws.client.projectlinks.ProjectLinksService;
import org.sonarqube.ws.client.qualitygates.QualitygatesService;
-import org.sonarqube.ws.client.qualityprofile.QualityProfilesService;
import org.sonarqube.ws.client.qualityprofiles.QualityprofilesService;
import org.sonarqube.ws.client.roots.RootsService;
import org.sonarqube.ws.client.rules.RulesService;
@@ -75,12 +74,6 @@ public interface WsClient {
PermissionsService permissions();
- /**
- * @deprecated since 7.0 use {@link #qualityProfiles()} instead
- */
- @Deprecated
- QualityProfilesService qualityProfilesOld();
-
QualityprofilesService qualityProfiles();
UsersService users();
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/qualityprofile/ActivateRuleRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/qualityprofile/ActivateRuleRequest.java
deleted file mode 100644
index 70499d87f41..00000000000
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/qualityprofile/ActivateRuleRequest.java
+++ /dev/null
@@ -1,118 +0,0 @@
-/*
- * SonarQube
- * Copyright (C) 2009-2017 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.qualityprofile;
-
-import java.util.Optional;
-import javax.annotation.Nullable;
-import org.sonarqube.ws.Common.Severity;
-
-import static java.util.Objects.requireNonNull;
-
-public class ActivateRuleRequest {
- private final Optional<String> params;
- private final String key;
- private final Optional<Boolean> reset;
- private final String ruleKey;
- private final Optional<Severity> severity;
- private final Optional<String> organization;
-
- private ActivateRuleRequest(Builder builder) {
- organization = requireNonNull(builder.organization);
- params = requireNonNull(builder.params);
- key = requireNonNull(builder.key);
- reset = requireNonNull(builder.reset);
- ruleKey = requireNonNull(builder.ruleKey);
- severity = requireNonNull(builder.severity);
- }
-
- public static ActivateRuleRequest.Builder builder() {
- return new Builder();
- }
-
- public Optional<String> getParams() {
- return params;
- }
-
- public String getKey() {
- return key;
- }
-
- public Optional<Boolean> getReset() {
- return reset;
- }
-
- public String getRuleKey() {
- return ruleKey;
- }
-
- public Optional<Severity> getSeverity() {
- return severity;
- }
-
- public Optional<String> getOrganization() {
- return organization;
- }
-
- public static class Builder {
- private Optional<String> organization = Optional.empty();
- private Optional<String> params = Optional.empty();
- private String key;
- private Optional<Boolean> reset = Optional.empty();
- private String ruleKey;
- private Optional<Severity> severity = Optional.empty();
-
- private Builder() {
- }
-
- public Builder setOrganization(@Nullable String organization) {
- this.organization = Optional.ofNullable(organization);
- return this;
- }
-
- public Builder setParams(@Nullable String params) {
- this.params = Optional.ofNullable(params);
- return this;
- }
-
- public Builder setKey(String key) {
- this.key = key;
- return this;
- }
-
- public Builder setReset(@Nullable Boolean reset) {
- this.reset = Optional.ofNullable(reset);
- return this;
- }
-
- public Builder setRuleKey(String ruleKey) {
- this.ruleKey = ruleKey;
- return this;
- }
-
- public Builder setSeverity(@Nullable Severity severity) {
- this.severity = Optional.ofNullable(severity);
- return this;
- }
-
- public ActivateRuleRequest build() {
- return new ActivateRuleRequest(this);
- }
- }
-}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/qualityprofile/AddGroupRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/qualityprofile/AddGroupRequest.java
deleted file mode 100644
index 8fe5c8ac94d..00000000000
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/qualityprofile/AddGroupRequest.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/*
- * SonarQube
- * Copyright (C) 2009-2017 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.qualityprofile;
-
-import javax.annotation.concurrent.Immutable;
-
-@Immutable
-public class AddGroupRequest {
-
- private final String organization;
- private final String language;
- private final String qualityProfile;
- private final String group;
-
- private AddGroupRequest(Builder builder) {
- this.language = builder.language;
- this.organization = builder.organization;
- this.qualityProfile = builder.qualityProfile;
- this.group = builder.group;
- }
-
- public String getLanguage() {
- return language;
- }
-
- public String getOrganization() {
- return organization;
- }
-
- public String getQualityProfile() {
- return qualityProfile;
- }
-
- public String getGroup() {
- return group;
- }
-
- public static Builder builder() {
- return new Builder();
- }
-
- public static class Builder {
- private String organization;
- private String qualityProfile;
- private String language;
- private String group;
-
- private Builder() {
- // enforce factory method use
- }
-
- public Builder setLanguage(String language) {
- this.language = language;
- return this;
- }
-
- public Builder setOrganization(String organization) {
- this.organization = organization;
- return this;
- }
-
- public Builder setQualityProfile(String qualityProfile) {
- this.qualityProfile = qualityProfile;
- return this;
- }
-
- public Builder setGroup(String group) {
- this.group = group;
- return this;
- }
-
- public AddGroupRequest build() {
- return new AddGroupRequest(this);
- }
- }
-}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/qualityprofile/AddProjectRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/qualityprofile/AddProjectRequest.java
deleted file mode 100644
index fc852433d5c..00000000000
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/qualityprofile/AddProjectRequest.java
+++ /dev/null
@@ -1,127 +0,0 @@
-/*
- * SonarQube
- * Copyright (C) 2009-2017 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.qualityprofile;
-
-import java.util.Optional;
-import javax.annotation.CheckForNull;
-import javax.annotation.Nullable;
-import javax.annotation.concurrent.Immutable;
-
-import static java.util.Objects.requireNonNull;
-
-@Immutable
-public class AddProjectRequest {
-
- private final String language;
- private final Optional<String> organization;
- private final String qualityProfile;
- private final String key;
- private final String projectKey;
- private final String projectUuid;
-
- private AddProjectRequest(Builder builder) {
- this.language = builder.language;
- this.organization = requireNonNull(builder.organization);
- this.qualityProfile = builder.qualityProfile;
- this.key = builder.key;
- this.projectKey = builder.projectKey;
- this.projectUuid = builder.projectUuid;
- }
-
- @CheckForNull
- public String getLanguage() {
- return language;
- }
-
- public Optional<String> getOrganization() {
- return organization;
- }
-
- @CheckForNull
- public String getQualityProfile() {
- return qualityProfile;
- }
-
- @CheckForNull
- public String getKey() {
- return key;
- }
-
- @CheckForNull
- public String getProjectKey() {
- return projectKey;
- }
-
- @CheckForNull
- public String getProjectUuid() {
- return projectUuid;
- }
-
- public static Builder builder() {
- return new Builder();
- }
-
- public static class Builder {
- private String language;
- private Optional<String> organization = Optional.empty();
- private String qualityProfile;
- private String key;
- private String projectKey;
- private String projectUuid;
-
- private Builder() {
- // enforce factory method use
- }
-
- public Builder setLanguage(@Nullable String language) {
- this.language = language;
- return this;
- }
-
- public Builder setOrganization(@Nullable String organization) {
- this.organization = Optional.ofNullable(organization);
- return this;
- }
-
- public Builder setQualityProfile(@Nullable String qualityProfile) {
- this.qualityProfile = qualityProfile;
- return this;
- }
-
- public Builder setKey(@Nullable String key) {
- this.key = key;
- return this;
- }
-
- public Builder setProjectKey(@Nullable String projectKey) {
- this.projectKey = projectKey;
- return this;
- }
-
- public Builder setProjectUuid(@Nullable String projectUuid) {
- this.projectUuid = projectUuid;
- return this;
- }
-
- public AddProjectRequest build() {
- return new AddProjectRequest(this);
- }
- }
-}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/qualityprofile/AddUserRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/qualityprofile/AddUserRequest.java
deleted file mode 100644
index db89c3d7c40..00000000000
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/qualityprofile/AddUserRequest.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/*
- * SonarQube
- * Copyright (C) 2009-2017 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.qualityprofile;
-
-import javax.annotation.concurrent.Immutable;
-
-@Immutable
-public class AddUserRequest {
-
- private final String organization;
- private final String language;
- private final String qualityProfile;
- private final String userLogin;
-
- private AddUserRequest(Builder builder) {
- this.language = builder.language;
- this.organization = builder.organization;
- this.qualityProfile = builder.qualityProfile;
- this.userLogin = builder.userLogin;
- }
-
- public String getLanguage() {
- return language;
- }
-
- public String getOrganization() {
- return organization;
- }
-
- public String getQualityProfile() {
- return qualityProfile;
- }
-
- public String getUserLogin() {
- return userLogin;
- }
-
- public static Builder builder() {
- return new Builder();
- }
-
- public static class Builder {
- private String organization;
- private String qualityProfile;
- private String language;
- private String userLogin;
-
- private Builder() {
- // enforce factory method use
- }
-
- public Builder setLanguage(String language) {
- this.language = language;
- return this;
- }
-
- public Builder setOrganization(String organization) {
- this.organization = organization;
- return this;
- }
-
- public Builder setQualityProfile(String qualityProfile) {
- this.qualityProfile = qualityProfile;
- return this;
- }
-
- public Builder setUserLogin(String userLogin) {
- this.userLogin = userLogin;
- return this;
- }
-
- public AddUserRequest build() {
- return new AddUserRequest(this);
- }
- }
-}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/qualityprofile/ChangeParentRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/qualityprofile/ChangeParentRequest.java
deleted file mode 100644
index 9b1b6a3ddca..00000000000
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/qualityprofile/ChangeParentRequest.java
+++ /dev/null
@@ -1,116 +0,0 @@
-/*
- * SonarQube
- * Copyright (C) 2009-2017 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.qualityprofile;
-
-import javax.annotation.Nullable;
-
-public class ChangeParentRequest {
- private final String language;
- private final String parentKey;
- private final String parentQualityProfile;
- private final String key;
- private final String qualityProfile;
- private final String organization;
-
- public ChangeParentRequest(Builder builder) {
- this.language = builder.language;
- this.parentKey = builder.parentKey;
- this.parentQualityProfile = builder.parentName;
- this.key = builder.profileKey;
- this.qualityProfile = builder.profileName;
- this.organization = builder.organization;
- }
-
- public String getLanguage() {
- return language;
- }
-
- public String getParentKey() {
- return parentKey;
- }
-
- public String getParentQualityProfile() {
- return parentQualityProfile;
- }
-
- public String getKey() {
- return key;
- }
-
- public String getQualityProfile() {
- return qualityProfile;
- }
-
- public String getOrganization() {
- return organization;
- }
-
- public static Builder builder() {
- return new Builder();
- }
-
- public static class Builder {
- private String language;
- private String parentKey;
- private String parentName;
- private String profileKey;
- private String profileName;
- private String organization;
-
- private Builder() {
- // enforce factory method use
- }
-
- public Builder setLanguage(@Nullable String language) {
- this.language = language;
- return this;
- }
-
- public Builder setProfileName(@Nullable String profileName) {
- this.profileName = profileName;
- return this;
- }
-
- public Builder setProfileKey(@Nullable String profileKey) {
- this.profileKey = profileKey;
- return this;
- }
-
- public Builder setParentKey(@Nullable String parentKey) {
- this.parentKey = parentKey;
- return this;
- }
-
- public Builder setParentName(@Nullable String parentName) {
- this.parentName = parentName;
- return this;
- }
-
- public Builder setOrganization(@Nullable String s) {
- this.organization = s;
- return this;
- }
-
- public ChangeParentRequest build() {
- return new ChangeParentRequest(this);
- }
- }
-}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/qualityprofile/ChangelogRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/qualityprofile/ChangelogRequest.java
deleted file mode 100644
index 5c74416c9bc..00000000000
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/qualityprofile/ChangelogRequest.java
+++ /dev/null
@@ -1,126 +0,0 @@
-/*
- * SonarQube
- * Copyright (C) 2009-2017 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.qualityprofile;
-
-public class ChangelogRequest {
-
- private final String language;
- private final String organization;
- private final Integer p;
- private final Integer ps;
- private final String qualityProfile;
- private final String since;
- private final String to;
-
- private ChangelogRequest(Builder builder) {
- this.language = builder.language;
- this.organization = builder.organization;
- this.p = builder.p;
- this.ps = builder.ps;
- this.qualityProfile = builder.qualityProfile;
- this.since = builder.since;
- this.to = builder.to;
- }
-
- public String getLanguage() {
- return language;
- }
-
- public String getOrganization() {
- return organization;
- }
-
- public Integer getP() {
- return p;
- }
-
- public Integer getPs() {
- return ps;
- }
-
- public String getQualityProfile() {
- return qualityProfile;
- }
-
- public String getSince() {
- return since;
- }
-
- public String getTo() {
- return to;
- }
-
- public static Builder builder() {
- return new Builder();
- }
-
- public static class Builder {
- private String language;
- private String organization;
- private Integer p;
- private Integer ps;
- private String qualityProfile;
- private String since;
- private String to;
-
- private Builder() {
- }
-
- public Builder setLanguage(String language) {
- this.language = language;
- return this;
- }
-
- public Builder setOrganization(String organization) {
- this.organization = organization;
- return this;
- }
-
- public Builder setP(Integer p) {
- this.p = p;
- return this;
- }
-
- public Builder setPs(Integer ps) {
- this.ps = ps;
- return this;
- }
-
- public Builder setQualityProfile(String qualityProfile) {
- this.qualityProfile = qualityProfile;
- return this;
- }
-
- public Builder setSince(String since) {
- this.since = since;
- return this;
- }
-
- public Builder setTo(String to) {
- this.to = to;
- return this;
- }
-
- public ChangelogRequest build() {
- return new ChangelogRequest(this);
- }
- }
-}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/qualityprofile/CopyRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/qualityprofile/CopyRequest.java
deleted file mode 100644
index 39fdb48a3c9..00000000000
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/qualityprofile/CopyRequest.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * SonarQube
- * Copyright (C) 2009-2017 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.qualityprofile;
-
-import static java.util.Objects.requireNonNull;
-
-public class CopyRequest {
- private final String fromKey;
- private final String toName;
-
- public CopyRequest(String fromKey, String toName) {
- this.fromKey = requireNonNull(fromKey);
- this.toName = requireNonNull(toName);
- }
-
- public String getFromKey() {
- return fromKey;
- }
-
- public String getToName() {
- return toName;
- }
-}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/qualityprofile/CreateRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/qualityprofile/CreateRequest.java
deleted file mode 100644
index abf35e1c171..00000000000
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/qualityprofile/CreateRequest.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- * SonarQube
- * Copyright (C) 2009-2017 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.qualityprofile;
-
-import javax.annotation.Nullable;
-import javax.annotation.concurrent.Immutable;
-
-import static com.google.common.base.Preconditions.checkArgument;
-
-@Immutable
-public class CreateRequest {
-
- private final String name;
- private final String language;
- private final String organizationKey;
-
- private CreateRequest(Builder builder) {
- this.name = builder.name;
- this.language = builder.language;
- this.organizationKey = builder.organizationKey;
- }
-
- public String getLanguage() {
- return language;
- }
-
- public String getName() {
- return name;
- }
-
- public String getOrganizationKey() {
- return organizationKey;
- }
-
- public static Builder builder() {
- return new Builder();
- }
-
- public static class Builder {
- private String language;
- private String name;
- private String organizationKey;
-
- private Builder() {
- // enforce factory method use
- }
-
- public Builder setLanguage(@Nullable String language) {
- this.language = language;
- return this;
- }
-
- public Builder setName(@Nullable String profileName) {
- this.name = profileName;
- return this;
- }
-
- public Builder setOrganizationKey(@Nullable String organizationKey) {
- this.organizationKey = organizationKey;
- return this;
- }
-
- public CreateRequest build() {
- checkArgument(language != null && !language.isEmpty(), "Language is mandatory and must not be empty.");
- checkArgument(name != null && !name.isEmpty(), "Profile name is mandatory and must not be empty.");
- checkArgument(organizationKey == null || !organizationKey.isEmpty(), "Organization key may be either null or not empty. Empty organization key is invalid.");
- return new CreateRequest(this);
- }
- }
-}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/qualityprofile/QualityProfilesService.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/qualityprofile/QualityProfilesService.java
deleted file mode 100644
index aa00e4e3b45..00000000000
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/qualityprofile/QualityProfilesService.java
+++ /dev/null
@@ -1,269 +0,0 @@
-/*
- * SonarQube
- * Copyright (C) 2009-2017 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.qualityprofile;
-
-import org.sonarqube.ws.MediaTypes;
-import org.sonarqube.ws.Qualityprofiles;
-import org.sonarqube.ws.Qualityprofiles.CopyWsResponse;
-import org.sonarqube.ws.Qualityprofiles.CreateWsResponse;
-import org.sonarqube.ws.Qualityprofiles.SearchGroupsResponse;
-import org.sonarqube.ws.Qualityprofiles.SearchUsersResponse;
-import org.sonarqube.ws.Qualityprofiles.SearchWsResponse;
-import org.sonarqube.ws.Qualityprofiles.ShowResponse;
-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 static org.sonar.api.server.ws.WebService.Param.PAGE;
-import static org.sonar.api.server.ws.WebService.Param.PAGE_SIZE;
-import static org.sonar.api.server.ws.WebService.Param.SELECTED;
-import static org.sonar.api.server.ws.WebService.Param.TEXT_QUERY;
-import static org.sonarqube.ws.client.qualityprofile.QualityProfileWsParameters.ACTION_ACTIVATE_RULE;
-import static org.sonarqube.ws.client.qualityprofile.QualityProfileWsParameters.ACTION_ADD_GROUP;
-import static org.sonarqube.ws.client.qualityprofile.QualityProfileWsParameters.ACTION_ADD_PROJECT;
-import static org.sonarqube.ws.client.qualityprofile.QualityProfileWsParameters.ACTION_ADD_USER;
-import static org.sonarqube.ws.client.qualityprofile.QualityProfileWsParameters.ACTION_CHANGE_PARENT;
-import static org.sonarqube.ws.client.qualityprofile.QualityProfileWsParameters.ACTION_COPY;
-import static org.sonarqube.ws.client.qualityprofile.QualityProfileWsParameters.ACTION_CREATE;
-import static org.sonarqube.ws.client.qualityprofile.QualityProfileWsParameters.ACTION_DEACTIVATE_RULE;
-import static org.sonarqube.ws.client.qualityprofile.QualityProfileWsParameters.ACTION_DELETE;
-import static org.sonarqube.ws.client.qualityprofile.QualityProfileWsParameters.ACTION_REMOVE_GROUP;
-import static org.sonarqube.ws.client.qualityprofile.QualityProfileWsParameters.ACTION_REMOVE_PROJECT;
-import static org.sonarqube.ws.client.qualityprofile.QualityProfileWsParameters.ACTION_REMOVE_USER;
-import static org.sonarqube.ws.client.qualityprofile.QualityProfileWsParameters.ACTION_RESTORE;
-import static org.sonarqube.ws.client.qualityprofile.QualityProfileWsParameters.ACTION_SEARCH;
-import static org.sonarqube.ws.client.qualityprofile.QualityProfileWsParameters.ACTION_SEARCH_GROUPS;
-import static org.sonarqube.ws.client.qualityprofile.QualityProfileWsParameters.ACTION_SEARCH_USERS;
-import static org.sonarqube.ws.client.qualityprofile.QualityProfileWsParameters.ACTION_SET_DEFAULT;
-import static org.sonarqube.ws.client.qualityprofile.QualityProfileWsParameters.ACTION_SHOW;
-import static org.sonarqube.ws.client.qualityprofile.QualityProfileWsParameters.CONTROLLER_QUALITY_PROFILES;
-import static org.sonarqube.ws.client.qualityprofile.QualityProfileWsParameters.PARAM_COMPARE_TO_SONAR_WAY;
-import static org.sonarqube.ws.client.qualityprofile.QualityProfileWsParameters.PARAM_DEFAULTS;
-import static org.sonarqube.ws.client.qualityprofile.QualityProfileWsParameters.PARAM_FROM_KEY;
-import static org.sonarqube.ws.client.qualityprofile.QualityProfileWsParameters.PARAM_GROUP;
-import static org.sonarqube.ws.client.qualityprofile.QualityProfileWsParameters.PARAM_KEY;
-import static org.sonarqube.ws.client.qualityprofile.QualityProfileWsParameters.PARAM_LANGUAGE;
-import static org.sonarqube.ws.client.qualityprofile.QualityProfileWsParameters.PARAM_LOGIN;
-import static org.sonarqube.ws.client.qualityprofile.QualityProfileWsParameters.PARAM_NAME;
-import static org.sonarqube.ws.client.qualityprofile.QualityProfileWsParameters.PARAM_ORGANIZATION;
-import static org.sonarqube.ws.client.qualityprofile.QualityProfileWsParameters.PARAM_PARAMS;
-import static org.sonarqube.ws.client.qualityprofile.QualityProfileWsParameters.PARAM_PARENT_KEY;
-import static org.sonarqube.ws.client.qualityprofile.QualityProfileWsParameters.PARAM_PARENT_QUALITY_PROFILE;
-import static org.sonarqube.ws.client.qualityprofile.QualityProfileWsParameters.PARAM_PROJECT_KEY;
-import static org.sonarqube.ws.client.qualityprofile.QualityProfileWsParameters.PARAM_PROJECT_UUID;
-import static org.sonarqube.ws.client.qualityprofile.QualityProfileWsParameters.PARAM_QUALITY_PROFILE;
-import static org.sonarqube.ws.client.qualityprofile.QualityProfileWsParameters.PARAM_RESET;
-import static org.sonarqube.ws.client.qualityprofile.QualityProfileWsParameters.PARAM_RULE;
-import static org.sonarqube.ws.client.qualityprofile.QualityProfileWsParameters.PARAM_SEVERITY;
-import static org.sonarqube.ws.client.qualityprofile.QualityProfileWsParameters.PARAM_TO_NAME;
-import static org.sonarqube.ws.client.qualityprofile.QualityProfileWsParameters.RestoreActionParameters.PARAM_BACKUP;
-
-/**
- * @deprecated since 7.0, use {@link org.sonarqube.ws.client.qualityprofiles.QualityprofilesService} instead
- */
-@Deprecated
-public class QualityProfilesService extends BaseService {
-
- public QualityProfilesService(WsConnector wsConnector) {
- super(wsConnector, CONTROLLER_QUALITY_PROFILES);
- }
-
- public void activateRule(ActivateRuleRequest request) {
- PostRequest httpRequest = new PostRequest(path(ACTION_ACTIVATE_RULE));
- httpRequest.setParam(PARAM_ORGANIZATION, request.getOrganization().orElse(null));
- httpRequest.setParam(PARAM_PARAMS, request.getParams().orElse(null));
- httpRequest.setParam(PARAM_KEY, request.getKey());
- httpRequest.setParam(PARAM_RESET, request.getReset().orElse(null));
- httpRequest.setParam(PARAM_RULE, request.getRuleKey());
- httpRequest.setParam(PARAM_SEVERITY, request.getSeverity().map(Enum::name).orElse(null));
- call(httpRequest);
- }
-
- public void deactivateRule(String profileKey, String ruleKey) {
- PostRequest httpRequest = new PostRequest(path(ACTION_DEACTIVATE_RULE));
- httpRequest.setParam(PARAM_KEY, profileKey);
- httpRequest.setParam(PARAM_RULE, ruleKey);
- call(httpRequest);
- }
-
- public void restoreProfile(RestoreRequest request) {
- PostRequest httpRequest = new PostRequest(path(ACTION_RESTORE));
- httpRequest.setParam(PARAM_ORGANIZATION, request.getOrganization().orElse(null));
- httpRequest.setPart(PARAM_BACKUP, new PostRequest.Part(MediaTypes.XML, request.getBackup()));
- call(httpRequest);
- }
-
- public SearchWsResponse search(SearchRequest request) {
- return call(
- new GetRequest(path(ACTION_SEARCH))
- .setParam(PARAM_DEFAULTS, request.getDefaults())
- .setParam(PARAM_LANGUAGE, request.getLanguage())
- .setParam(PARAM_QUALITY_PROFILE, request.getQualityProfile())
- .setParam(PARAM_PROJECT_KEY, request.getProjectKey())
- .setParam(PARAM_ORGANIZATION, request.getOrganizationKey()),
- SearchWsResponse.parser());
- }
-
- public Qualityprofiles.ShowResponse show(ShowRequest request) {
- return call(
- new GetRequest(path(ACTION_SHOW))
- .setParam(PARAM_KEY, request.getKey())
- .setParam(PARAM_COMPARE_TO_SONAR_WAY, request.getCompareToSonarWay()),
- ShowResponse.parser());
- }
-
- public void addProject(AddProjectRequest request) {
- call(new PostRequest(path(ACTION_ADD_PROJECT))
- .setParam(PARAM_LANGUAGE, request.getLanguage())
- .setParam(PARAM_ORGANIZATION, request.getOrganization().orElse(null))
- .setParam(PARAM_QUALITY_PROFILE, request.getQualityProfile())
- .setParam(QualityProfileWsParameters.PARAM_KEY, request.getKey())
- .setParam(PARAM_PROJECT_KEY, request.getProjectKey())
- .setParam(PARAM_PROJECT_UUID, request.getProjectUuid()));
- }
-
- public void removeProject(RemoveProjectRequest request) {
- call(new PostRequest(path(ACTION_REMOVE_PROJECT))
- .setParam(PARAM_LANGUAGE, request.getLanguage())
- .setParam(PARAM_QUALITY_PROFILE, request.getQualityProfile())
- .setParam(QualityProfileWsParameters.PARAM_KEY, request.getKey())
- .setParam(PARAM_PROJECT_KEY, request.getProjectKey())
- .setParam(PARAM_PROJECT_UUID, request.getProjectUuid()));
- }
-
- public CreateWsResponse create(CreateRequest request) {
- PostRequest postRequest = new PostRequest(path(ACTION_CREATE))
- .setParam(PARAM_ORGANIZATION, request.getOrganizationKey())
- .setParam(PARAM_LANGUAGE, request.getLanguage())
- .setParam(PARAM_NAME, request.getName());
- return call(postRequest, CreateWsResponse.parser());
- }
-
- public CopyWsResponse copy(CopyRequest request) {
- PostRequest postRequest = new PostRequest(path(ACTION_COPY))
- .setParam(PARAM_FROM_KEY, request.getFromKey())
- .setParam(PARAM_TO_NAME, request.getToName());
-
- return call(postRequest, CopyWsResponse.parser());
- }
-
- public void changeParent(ChangeParentRequest request) {
- call(new PostRequest(path(ACTION_CHANGE_PARENT))
- .setParam(PARAM_LANGUAGE, request.getLanguage())
- .setParam(PARAM_PARENT_KEY, request.getParentKey())
- .setParam(PARAM_PARENT_QUALITY_PROFILE, request.getParentQualityProfile())
- .setParam(PARAM_KEY, request.getKey())
- .setParam(PARAM_QUALITY_PROFILE, request.getQualityProfile())
- .setParam(PARAM_ORGANIZATION, request.getOrganization()));
- }
-
- public void setDefault(SetDefaultRequest request) {
- PostRequest postRequest = new PostRequest(path(ACTION_SET_DEFAULT))
- .setParam(QualityProfileWsParameters.PARAM_KEY, request.getKey());
-
- call(postRequest);
- }
-
- public void delete(String profileKey) {
- PostRequest postRequest = new PostRequest(path(ACTION_DELETE))
- .setParam(QualityProfileWsParameters.PARAM_KEY, profileKey);
-
- call(postRequest);
- }
-
- public void addUser(AddUserRequest request) {
- call(new PostRequest(path(ACTION_ADD_USER))
- .setParam(PARAM_ORGANIZATION, request.getOrganization())
- .setParam(PARAM_QUALITY_PROFILE, request.getQualityProfile())
- .setParam(PARAM_LANGUAGE, request.getLanguage())
- .setParam(PARAM_LOGIN, request.getUserLogin()));
- }
-
- public void removeUser(RemoveUserRequest request) {
- call(new PostRequest(path(ACTION_REMOVE_USER))
- .setParam(PARAM_ORGANIZATION, request.getOrganization())
- .setParam(PARAM_QUALITY_PROFILE, request.getQualityProfile())
- .setParam(PARAM_LANGUAGE, request.getLanguage())
- .setParam(PARAM_LOGIN, request.getUserLogin()));
- }
-
- public SearchUsersResponse searchUsers(SearchUsersRequest request) {
- return call(
- new GetRequest(path(ACTION_SEARCH_USERS))
- .setParam(PARAM_ORGANIZATION, request.getOrganization())
- .setParam(PARAM_QUALITY_PROFILE, request.getQualityProfile())
- .setParam(PARAM_LANGUAGE, request.getLanguage())
- .setParam(TEXT_QUERY, request.getQuery())
- .setParam(SELECTED, request.getSelected())
- .setParam(PAGE, request.getPage())
- .setParam(PAGE_SIZE, request.getPageSize()),
- SearchUsersResponse.parser());
- }
-
- public void addGroup(AddGroupRequest request) {
- call(new PostRequest(path(ACTION_ADD_GROUP))
- .setParam(PARAM_ORGANIZATION, request.getOrganization())
- .setParam(PARAM_QUALITY_PROFILE, request.getQualityProfile())
- .setParam(PARAM_LANGUAGE, request.getLanguage())
- .setParam(PARAM_GROUP, request.getGroup()));
- }
-
- public void removeGroup(RemoveGroupRequest request) {
- call(new PostRequest(path(ACTION_REMOVE_GROUP))
- .setParam(PARAM_ORGANIZATION, request.getOrganization())
- .setParam(PARAM_QUALITY_PROFILE, request.getQualityProfile())
- .setParam(PARAM_LANGUAGE, request.getLanguage())
- .setParam(PARAM_GROUP, request.getGroup()));
- }
-
- public SearchGroupsResponse searchGroups(SearchGroupsRequest request) {
- return call(
- new GetRequest(path(ACTION_SEARCH_GROUPS))
- .setParam(PARAM_ORGANIZATION, request.getOrganization())
- .setParam(PARAM_QUALITY_PROFILE, request.getQualityProfile())
- .setParam(PARAM_LANGUAGE, request.getLanguage())
- .setParam(TEXT_QUERY, request.getQuery())
- .setParam(SELECTED, request.getSelected())
- .setParam(PAGE, request.getPage())
- .setParam(PAGE_SIZE, request.getPageSize()),
- SearchGroupsResponse.parser());
- }
-
- public String changelog(ChangelogRequest request) {
- PostRequest postRequest = new PostRequest(path("changelog"))
- .setParam("language", request.getLanguage())
- .setParam("organization", request.getOrganization())
- .setParam("qualityProfile", request.getQualityProfile());
- if (request.getP() != null) {
- postRequest.setParam("p", request.getP());
- }
- if (request.getPs() != null) {
- postRequest.setParam("ps", request.getPs());
- }
- if (request.getSince() != null) {
- postRequest.setParam("since", request.getSince());
- }
- if (request.getTo() != null) {
- postRequest.setParam("to", request.getTo());
- }
- return call(postRequest).content();
- }
-}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/qualityprofile/RemoveGroupRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/qualityprofile/RemoveGroupRequest.java
deleted file mode 100644
index 6bd43b8257b..00000000000
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/qualityprofile/RemoveGroupRequest.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/*
- * SonarQube
- * Copyright (C) 2009-2017 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.qualityprofile;
-
-import javax.annotation.concurrent.Immutable;
-
-@Immutable
-public class RemoveGroupRequest {
-
- private final String organization;
- private final String language;
- private final String qualityProfile;
- private final String group;
-
- private RemoveGroupRequest(Builder builder) {
- this.language = builder.language;
- this.organization = builder.organization;
- this.qualityProfile = builder.qualityProfile;
- this.group = builder.group;
- }
-
- public String getLanguage() {
- return language;
- }
-
- public String getOrganization() {
- return organization;
- }
-
- public String getQualityProfile() {
- return qualityProfile;
- }
-
- public String getGroup() {
- return group;
- }
-
- public static Builder builder() {
- return new Builder();
- }
-
- public static class Builder {
- private String organization;
- private String qualityProfile;
- private String language;
- private String group;
-
- private Builder() {
- // enforce factory method use
- }
-
- public Builder setLanguage(String language) {
- this.language = language;
- return this;
- }
-
- public Builder setOrganization(String organization) {
- this.organization = organization;
- return this;
- }
-
- public Builder setQualityProfile(String qualityProfile) {
- this.qualityProfile = qualityProfile;
- return this;
- }
-
- public Builder setGroup(String group) {
- this.group = group;
- return this;
- }
-
- public RemoveGroupRequest build() {
- return new RemoveGroupRequest(this);
- }
- }
-}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/qualityprofile/RemoveProjectRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/qualityprofile/RemoveProjectRequest.java
deleted file mode 100644
index ccc35577b4b..00000000000
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/qualityprofile/RemoveProjectRequest.java
+++ /dev/null
@@ -1,112 +0,0 @@
-/*
- * SonarQube
- * Copyright (C) 2009-2017 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.qualityprofile;
-
-import javax.annotation.CheckForNull;
-import javax.annotation.Nullable;
-import javax.annotation.concurrent.Immutable;
-
-@Immutable
-public class RemoveProjectRequest {
-
- private final String language;
- private final String qualityProfile;
- private final String key;
- private final String projectKey;
- private final String projectUuid;
-
- private RemoveProjectRequest(Builder builder) {
- this.language = builder.language;
- this.qualityProfile = builder.qualityProfile;
- this.key = builder.key;
- this.projectKey = builder.projectKey;
- this.projectUuid = builder.projectUuid;
- }
-
- @CheckForNull
- public String getLanguage() {
- return language;
- }
-
- @CheckForNull
- public String getQualityProfile() {
- return qualityProfile;
- }
-
- @CheckForNull
- public String getKey() {
- return key;
- }
-
- @CheckForNull
- public String getProjectKey() {
- return projectKey;
- }
-
- @CheckForNull
- public String getProjectUuid() {
- return projectUuid;
- }
-
- public static Builder builder() {
- return new Builder();
- }
-
- public static class Builder {
- private String language;
- private String qualityProfile;
- private String key;
- private String projectKey;
- private String projectUuid;
-
- private Builder() {
- // enforce factory method use
- }
-
- public Builder setLanguage(@Nullable String language) {
- this.language = language;
- return this;
- }
-
- public Builder setQualityProfile(@Nullable String qualityProfile) {
- this.qualityProfile = qualityProfile;
- return this;
- }
-
- public Builder setKey(@Nullable String key) {
- this.key = key;
- return this;
- }
-
- public Builder setProjectKey(@Nullable String projectKey) {
- this.projectKey = projectKey;
- return this;
- }
-
- public Builder setProjectUuid(@Nullable String projectUuid) {
- this.projectUuid = projectUuid;
- return this;
- }
-
- public RemoveProjectRequest build() {
- return new RemoveProjectRequest(this);
- }
- }
-}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/qualityprofile/RemoveUserRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/qualityprofile/RemoveUserRequest.java
deleted file mode 100644
index 609ac00d562..00000000000
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/qualityprofile/RemoveUserRequest.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/*
- * SonarQube
- * Copyright (C) 2009-2017 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.qualityprofile;
-
-import javax.annotation.concurrent.Immutable;
-
-@Immutable
-public class RemoveUserRequest {
-
- private final String organization;
- private final String language;
- private final String qualityProfile;
- private final String userLogin;
-
- private RemoveUserRequest(Builder builder) {
- this.language = builder.language;
- this.organization = builder.organization;
- this.qualityProfile = builder.qualityProfile;
- this.userLogin = builder.userLogin;
- }
-
- public String getLanguage() {
- return language;
- }
-
- public String getOrganization() {
- return organization;
- }
-
- public String getQualityProfile() {
- return qualityProfile;
- }
-
- public String getUserLogin() {
- return userLogin;
- }
-
- public static Builder builder() {
- return new Builder();
- }
-
- public static class Builder {
- private String organization;
- private String qualityProfile;
- private String language;
- private String userLogin;
-
- private Builder() {
- // enforce factory method use
- }
-
- public Builder setLanguage(String language) {
- this.language = language;
- return this;
- }
-
- public Builder setOrganization(String organization) {
- this.organization = organization;
- return this;
- }
-
- public Builder setQualityProfile(String qualityProfile) {
- this.qualityProfile = qualityProfile;
- return this;
- }
-
- public Builder setUserLogin(String userLogin) {
- this.userLogin = userLogin;
- return this;
- }
-
- public RemoveUserRequest build() {
- return new RemoveUserRequest(this);
- }
- }
-}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/qualityprofile/RestoreRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/qualityprofile/RestoreRequest.java
deleted file mode 100644
index c4cbdaec421..00000000000
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/qualityprofile/RestoreRequest.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * SonarQube
- * Copyright (C) 2009-2017 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.qualityprofile;
-
-import java.io.File;
-import java.util.Optional;
-import javax.annotation.Nullable;
-
-import static java.util.Objects.requireNonNull;
-
-public class RestoreRequest {
-
- private final File backup;
- private final Optional<String> organization;
-
- private RestoreRequest(Builder builder) {
- backup = requireNonNull(builder.backup);
- organization = requireNonNull(builder.organization);
- }
-
- public File getBackup() {
- return backup;
- }
-
- public Optional<String> getOrganization() {
- return organization;
- }
-
- public static Builder builder() {
- return new Builder();
- }
-
- public static class Builder {
- private File backup;
- private Optional<String> organization = Optional.empty();
-
- public Builder setBackup(File backup) {
- this.backup = backup;
- return this;
- }
-
- public Builder setOrganization(@Nullable String organization) {
- this.organization = Optional.ofNullable(organization);
- return this;
- }
-
- public RestoreRequest build() {
- return new RestoreRequest(this);
- }
- }
-}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/qualityprofile/SearchGroupsRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/qualityprofile/SearchGroupsRequest.java
deleted file mode 100644
index bf515ef724b..00000000000
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/qualityprofile/SearchGroupsRequest.java
+++ /dev/null
@@ -1,127 +0,0 @@
-/*
- * SonarQube
- * Copyright (C) 2009-2017 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.qualityprofile;
-
-import javax.annotation.CheckForNull;
-import javax.annotation.Nullable;
-
-public class SearchGroupsRequest {
-
- private String organization;
- private String qualityProfile;
- private String language;
- private String selected;
- private String query;
- private Integer page;
- private Integer pageSize;
-
- private SearchGroupsRequest(Builder builder) {
- this.organization = builder.organization;
- this.qualityProfile = builder.qualityProfile;
- this.language = builder.language;
- this.selected = builder.selected;
- this.query = builder.query;
- this.page = builder.page;
- this.pageSize = builder.pageSize;
- }
-
- @CheckForNull
- public String getOrganization() {
- return organization;
- }
-
- public String getQualityProfile() {
- return qualityProfile;
- }
-
- public String getLanguage() {
- return language;
- }
-
- @CheckForNull
- public String getQuery() {
- return query;
- }
-
- public String getSelected() {
- return selected;
- }
-
- public Integer getPage() {
- return page;
- }
-
- public Integer getPageSize() {
- return pageSize;
- }
-
- public static Builder builder() {
- return new Builder();
- }
-
- public static class Builder {
- private String organization;
- private String qualityProfile;
- private String language;
- private String selected;
- private String query;
- private Integer page;
- private Integer pageSize;
-
- public Builder setOrganization(@Nullable String organization) {
- this.organization = organization;
- return this;
- }
-
- public Builder setQualityProfile(String qualityProfile) {
- this.qualityProfile = qualityProfile;
- return this;
- }
-
- public Builder setLanguage(String language) {
- this.language = language;
- return this;
- }
-
- public Builder setSelected(String selected) {
- this.selected = selected;
- return this;
- }
-
- public Builder setQuery(@Nullable String query) {
- this.query = query;
- return this;
- }
-
- public Builder setPage(Integer page) {
- this.page = page;
- return this;
- }
-
- public Builder setPageSize(Integer pageSize) {
- this.pageSize = pageSize;
- return this;
- }
-
- public SearchGroupsRequest build() {
- return new SearchGroupsRequest(this);
- }
- }
-}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/qualityprofile/SearchRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/qualityprofile/SearchRequest.java
deleted file mode 100644
index 1df9c059e6a..00000000000
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/qualityprofile/SearchRequest.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * SonarQube
- * Copyright (C) 2009-2017 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.qualityprofile;
-
-import javax.annotation.CheckForNull;
-import javax.annotation.Nullable;
-
-public class SearchRequest {
- private String organizationKey;
- private boolean defaults;
- private String language;
- private String qualityProfile;
- private String projectKey;
-
- public String getOrganizationKey() {
- return organizationKey;
- }
-
- public SearchRequest setOrganizationKey(String organizationKey) {
- this.organizationKey = organizationKey;
- return this;
- }
-
- public boolean getDefaults() {
- return defaults;
- }
-
- public SearchRequest setDefaults(boolean defaults) {
- this.defaults = defaults;
- return this;
- }
-
- @CheckForNull
- public String getLanguage() {
- return language;
- }
-
- public SearchRequest setLanguage(@Nullable String language) {
- this.language = language;
- return this;
- }
-
- @CheckForNull
- public String getQualityProfile() {
- return qualityProfile;
- }
-
- public SearchRequest setQualityProfile(@Nullable String qualityProfile) {
- this.qualityProfile = qualityProfile;
- return this;
- }
-
- @CheckForNull
- public String getProjectKey() {
- return projectKey;
- }
-
- public SearchRequest setProjectKey(@Nullable String projectKey) {
- this.projectKey = projectKey;
- return this;
- }
-}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/qualityprofile/SearchUsersRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/qualityprofile/SearchUsersRequest.java
deleted file mode 100644
index 247efbdb20c..00000000000
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/qualityprofile/SearchUsersRequest.java
+++ /dev/null
@@ -1,127 +0,0 @@
-/*
- * SonarQube
- * Copyright (C) 2009-2017 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.qualityprofile;
-
-import javax.annotation.CheckForNull;
-import javax.annotation.Nullable;
-
-public class SearchUsersRequest {
-
- private String organization;
- private String qualityProfile;
- private String language;
- private String selected;
- private String query;
- private Integer page;
- private Integer pageSize;
-
- private SearchUsersRequest(Builder builder) {
- this.organization = builder.organization;
- this.qualityProfile = builder.qualityProfile;
- this.language = builder.language;
- this.selected = builder.selected;
- this.query = builder.query;
- this.page = builder.page;
- this.pageSize = builder.pageSize;
- }
-
- @CheckForNull
- public String getOrganization() {
- return organization;
- }
-
- public String getQualityProfile() {
- return qualityProfile;
- }
-
- public String getLanguage() {
- return language;
- }
-
- @CheckForNull
- public String getQuery() {
- return query;
- }
-
- public String getSelected() {
- return selected;
- }
-
- public Integer getPage() {
- return page;
- }
-
- public Integer getPageSize() {
- return pageSize;
- }
-
- public static Builder builder() {
- return new Builder();
- }
-
- public static class Builder {
- private String organization;
- private String qualityProfile;
- private String language;
- private String selected;
- private String query;
- private Integer page;
- private Integer pageSize;
-
- public Builder setOrganization(@Nullable String organization) {
- this.organization = organization;
- return this;
- }
-
- public Builder setQualityProfile(String qualityProfile) {
- this.qualityProfile = qualityProfile;
- return this;
- }
-
- public Builder setLanguage(String language) {
- this.language = language;
- return this;
- }
-
- public Builder setSelected(String selected) {
- this.selected = selected;
- return this;
- }
-
- public Builder setQuery(@Nullable String query) {
- this.query = query;
- return this;
- }
-
- public Builder setPage(Integer page) {
- this.page = page;
- return this;
- }
-
- public Builder setPageSize(Integer pageSize) {
- this.pageSize = pageSize;
- return this;
- }
-
- public SearchUsersRequest build() {
- return new SearchUsersRequest(this);
- }
- }
-}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/qualityprofile/SetDefaultRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/qualityprofile/SetDefaultRequest.java
deleted file mode 100644
index 57a7bd419bb..00000000000
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/qualityprofile/SetDefaultRequest.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * SonarQube
- * Copyright (C) 2009-2017 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.qualityprofile;
-
-public class SetDefaultRequest {
- private final String key;
-
- public SetDefaultRequest(String key) {
- this.key = key;
- }
-
- public String getKey() {
- return key;
- }
-}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/qualityprofile/ShowRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/qualityprofile/ShowRequest.java
deleted file mode 100644
index 0e267e65e16..00000000000
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/qualityprofile/ShowRequest.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * SonarQube
- * Copyright (C) 2009-2017 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.qualityprofile;
-
-import javax.annotation.CheckForNull;
-import javax.annotation.Nullable;
-
-public class ShowRequest {
- private String key;
- private Boolean compareToSonarWay;
-
- @CheckForNull
- public String getKey() {
- return key;
- }
-
- public ShowRequest setKey(@Nullable String key) {
- this.key = key;
- return this;
- }
-
- @CheckForNull
- public Boolean getCompareToSonarWay() {
- return compareToSonarWay;
- }
-
- public ShowRequest setCompareToSonarWay(@Nullable Boolean compareToSonarWay) {
- this.compareToSonarWay = compareToSonarWay;
- return this;
- }
-}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/qualityprofiles/QualityprofilesService.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/qualityprofiles/QualityprofilesService.java
index 31694161a17..b91e6ce4b2a 100644
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/qualityprofiles/QualityprofilesService.java
+++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/qualityprofiles/QualityprofilesService.java
@@ -237,8 +237,8 @@ public class QualityprofilesService extends BaseService {
* @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/qualityprofiles/copy">Further information about this action online (including a response example)</a>
* @since 5.2
*/
- public void copy(CopyRequest request) {
- call(
+ public CopyWsResponse copy(CopyRequest request) {
+ return call(
new PostRequest(path("copy"))
.setParam("fromKey", request.getFromKey())
.setParam("toName", request.getToName()),