aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-ws/src/main
diff options
context:
space:
mode:
authorDaniel Schwarz <daniel.schwarz@sonarsource.com>2017-11-14 10:42:32 +0100
committerSimon Brandhof <simon.brandhof@sonarsource.com>2017-11-16 17:37:18 +0100
commitbff9cf373e2ecbe66344d58c3423b873f1fb17c5 (patch)
tree1aab779cba6f12fb3ea423d80aab3d65f68ef420 /sonar-ws/src/main
parenta7d7fa94bf725af62447f4d42fc8a923bba77ff9 (diff)
downloadsonarqube-bff9cf373e2ecbe66344d58c3423b873f1fb17c5.tar.gz
sonarqube-bff9cf373e2ecbe66344d58c3423b873f1fb17c5.zip
Auto-generate sonar-ws for integration tests
Diffstat (limited to 'sonar-ws/src/main')
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/MediaTypes.java85
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/BaseRequest.java211
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/BaseResponse.java50
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/BaseService.java73
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/DefaultWsClient.java24
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/GetRequest.java34
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/Headers.java36
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/HttpException.java52
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/Parameters.java36
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/PostRequest.java69
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/WsClient.java12
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/WsConnector.java40
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/WsRequest.java51
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/WsResponse.java65
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/ce/ActivityStatusWsRequest.java72
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/ce/ActivityWsRequest.java126
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/ce/CeService.java107
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/ce/TaskWsRequest.java86
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/component/ComponentsService.java8
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/measure/MeasuresService.java8
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/permission/PermissionsService.java18
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/project/ProjectsService.java6
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/projectbranches/ProjectBranchesServiceOld.java (renamed from sonar-ws/src/main/java/org/sonarqube/ws/client/projectbranches/ProjectBranchesService.java)8
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/projectbranches/package-info.java1
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/projectlinks/ProjectLinksService.java4
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/qualitygate/CreateConditionRequest.java128
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/qualitygate/ProjectStatusWsRequest.java59
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/qualitygate/QualityGatesService.java97
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/qualitygate/SelectWsRequest.java57
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/qualitygate/UpdateConditionRequest.java127
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/qualityprofile/QualityProfilesService.java16
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/root/RootsService.java6
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/system/SystemServiceOld.java (renamed from sonar-ws/src/main/java/org/sonarqube/ws/client/system/SystemService.java)14
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/user/UsersService.java8
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/usergroup/UserGroupsService.java6
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/usertoken/UserTokensService.java4
-rw-r--r--sonar-ws/src/main/protobuf/ws-batch.proto47
-rw-r--r--sonar-ws/src/main/protobuf/ws-ce.proto103
-rw-r--r--sonar-ws/src/main/protobuf/ws-commons.proto124
-rw-r--r--sonar-ws/src/main/protobuf/ws-components.proto130
-rw-r--r--sonar-ws/src/main/protobuf/ws-duplications.proto55
-rw-r--r--sonar-ws/src/main/protobuf/ws-editions.proto60
-rw-r--r--sonar-ws/src/main/protobuf/ws-favorites.proto40
-rw-r--r--sonar-ws/src/main/protobuf/ws-issues.proto232
-rw-r--r--sonar-ws/src/main/protobuf/ws-measures.proto110
-rw-r--r--sonar-ws/src/main/protobuf/ws-notifications.proto41
-rw-r--r--sonar-ws/src/main/protobuf/ws-organizations.proto70
-rw-r--r--sonar-ws/src/main/protobuf/ws-permissions.proto138
-rw-r--r--sonar-ws/src/main/protobuf/ws-project_tags.proto30
-rw-r--r--sonar-ws/src/main/protobuf/ws-projectanalyses.proto57
-rw-r--r--sonar-ws/src/main/protobuf/ws-projectbranches.proto60
-rw-r--r--sonar-ws/src/main/protobuf/ws-projectlink.proto23
-rw-r--r--sonar-ws/src/main/protobuf/ws-projects.proto86
-rw-r--r--sonar-ws/src/main/protobuf/ws-qualitygates.proto122
-rw-r--r--sonar-ws/src/main/protobuf/ws-qualityprofiles.proto169
-rw-r--r--sonar-ws/src/main/protobuf/ws-root.proto36
-rw-r--r--sonar-ws/src/main/protobuf/ws-rules.proto177
-rw-r--r--sonar-ws/src/main/protobuf/ws-settings.proto119
-rw-r--r--sonar-ws/src/main/protobuf/ws-system.proto77
-rw-r--r--sonar-ws/src/main/protobuf/ws-tests.proto68
-rw-r--r--sonar-ws/src/main/protobuf/ws-user_groups.proto52
-rw-r--r--sonar-ws/src/main/protobuf/ws-user_tokens.proto43
-rw-r--r--sonar-ws/src/main/protobuf/ws-users.proto116
-rw-r--r--sonar-ws/src/main/protobuf/ws-webhooks.proto49
64 files changed, 72 insertions, 4166 deletions
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/MediaTypes.java b/sonar-ws/src/main/java/org/sonarqube/ws/MediaTypes.java
deleted file mode 100644
index 08783ca593e..00000000000
--- a/sonar-ws/src/main/java/org/sonarqube/ws/MediaTypes.java
+++ /dev/null
@@ -1,85 +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;
-
-import com.google.common.base.Strings;
-import com.google.common.collect.ImmutableMap;
-import java.util.Locale;
-import java.util.Map;
-import org.apache.commons.io.FilenameUtils;
-
-/**
- * @since 5.3
- */
-public final class MediaTypes {
-
- public static final String JSON = "application/json";
- public static final String XML = "application/xml";
- public static final String TXT = "text/plain";
- public static final String PROTOBUF = "application/x-protobuf";
- public static final String ZIP = "application/zip";
- public static final String JAVASCRIPT = "application/javascript";
- public static final String HTML = "text/html";
- public static final String DEFAULT = "application/octet-stream";
-
- private static final Map<String, String> MAP = new ImmutableMap.Builder<String, String>()
- .put("js", JAVASCRIPT)
- .put("json", JSON)
- .put("zip", "application/zip")
- .put("tgz", "application/tgz")
- .put("ps", "application/postscript")
- .put("jnlp", "application/jnlp")
- .put("jar", "application/java-archive")
- .put("xls", "application/vnd.ms-excel")
- .put("ppt", "application/vnd.ms-powerpoint")
- .put("tar", "application/x-tar")
- .put("xml", XML)
- .put("dtd", "application/xml-dtd")
- .put("xslt", "application/xslt+xml")
- .put("bmp", "image/bmp")
- .put("gif", "image/gif")
- .put("jpg", "image/jpeg")
- .put("jpeg", "image/jpeg")
- .put("tiff", "image/tiff")
- .put("png", "image/png")
- .put("svg", "image/svg+xml")
- .put("ico", "image/x-icon")
- .put("txt", TXT)
- .put("csv", "text/csv")
- .put("properties", "text/plain")
- .put("rtf", "text/rtf")
- .put("html", HTML)
- .put("css", "text/css")
- .put("tsv", "text/tab-separated-values")
- .build();
-
- private MediaTypes() {
- // only static methods
- }
-
- public static String getByFilename(String filename) {
- String extension = FilenameUtils.getExtension(filename);
- String mime = null;
- if (!Strings.isNullOrEmpty(extension)) {
- mime = MAP.get(extension.toLowerCase(Locale.ENGLISH));
- }
- return mime != null ? mime : DEFAULT;
- }
-}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/BaseRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/BaseRequest.java
deleted file mode 100644
index 8b5fbcff005..00000000000
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/BaseRequest.java
+++ /dev/null
@@ -1,211 +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;
-
-import com.google.common.collect.LinkedListMultimap;
-import com.google.common.collect.ListMultimap;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Objects;
-import java.util.Optional;
-import java.util.Set;
-import java.util.function.Function;
-import java.util.stream.Collectors;
-import javax.annotation.CheckForNull;
-import javax.annotation.Nullable;
-import org.sonarqube.ws.MediaTypes;
-
-import static com.google.common.base.Preconditions.checkArgument;
-import static com.google.common.base.Strings.isNullOrEmpty;
-import static java.util.Collections.singletonList;
-import static java.util.Collections.unmodifiableSet;
-import static java.util.Objects.requireNonNull;
-
-abstract class BaseRequest<SELF extends BaseRequest> implements WsRequest {
-
- private final String path;
-
- private String mediaType = MediaTypes.JSON;
-
- private final DefaultParameters parameters = new DefaultParameters();
- private final DefaultHeaders headers = new DefaultHeaders();
-
- BaseRequest(String path) {
- this.path = path;
- }
-
- @Override
- public String getPath() {
- return path;
- }
-
- @Override
- public String getMediaType() {
- return mediaType;
- }
-
- /**
- * Expected media type of response. Default is {@link MediaTypes#JSON}.
- */
- public SELF setMediaType(String s) {
- requireNonNull(s, "media type of response cannot be null");
- this.mediaType = s;
- return (SELF) this;
- }
-
- public SELF setParam(String key, @Nullable String value) {
- return setSingleValueParam(key, value);
- }
-
- public SELF setParam(String key, @Nullable Integer value) {
- return setSingleValueParam(key, value);
- }
-
- public SELF setParam(String key, @Nullable Long value) {
- return setSingleValueParam(key, value);
- }
-
- public SELF setParam(String key, @Nullable Float value) {
- return setSingleValueParam(key, value);
- }
-
- public SELF setParam(String key, @Nullable Boolean value) {
- return setSingleValueParam(key, value);
- }
-
- private SELF setSingleValueParam(String key, @Nullable Object value) {
- checkArgument(!isNullOrEmpty(key), "a WS parameter key cannot be null");
- if (value == null) {
- return (SELF) this;
- }
- parameters.setValue(key, value.toString());
-
- return (SELF) this;
- }
-
- public SELF setParam(String key, @Nullable Collection<? extends Object> values) {
- checkArgument(!isNullOrEmpty(key), "a WS parameter key cannot be null");
- if (values == null || values.isEmpty()) {
- return (SELF) this;
- }
-
- parameters.setValues(key, values.stream()
- .filter(Objects::nonNull)
- .map(Object::toString)
- .filter(value -> !value.isEmpty())
- .collect(Collectors.toList()));
-
- return (SELF) this;
- }
-
- @Override
- public Map<String, String> getParams() {
- return parameters.keyValues.keySet().stream()
- .collect(Collectors.toMap(
- Function.identity(),
- key -> parameters.keyValues.get(key).get(0),
- (v1, v2) -> {
- throw new IllegalStateException(String.format("Duplicate key '%s' in request", v1));
- },
- LinkedHashMap::new));
- }
-
- @Override
- public Parameters getParameters() {
- return parameters;
- }
-
- @Override
- public Headers getHeaders() {
- return headers;
- }
-
- public SELF setHeader(String name, @Nullable String value) {
- requireNonNull(name, "Header name can't be null");
- headers.setValue(name, value);
- return (SELF) this;
- }
-
- private static class DefaultParameters implements Parameters {
- // preserve insertion order
- private final ListMultimap<String, String> keyValues = LinkedListMultimap.create();
-
- @Override
- @CheckForNull
- public String getValue(String key) {
- return keyValues.containsKey(key) ? keyValues.get(key).get(0) : null;
- }
-
- @Override
- public List<String> getValues(String key) {
- return keyValues.get(key);
- }
-
- @Override
- public Set<String> getKeys() {
- return keyValues.keySet();
- }
-
- private DefaultParameters setValue(String key, String value) {
- checkArgument(!isNullOrEmpty(key));
- checkArgument(value != null);
-
- keyValues.putAll(key, singletonList(value));
- return this;
- }
-
- private DefaultParameters setValues(String key, Collection<String> values) {
- checkArgument(!isNullOrEmpty(key));
- checkArgument(values != null && !values.isEmpty());
-
- this.keyValues.putAll(key, values.stream().map(Object::toString).filter(Objects::nonNull).collect(Collectors.toList()));
-
- return this;
- }
- }
-
- private static class DefaultHeaders implements Headers {
- private final Map<String, String> keyValues = new HashMap<>();
-
- @Override
- public Optional<String> getValue(String name) {
- return Optional.ofNullable(keyValues.get(name));
- }
-
- private DefaultHeaders setValue(String name, @Nullable String value) {
- checkArgument(!isNullOrEmpty(name));
-
- if (value == null) {
- keyValues.remove(name);
- } else {
- keyValues.put(name, value);
- }
- return this;
- }
-
- @Override
- public Set<String> getNames() {
- return unmodifiableSet(keyValues.keySet());
- }
- }
-}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/BaseResponse.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/BaseResponse.java
deleted file mode 100644
index 039754f8571..00000000000
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/BaseResponse.java
+++ /dev/null
@@ -1,50 +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;
-
-import static java.net.HttpURLConnection.HTTP_NO_CONTENT;
-
-abstract class BaseResponse implements WsResponse {
-
- @Override
- public boolean isSuccessful() {
- return code() >= 200 && code() < 300;
- }
-
- @Override
- public WsResponse failIfNotSuccessful() {
- if (!isSuccessful()) {
- String content = content();
- close();
- throw new HttpException(requestUrl(), code(), content);
- }
- return this;
- }
-
- @Override
- public boolean hasContent() {
- return code() != HTTP_NO_CONTENT;
- }
-
- @Override
- public void close() {
- // override if needed
- }
-}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/BaseService.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/BaseService.java
deleted file mode 100644
index 4c6a0e9449e..00000000000
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/BaseService.java
+++ /dev/null
@@ -1,73 +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;
-
-import com.google.protobuf.Message;
-import com.google.protobuf.Parser;
-import java.io.InputStream;
-import java.util.Collection;
-import javax.annotation.CheckForNull;
-import javax.annotation.Nullable;
-import org.apache.commons.io.IOUtils;
-import org.sonarqube.ws.MediaTypes;
-
-import static com.google.common.base.Preconditions.checkArgument;
-import static com.google.common.base.Strings.isNullOrEmpty;
-
-public abstract class BaseService {
-
- private final WsConnector wsConnector;
- protected final String controller;
-
- public BaseService(WsConnector wsConnector, String controllerPath) {
- checkArgument(!isNullOrEmpty(controllerPath));
- this.wsConnector = wsConnector;
- this.controller = controllerPath;
- }
-
- protected <T extends Message> T call(BaseRequest request, Parser<T> parser) {
- request.setMediaType(MediaTypes.PROTOBUF);
- WsResponse response = call(request);
- return convert(response, parser);
- }
-
- protected WsResponse call(WsRequest request) {
- return wsConnector.call(request).failIfNotSuccessful();
- }
-
- public <T extends Message> T convert(WsResponse response, Parser<T> parser) {
- try (InputStream byteStream = response.contentStream()) {
- byte[] bytes = IOUtils.toByteArray(byteStream);
- // HTTP header "Content-Type" is not verified. It may be different than protobuf.
- return parser.parseFrom(bytes);
- } catch (Exception e) {
- throw new IllegalStateException("Fail to parse protobuf response of " + response.requestUrl(), e);
- }
- }
-
- protected String path(String action) {
- return String.format("%s/%s", controller, action);
- }
-
- @CheckForNull
- protected static String inlineMultipleParamValue(@Nullable Collection<String> values) {
- return values == null ? null : String.join(",", values);
- }
-}
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 f0d0e841f86..473ec80ad45 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
@@ -28,14 +28,14 @@ import org.sonarqube.ws.client.organization.OrganizationService;
import org.sonarqube.ws.client.permission.PermissionsService;
import org.sonarqube.ws.client.project.ProjectsService;
import org.sonarqube.ws.client.projectanalysis.ProjectAnalysisService;
-import org.sonarqube.ws.client.projectbranches.ProjectBranchesService;
+import org.sonarqube.ws.client.projectbranches.ProjectBranchesServiceOld;
import org.sonarqube.ws.client.projectlinks.ProjectLinksService;
-import org.sonarqube.ws.client.qualitygate.QualityGatesService;
+import org.sonarqube.ws.client.qualitygates.QualitygatesService;
import org.sonarqube.ws.client.qualityprofile.QualityProfilesService;
import org.sonarqube.ws.client.root.RootsService;
import org.sonarqube.ws.client.rule.RulesService;
import org.sonarqube.ws.client.setting.SettingsService;
-import org.sonarqube.ws.client.system.SystemService;
+import org.sonarqube.ws.client.system.SystemServiceOld;
import org.sonarqube.ws.client.user.UsersService;
import org.sonarqube.ws.client.usergroup.UserGroupsService;
import org.sonarqube.ws.client.usertoken.UserTokensService;
@@ -59,9 +59,9 @@ class DefaultWsClient implements WsClient {
private final UsersService usersService;
private final UserGroupsService userGroupsService;
private final UserTokensService userTokensService;
- private final QualityGatesService qualityGatesService;
+ private final QualitygatesService qualityGatesService;
private final MeasuresService measuresService;
- private final SystemService systemService;
+ private final SystemServiceOld systemService;
private final CeService ceService;
private final RulesService rulesService;
private final ProjectsService projectsService;
@@ -70,7 +70,7 @@ class DefaultWsClient implements WsClient {
private final RootsService rootsService;
private final WebhooksService webhooksService;
private final ProjectAnalysisService projectAnalysisService;
- private final ProjectBranchesService projectBranchesService;
+ private final ProjectBranchesServiceOld projectBranchesService;
DefaultWsClient(WsConnector wsConnector) {
this.wsConnector = wsConnector;
@@ -83,9 +83,9 @@ class DefaultWsClient implements WsClient {
this.usersService = new UsersService(wsConnector);
this.userGroupsService = new UserGroupsService(wsConnector);
this.userTokensService = new UserTokensService(wsConnector);
- this.qualityGatesService = new QualityGatesService(wsConnector);
+ this.qualityGatesService = new QualitygatesService(wsConnector);
this.measuresService = new MeasuresService(wsConnector);
- this.systemService = new SystemService(wsConnector);
+ this.systemService = new SystemServiceOld(wsConnector);
this.ceService = new CeService(wsConnector);
this.rulesService = new RulesService(wsConnector);
this.projectsService = new ProjectsService(wsConnector);
@@ -94,7 +94,7 @@ class DefaultWsClient implements WsClient {
this.rootsService = new RootsService(wsConnector);
this.webhooksService = new WebhooksService(wsConnector);
this.projectAnalysisService = new ProjectAnalysisService(wsConnector);
- this.projectBranchesService = new ProjectBranchesService(wsConnector);
+ this.projectBranchesService = new ProjectBranchesServiceOld(wsConnector);
}
@Override
@@ -148,7 +148,7 @@ class DefaultWsClient implements WsClient {
}
@Override
- public QualityGatesService qualityGates() {
+ public QualitygatesService qualityGates() {
return qualityGatesService;
}
@@ -158,7 +158,7 @@ class DefaultWsClient implements WsClient {
}
@Override
- public SystemService system() {
+ public SystemServiceOld system() {
return systemService;
}
@@ -203,7 +203,7 @@ class DefaultWsClient implements WsClient {
}
@Override
- public ProjectBranchesService projectBranches() {
+ public ProjectBranchesServiceOld projectBranches() {
return projectBranchesService;
}
}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/GetRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/GetRequest.java
deleted file mode 100644
index 02a1f2ac32f..00000000000
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/GetRequest.java
+++ /dev/null
@@ -1,34 +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;
-
-/**
- * @since 5.3
- */
-public class GetRequest extends BaseRequest<GetRequest> {
- public GetRequest(String path) {
- super(path);
- }
-
- @Override
- public Method getMethod() {
- return Method.GET;
- }
-}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/Headers.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/Headers.java
deleted file mode 100644
index b289789a1f2..00000000000
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/Headers.java
+++ /dev/null
@@ -1,36 +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;
-
-import java.util.Optional;
-import java.util.Set;
-
-/**
- * HTTP headers
- *
- * @since 6.6
- */
-public interface Headers {
-
- Optional<String> getValue(String name);
-
- Set<String> getNames();
-
-}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/HttpException.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/HttpException.java
deleted file mode 100644
index d456faeb473..00000000000
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/HttpException.java
+++ /dev/null
@@ -1,52 +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;
-
-/**
- * @since 5.3
- */
-public class HttpException extends RuntimeException {
-
- private final String url;
- private final int code;
- private final String content;
-
- public HttpException(String url, int code, String content) {
- super(String.format("Error %d on %s : %s", code, url, content));
- this.url = url;
- this.code = code;
- this.content = content;
- }
-
- public String content() {
- return content;
- }
-
- public String url() {
- return url;
- }
-
- /**
- * @see java.net.HttpURLConnection constants
- */
- public int code() {
- return code;
- }
-}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/Parameters.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/Parameters.java
deleted file mode 100644
index ae692ab103f..00000000000
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/Parameters.java
+++ /dev/null
@@ -1,36 +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;
-
-import java.util.List;
-import java.util.Set;
-import javax.annotation.CheckForNull;
-
-public interface Parameters {
- /**
- * In the case of a multi value parameter, returns the first element
- */
- @CheckForNull
- String getValue(String key);
-
- List<String> getValues(String key);
-
- Set<String> getKeys();
-}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/PostRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/PostRequest.java
deleted file mode 100644
index 13cbdd5c996..00000000000
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/PostRequest.java
+++ /dev/null
@@ -1,69 +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;
-
-import java.io.File;
-import java.util.LinkedHashMap;
-import java.util.Map;
-
-/**
- * @since 5.3
- */
-public class PostRequest extends BaseRequest<PostRequest> {
-
- private final Map<String, Part> parts = new LinkedHashMap<>();
-
- public PostRequest(String path) {
- super(path);
- }
-
- @Override
- public Method getMethod() {
- return Method.POST;
- }
-
- public PostRequest setPart(String name, Part part) {
- this.parts.put(name, part);
- return this;
- }
-
- public Map<String, Part> getParts() {
- return parts;
- }
-
- public static class Part {
- private final String mediaType;
- private final File file;
-
- public Part(String mediaType, File file) {
- this.mediaType = mediaType;
- this.file = file;
- }
-
- public String getMediaType() {
- return mediaType;
- }
-
- public File getFile() {
- return file;
- }
- }
-
-}
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 6083afd01d4..71b00aa96d9 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
@@ -28,14 +28,14 @@ import org.sonarqube.ws.client.organization.OrganizationService;
import org.sonarqube.ws.client.permission.PermissionsService;
import org.sonarqube.ws.client.project.ProjectsService;
import org.sonarqube.ws.client.projectanalysis.ProjectAnalysisService;
-import org.sonarqube.ws.client.projectbranches.ProjectBranchesService;
+import org.sonarqube.ws.client.projectbranches.ProjectBranchesServiceOld;
import org.sonarqube.ws.client.projectlinks.ProjectLinksService;
-import org.sonarqube.ws.client.qualitygate.QualityGatesService;
+import org.sonarqube.ws.client.qualitygates.QualitygatesService;
import org.sonarqube.ws.client.qualityprofile.QualityProfilesService;
import org.sonarqube.ws.client.root.RootsService;
import org.sonarqube.ws.client.rule.RulesService;
import org.sonarqube.ws.client.setting.SettingsService;
-import org.sonarqube.ws.client.system.SystemService;
+import org.sonarqube.ws.client.system.SystemServiceOld;
import org.sonarqube.ws.client.user.UsersService;
import org.sonarqube.ws.client.usergroup.UserGroupsService;
import org.sonarqube.ws.client.usertoken.UserTokensService;
@@ -78,11 +78,11 @@ public interface WsClient {
UserTokensService userTokens();
- QualityGatesService qualityGates();
+ QualitygatesService qualityGates();
MeasuresService measures();
- SystemService system();
+ SystemServiceOld system();
CeService ce();
@@ -123,5 +123,5 @@ public interface WsClient {
/**
* @since 6.6>
*/
- ProjectBranchesService projectBranches();
+ ProjectBranchesServiceOld projectBranches();
}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/WsConnector.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/WsConnector.java
deleted file mode 100644
index b203d18be98..00000000000
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/WsConnector.java
+++ /dev/null
@@ -1,40 +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;
-
-/**
- * @since 5.3
- */
-public interface WsConnector {
-
- /**
- * Server base URL, always with trailing slash, for instance "http://localhost:9000/"
- */
- String baseUrl();
-
- /**
- * @throws IllegalStateException if the request could not be executed due to
- * a connectivity problem or timeout. Because networks can
- * fail during an exchange, it is possible that the remote server
- * accepted the request before the failure
- */
- WsResponse call(WsRequest wsRequest);
-
-}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/WsRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/WsRequest.java
deleted file mode 100644
index 9907ae7b39e..00000000000
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/WsRequest.java
+++ /dev/null
@@ -1,51 +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;
-
-import java.util.Map;
-
-/**
- * @since 5.3
- */
-public interface WsRequest {
-
- Method getMethod();
-
- String getPath();
-
- String getMediaType();
-
- /**
- *
- * In case of multi value parameters, returns the first value
- *
- * @deprecated since 6.1. Use {@link #getParameters()} instead
- */
- @Deprecated
- Map<String, String> getParams();
-
- Parameters getParameters();
-
- Headers getHeaders();
-
- enum Method {
- GET, POST
- }
-}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/WsResponse.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/WsResponse.java
deleted file mode 100644
index fcaed89123f..00000000000
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/WsResponse.java
+++ /dev/null
@@ -1,65 +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;
-
-import java.io.Closeable;
-import java.io.InputStream;
-import java.io.Reader;
-
-/**
- * @since 5.3
- */
-public interface WsResponse extends Closeable {
-
- /**
- * The absolute requested URL
- */
- String requestUrl();
-
- /**
- * HTTP status code
- */
- int code();
-
- /**
- * Returns true if the code is in [200..300), which means the request was
- * successfully received, understood, and accepted.
- */
- boolean isSuccessful() ;
-
- /**
- * Throws a {@link HttpException} if {@link #isSuccessful()} is false.
- */
- WsResponse failIfNotSuccessful();
-
- String contentType();
-
- boolean hasContent();
-
- InputStream contentStream();
-
- Reader contentReader();
-
- String content();
-
- @Override
- void close();
-
-}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/ce/ActivityStatusWsRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/ce/ActivityStatusWsRequest.java
deleted file mode 100644
index 256afc5b0b5..00000000000
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/ce/ActivityStatusWsRequest.java
+++ /dev/null
@@ -1,72 +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.ce;
-
-import javax.annotation.CheckForNull;
-import javax.annotation.Nullable;
-import javax.annotation.concurrent.Immutable;
-
-@Immutable
-public class ActivityStatusWsRequest {
- private final String componentId;
- private final String componentKey;
-
- private ActivityStatusWsRequest(Builder builder) {
- this.componentId = builder.componentId;
- this.componentKey = builder.componentKey;
- }
-
- @CheckForNull
- public String getComponentId() {
- return componentId;
- }
-
- @CheckForNull
- public String getComponentKey() {
- return componentKey;
- }
-
- public static Builder newBuilder() {
- return new Builder();
- }
-
- public static class Builder {
- private String componentId;
- private String componentKey;
-
- private Builder() {
- // enforce newBuilder() use for instantiation
- }
-
- public Builder setComponentId(@Nullable String componentId) {
- this.componentId = componentId;
- return this;
- }
-
- public Builder setComponentKey(@Nullable String componentKey) {
- this.componentKey = componentKey;
- return this;
- }
-
- public ActivityStatusWsRequest build() {
- return new ActivityStatusWsRequest(this);
- }
- }
-}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/ce/ActivityWsRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/ce/ActivityWsRequest.java
deleted file mode 100644
index 8a1abb2817f..00000000000
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/ce/ActivityWsRequest.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.ce;
-
-import java.util.List;
-import javax.annotation.CheckForNull;
-import javax.annotation.Nullable;
-
-public class ActivityWsRequest {
- private String componentId;
- private String query;
- private List<String> status;
- private String type;
- private Boolean onlyCurrents;
- private String minSubmittedAt;
- private String maxExecutedAt;
- private Integer page;
- private Integer pageSize;
-
- @CheckForNull
- public String getComponentId() {
- return componentId;
- }
-
- public ActivityWsRequest setComponentId(@Nullable String componentId) {
- this.componentId = componentId;
- return this;
- }
-
- @CheckForNull
- public String getQuery() {
- return query;
- }
-
- public ActivityWsRequest setQuery(@Nullable String query) {
- this.query = query;
- return this;
- }
-
- @CheckForNull
- public List<String> getStatus() {
- return status;
- }
-
- public ActivityWsRequest setStatus(@Nullable List<String> status) {
- this.status = status;
- return this;
- }
-
- @CheckForNull
- public String getType() {
- return type;
- }
-
- public ActivityWsRequest setType(@Nullable String type) {
- this.type = type;
- return this;
- }
-
- @CheckForNull
- public Boolean getOnlyCurrents() {
- return onlyCurrents;
- }
-
- public ActivityWsRequest setOnlyCurrents(@Nullable Boolean onlyCurrents) {
- this.onlyCurrents = onlyCurrents;
- return this;
- }
-
- @CheckForNull
- public String getMinSubmittedAt() {
- return minSubmittedAt;
- }
-
- public ActivityWsRequest setMinSubmittedAt(@Nullable String minSubmittedAt) {
- this.minSubmittedAt = minSubmittedAt;
- return this;
- }
-
- @CheckForNull
- public String getMaxExecutedAt() {
- return maxExecutedAt;
- }
-
- public ActivityWsRequest setMaxExecutedAt(@Nullable String maxExecutedAt) {
- this.maxExecutedAt = maxExecutedAt;
- return this;
- }
-
- @CheckForNull
- public Integer getPage() {
- return page;
- }
-
- public ActivityWsRequest setPage(@Nullable Integer page) {
- this.page = page;
- return this;
- }
-
- @CheckForNull
- public Integer getPageSize() {
- return pageSize;
- }
-
- public ActivityWsRequest setPageSize(@Nullable Integer pageSize) {
- this.pageSize = pageSize;
- return this;
- }
-}
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
deleted file mode 100644
index 243af50e8b7..00000000000
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/ce/CeService.java
+++ /dev/null
@@ -1,107 +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.ce;
-
-import org.sonarqube.ws.WsCe;
-import org.sonarqube.ws.WsCe.ActivityResponse;
-import org.sonarqube.ws.WsCe.ProjectResponse;
-import org.sonarqube.ws.WsCe.TaskTypesWsResponse;
-import org.sonarqube.ws.WsCe.WorkerCountResponse;
-import org.sonarqube.ws.client.BaseService;
-import org.sonarqube.ws.client.GetRequest;
-import org.sonarqube.ws.client.WsConnector;
-
-import static org.sonarqube.ws.client.ce.CeWsParameters.ACTION_WORKER_COUNT;
-import static org.sonarqube.ws.client.ce.CeWsParameters.DEPRECATED_PARAM_COMPONENT_KEY;
-import static org.sonarqube.ws.client.ce.CeWsParameters.PARAM_COMPONENT;
-import static org.sonarqube.ws.client.ce.CeWsParameters.PARAM_COMPONENT_ID;
-import static org.sonarqube.ws.client.ce.CeWsParameters.PARAM_MAX_EXECUTED_AT;
-import static org.sonarqube.ws.client.ce.CeWsParameters.PARAM_MIN_SUBMITTED_AT;
-import static org.sonarqube.ws.client.ce.CeWsParameters.PARAM_ONLY_CURRENTS;
-import static org.sonarqube.ws.client.ce.CeWsParameters.PARAM_STATUS;
-import static org.sonarqube.ws.client.ce.CeWsParameters.PARAM_TYPE;
-
-/**
- * Maps web service {@code api/ce} (Compute Engine).
- */
-public class CeService extends BaseService {
-
- public CeService(WsConnector wsConnector) {
- super(wsConnector, "api/ce");
- }
-
- public ActivityResponse activity(ActivityWsRequest request) {
- return call(
- new GetRequest(path("activity"))
- .setParam(PARAM_COMPONENT_ID, request.getComponentId())
- .setParam("q", request.getQuery())
- .setParam(PARAM_STATUS, inlineMultipleParamValue(request.getStatus()))
- .setParam(PARAM_TYPE, request.getType())
- .setParam(PARAM_MAX_EXECUTED_AT, request.getMaxExecutedAt())
- .setParam(PARAM_MIN_SUBMITTED_AT, request.getMinSubmittedAt())
- .setParam(PARAM_ONLY_CURRENTS, request.getOnlyCurrents())
- .setParam("p", request.getPage())
- .setParam("ps", request.getPageSize()),
- ActivityResponse.parser());
- }
-
- public TaskTypesWsResponse taskTypes() {
- return call(new GetRequest(path("task_types")), TaskTypesWsResponse.parser());
- }
-
- /**
- * Gets details of a Compute Engine task.
- *
- * @throws org.sonarqube.ws.client.HttpException if HTTP status code is not 2xx.
- * @since 5.5
- */
- public WsCe.TaskResponse task(String id) {
- return task(TaskWsRequest.newBuilder(id).build());
- }
-
- public WsCe.TaskResponse task(TaskWsRequest taskWsRequest) {
- GetRequest request = new GetRequest(path("task"))
- .setParam("id", taskWsRequest.getTaskUuid());
- if (!taskWsRequest.getAdditionalFields().isEmpty()) {
- request.setParam("additionalFields", inlineMultipleParamValue(taskWsRequest.getAdditionalFields()));
- }
- return call(request, WsCe.TaskResponse.parser());
- }
-
- public WsCe.ActivityStatusWsResponse activityStatus(ActivityStatusWsRequest request) {
- return call(
- new GetRequest(path("activity_status"))
- .setParam(PARAM_COMPONENT_ID, request.getComponentId())
- .setParam(DEPRECATED_PARAM_COMPONENT_KEY, request.getComponentKey()),
- WsCe.ActivityStatusWsResponse.parser());
- }
-
- public WorkerCountResponse workerCount() {
- return call(new GetRequest(path(ACTION_WORKER_COUNT)), WorkerCountResponse.parser());
- }
-
- public ProjectResponse component(String componentKey) {
- return call(
- new GetRequest(path("component"))
- .setParam(PARAM_COMPONENT, componentKey),
- ProjectResponse.parser());
- }
-
-}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/ce/TaskWsRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/ce/TaskWsRequest.java
deleted file mode 100644
index d8f93335354..00000000000
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/ce/TaskWsRequest.java
+++ /dev/null
@@ -1,86 +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.ce;
-
-import com.google.common.collect.ImmutableList;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-import javax.annotation.concurrent.Immutable;
-
-@Immutable
-public class TaskWsRequest {
- private final String taskUuid;
- private final List<String> additionalFields;
-
- private TaskWsRequest(Builder builder) {
- this.taskUuid = builder.taskUuid;
- this.additionalFields = createAdditionalFields(builder);
- }
- public static Builder newBuilder(String taskUuid) {
- return new Builder(taskUuid);
- }
-
- private static List<String> createAdditionalFields(Builder builder) {
- if (!builder.errorStacktrace && !builder.scannerContext) {
- return Collections.emptyList();
- }
- List<String> res = new ArrayList<>(2);
- if (builder.errorStacktrace) {
- res.add("stacktrace");
- }
- if (builder.scannerContext) {
- res.add("scannerContext");
- }
- return ImmutableList.copyOf(res);
- }
-
- public String getTaskUuid() {
- return taskUuid;
- }
-
- public List<String> getAdditionalFields() {
- return additionalFields;
- }
-
- public static final class Builder {
- private final String taskUuid;
- private boolean errorStacktrace = false;
- private boolean scannerContext = false;
-
- private Builder(String taskUuid) {
- this.taskUuid = taskUuid;
- }
-
- public Builder withErrorStacktrace() {
- this.errorStacktrace = true;
- return this;
- }
-
- public Builder withScannerContext() {
- this.scannerContext = true;
- return this;
- }
-
- public TaskWsRequest build() {
- return new TaskWsRequest(this);
- }
- }
-}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/component/ComponentsService.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/component/ComponentsService.java
index 95279bba0c6..6d45e829bf2 100644
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/component/ComponentsService.java
+++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/component/ComponentsService.java
@@ -22,10 +22,10 @@ package org.sonarqube.ws.client.component;
import com.google.common.base.Joiner;
import java.util.List;
import java.util.stream.Collectors;
-import org.sonarqube.ws.WsComponents.SearchProjectsWsResponse;
-import org.sonarqube.ws.WsComponents.SearchWsResponse;
-import org.sonarqube.ws.WsComponents.ShowWsResponse;
-import org.sonarqube.ws.WsComponents.TreeWsResponse;
+import org.sonarqube.ws.Components.SearchProjectsWsResponse;
+import org.sonarqube.ws.Components.SearchWsResponse;
+import org.sonarqube.ws.Components.ShowWsResponse;
+import org.sonarqube.ws.Components.TreeWsResponse;
import org.sonarqube.ws.client.BaseService;
import org.sonarqube.ws.client.GetRequest;
import org.sonarqube.ws.client.WsConnector;
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/measure/MeasuresService.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/measure/MeasuresService.java
index db8b7e4bde2..0b0afb29cb0 100644
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/measure/MeasuresService.java
+++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/measure/MeasuresService.java
@@ -20,10 +20,10 @@
package org.sonarqube.ws.client.measure;
import org.sonar.api.server.ws.WebService.Param;
-import org.sonarqube.ws.WsMeasures.ComponentTreeWsResponse;
-import org.sonarqube.ws.WsMeasures.ComponentWsResponse;
-import org.sonarqube.ws.WsMeasures.SearchHistoryResponse;
-import org.sonarqube.ws.WsMeasures.SearchWsResponse;
+import org.sonarqube.ws.Measures.ComponentTreeWsResponse;
+import org.sonarqube.ws.Measures.ComponentWsResponse;
+import org.sonarqube.ws.Measures.SearchHistoryResponse;
+import org.sonarqube.ws.Measures.SearchWsResponse;
import org.sonarqube.ws.client.BaseService;
import org.sonarqube.ws.client.GetRequest;
import org.sonarqube.ws.client.WsConnector;
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/permission/PermissionsService.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/permission/PermissionsService.java
index ba58f34a274..c0488373597 100644
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/permission/PermissionsService.java
+++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/permission/PermissionsService.java
@@ -19,13 +19,13 @@
*/
package org.sonarqube.ws.client.permission;
-import org.sonarqube.ws.WsPermissions;
-import org.sonarqube.ws.WsPermissions.CreateTemplateWsResponse;
-import org.sonarqube.ws.WsPermissions.SearchProjectPermissionsWsResponse;
-import org.sonarqube.ws.WsPermissions.SearchTemplatesWsResponse;
-import org.sonarqube.ws.WsPermissions.UpdateTemplateWsResponse;
-import org.sonarqube.ws.WsPermissions.UsersWsResponse;
-import org.sonarqube.ws.WsPermissions.WsSearchGlobalPermissionsResponse;
+import org.sonarqube.ws.Permissions;
+import org.sonarqube.ws.Permissions.CreateTemplateWsResponse;
+import org.sonarqube.ws.Permissions.SearchProjectPermissionsWsResponse;
+import org.sonarqube.ws.Permissions.SearchTemplatesWsResponse;
+import org.sonarqube.ws.Permissions.UpdateTemplateWsResponse;
+import org.sonarqube.ws.Permissions.UsersWsResponse;
+import org.sonarqube.ws.Permissions.WsSearchGlobalPermissionsResponse;
import org.sonarqube.ws.client.BaseService;
import org.sonarqube.ws.client.GetRequest;
import org.sonarqube.ws.client.PostRequest;
@@ -53,7 +53,7 @@ public class PermissionsService extends BaseService {
super(wsConnector, PermissionsWsParameters.CONTROLLER);
}
- public WsPermissions.WsGroupsResponse groups(GroupsWsRequest request) {
+ public Permissions.WsGroupsResponse groups(GroupsWsRequest request) {
GetRequest get = new GetRequest(path("groups"))
.setParam(PARAM_PERMISSION, request.getPermission())
.setParam(PARAM_PROJECT_ID, request.getProjectId())
@@ -61,7 +61,7 @@ public class PermissionsService extends BaseService {
.setParam("p", request.getPage())
.setParam("ps", request.getPageSize())
.setParam("q", request.getQuery());
- return call(get, WsPermissions.WsGroupsResponse.parser());
+ return call(get, Permissions.WsGroupsResponse.parser());
}
public void addGroup(AddGroupWsRequest request) {
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/project/ProjectsService.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/project/ProjectsService.java
index 11dc0c4495f..9a42c155add 100644
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/project/ProjectsService.java
+++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/project/ProjectsService.java
@@ -20,9 +20,9 @@
package org.sonarqube.ws.client.project;
import com.google.common.base.Joiner;
-import org.sonarqube.ws.WsProjects.BulkUpdateKeyWsResponse;
-import org.sonarqube.ws.WsProjects.CreateWsResponse;
-import org.sonarqube.ws.WsProjects.SearchWsResponse;
+import org.sonarqube.ws.Projects.BulkUpdateKeyWsResponse;
+import org.sonarqube.ws.Projects.CreateWsResponse;
+import org.sonarqube.ws.Projects.SearchWsResponse;
import org.sonarqube.ws.client.BaseService;
import org.sonarqube.ws.client.GetRequest;
import org.sonarqube.ws.client.PostRequest;
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/projectbranches/ProjectBranchesService.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/projectbranches/ProjectBranchesServiceOld.java
index 75ad3bdaec7..cee7e910636 100644
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/projectbranches/ProjectBranchesService.java
+++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/projectbranches/ProjectBranchesServiceOld.java
@@ -19,8 +19,8 @@
*/
package org.sonarqube.ws.client.projectbranches;
-import org.sonarqube.ws.WsBranches.ListWsResponse;
-import org.sonarqube.ws.WsBranches.ShowWsResponse;
+import org.sonarqube.ws.ProjectBranches.ListWsResponse;
+import org.sonarqube.ws.ProjectBranches.ShowWsResponse;
import org.sonarqube.ws.client.BaseService;
import org.sonarqube.ws.client.GetRequest;
import org.sonarqube.ws.client.PostRequest;
@@ -35,9 +35,9 @@ import static org.sonarqube.ws.client.projectbranches.ProjectBranchesParameters.
import static org.sonarqube.ws.client.projectbranches.ProjectBranchesParameters.PARAM_NAME;
import static org.sonarqube.ws.client.projectbranches.ProjectBranchesParameters.PARAM_PROJECT;
-public class ProjectBranchesService extends BaseService {
+public class ProjectBranchesServiceOld extends BaseService {
- public ProjectBranchesService(WsConnector wsConnector) {
+ public ProjectBranchesServiceOld(WsConnector wsConnector) {
super(wsConnector, CONTROLLER);
}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/projectbranches/package-info.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/projectbranches/package-info.java
index 82e37431572..148ff98162a 100644
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/projectbranches/package-info.java
+++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/projectbranches/package-info.java
@@ -21,3 +21,4 @@
package org.sonarqube.ws.client.projectbranches;
import javax.annotation.ParametersAreNonnullByDefault;
+
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/projectlinks/ProjectLinksService.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/projectlinks/ProjectLinksService.java
index 05d2e0d8a0b..6266aa38689 100644
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/projectlinks/ProjectLinksService.java
+++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/projectlinks/ProjectLinksService.java
@@ -19,8 +19,8 @@
*/
package org.sonarqube.ws.client.projectlinks;
-import org.sonarqube.ws.WsProjectLinks.CreateWsResponse;
-import org.sonarqube.ws.WsProjectLinks.SearchWsResponse;
+import org.sonarqube.ws.ProjectLinks.CreateWsResponse;
+import org.sonarqube.ws.ProjectLinks.SearchWsResponse;
import org.sonarqube.ws.client.BaseService;
import org.sonarqube.ws.client.GetRequest;
import org.sonarqube.ws.client.PostRequest;
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/qualitygate/CreateConditionRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/qualitygate/CreateConditionRequest.java
deleted file mode 100644
index 6165b8ec479..00000000000
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/qualitygate/CreateConditionRequest.java
+++ /dev/null
@@ -1,128 +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.qualitygate;
-
-import javax.annotation.CheckForNull;
-import javax.annotation.Nullable;
-import javax.annotation.concurrent.Immutable;
-
-import static com.google.common.base.Preconditions.checkArgument;
-import static com.google.common.base.Strings.isNullOrEmpty;
-
-@Immutable
-public class CreateConditionRequest {
-
- private final long qualityGateId;
- private final String metricKey;
- private final String operator;
- private final String warning;
- private final String error;
- private final Integer period;
-
- private CreateConditionRequest(Builder builder) {
- this.qualityGateId = builder.qualityGateId;
- this.metricKey = builder.metricKey;
- this.operator = builder.operator;
- this.warning = builder.warning;
- this.error = builder.error;
- this.period = builder.period;
- }
-
- public long getQualityGateId() {
- return qualityGateId;
- }
-
- public String getMetricKey() {
- return metricKey;
- }
-
- public String getOperator() {
- return operator;
- }
-
- @CheckForNull
- public String getWarning() {
- return warning;
- }
-
- @CheckForNull
- public String getError() {
- return error;
- }
-
- @CheckForNull
- public Integer getPeriod() {
- return period;
- }
-
- public static Builder builder() {
- return new Builder();
- }
-
- public static class Builder {
- private long qualityGateId;
- private String metricKey;
- private String operator;
- private String warning;
- private String error;
- private Integer period;
-
- private Builder() {
- // enforce factory method use
- }
-
- public Builder setQualityGateId(long qualityGateId) {
- this.qualityGateId = qualityGateId;
- return this;
- }
-
- public Builder setMetricKey(String metricKey) {
- this.metricKey = metricKey;
- return this;
- }
-
- public Builder setOperator(String operator) {
- this.operator = operator;
- return this;
- }
-
- public Builder setWarning(@Nullable String warning) {
- this.warning = warning;
- return this;
- }
-
- public Builder setError(@Nullable String error) {
- this.error = error;
- return this;
- }
-
- public Builder setPeriod(@Nullable Integer period) {
- this.period = period;
- return this;
- }
-
- public CreateConditionRequest build() {
- checkArgument(qualityGateId > 0, "Quality gate id is mandatory and must not be empty");
- checkArgument(!isNullOrEmpty(metricKey), "Metric key is mandatory and must not be empty");
- checkArgument(!isNullOrEmpty(operator), "Operator is mandatory and must not be empty");
- return new CreateConditionRequest(this);
- }
- }
-}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/qualitygate/ProjectStatusWsRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/qualitygate/ProjectStatusWsRequest.java
deleted file mode 100644
index ba4c30014ae..00000000000
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/qualitygate/ProjectStatusWsRequest.java
+++ /dev/null
@@ -1,59 +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.qualitygate;
-
-import javax.annotation.CheckForNull;
-import javax.annotation.Nullable;
-
-public class ProjectStatusWsRequest {
- private String analysisId;
- private String projectId;
- private String projectKey;
-
- @CheckForNull
- public String getAnalysisId() {
- return analysisId;
- }
-
- public ProjectStatusWsRequest setAnalysisId(@Nullable String analysisId) {
- this.analysisId = analysisId;
- return this;
- }
-
- @CheckForNull
- public String getProjectId() {
- return projectId;
- }
-
- public ProjectStatusWsRequest setProjectId(@Nullable String projectId) {
- this.projectId = projectId;
- return this;
- }
-
- @CheckForNull
- public String getProjectKey() {
- return projectKey;
- }
-
- public ProjectStatusWsRequest setProjectKey(@Nullable String projectKey) {
- this.projectKey = projectKey;
- return this;
- }
-}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/qualitygate/QualityGatesService.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/qualitygate/QualityGatesService.java
deleted file mode 100644
index 7872e153501..00000000000
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/qualitygate/QualityGatesService.java
+++ /dev/null
@@ -1,97 +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.qualitygate;
-
-import org.sonarqube.ws.WsQualityGates.CreateConditionWsResponse;
-import org.sonarqube.ws.WsQualityGates.CreateWsResponse;
-import org.sonarqube.ws.WsQualityGates.ProjectStatusWsResponse;
-import org.sonarqube.ws.WsQualityGates.UpdateConditionWsResponse;
-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.sonarqube.ws.client.qualitygate.QualityGatesWsParameters.ACTION_CREATE;
-import static org.sonarqube.ws.client.qualitygate.QualityGatesWsParameters.ACTION_CREATE_CONDITION;
-import static org.sonarqube.ws.client.qualitygate.QualityGatesWsParameters.ACTION_PROJECT_STATUS;
-import static org.sonarqube.ws.client.qualitygate.QualityGatesWsParameters.ACTION_SELECT;
-import static org.sonarqube.ws.client.qualitygate.QualityGatesWsParameters.ACTION_UPDATE_CONDITION;
-import static org.sonarqube.ws.client.qualitygate.QualityGatesWsParameters.CONTROLLER_QUALITY_GATES;
-import static org.sonarqube.ws.client.qualitygate.QualityGatesWsParameters.PARAM_ANALYSIS_ID;
-import static org.sonarqube.ws.client.qualitygate.QualityGatesWsParameters.PARAM_ERROR;
-import static org.sonarqube.ws.client.qualitygate.QualityGatesWsParameters.PARAM_GATE_ID;
-import static org.sonarqube.ws.client.qualitygate.QualityGatesWsParameters.PARAM_ID;
-import static org.sonarqube.ws.client.qualitygate.QualityGatesWsParameters.PARAM_METRIC;
-import static org.sonarqube.ws.client.qualitygate.QualityGatesWsParameters.PARAM_NAME;
-import static org.sonarqube.ws.client.qualitygate.QualityGatesWsParameters.PARAM_OPERATOR;
-import static org.sonarqube.ws.client.qualitygate.QualityGatesWsParameters.PARAM_PERIOD;
-import static org.sonarqube.ws.client.qualitygate.QualityGatesWsParameters.PARAM_PROJECT_ID;
-import static org.sonarqube.ws.client.qualitygate.QualityGatesWsParameters.PARAM_PROJECT_KEY;
-import static org.sonarqube.ws.client.qualitygate.QualityGatesWsParameters.PARAM_WARNING;
-
-public class QualityGatesService extends BaseService {
-
- public QualityGatesService(WsConnector wsConnector) {
- super(wsConnector, CONTROLLER_QUALITY_GATES);
- }
-
- public ProjectStatusWsResponse projectStatus(ProjectStatusWsRequest request) {
- return call(new GetRequest(path(ACTION_PROJECT_STATUS))
- .setParam(PARAM_ANALYSIS_ID, request.getAnalysisId())
- .setParam(PARAM_PROJECT_ID, request.getProjectId())
- .setParam(PARAM_PROJECT_KEY, request.getProjectKey()),
- ProjectStatusWsResponse.parser());
- }
-
- public void associateProject(SelectWsRequest request) {
- call(new PostRequest(path(ACTION_SELECT))
- .setParam(PARAM_GATE_ID, request.getGateId())
- .setParam(PARAM_PROJECT_ID, request.getProjectId())
- .setParam(PARAM_PROJECT_KEY, request.getProjectKey()));
- }
-
- public CreateWsResponse create(String name) {
- return call(new PostRequest(path(ACTION_CREATE))
- .setParam(PARAM_NAME, name),
- CreateWsResponse.parser());
- }
-
- public CreateConditionWsResponse createCondition(CreateConditionRequest request) {
- return call(new PostRequest(path(ACTION_CREATE_CONDITION))
- .setParam(PARAM_GATE_ID, request.getQualityGateId())
- .setParam(PARAM_METRIC, request.getMetricKey())
- .setParam(PARAM_OPERATOR, request.getOperator())
- .setParam(PARAM_WARNING, request.getWarning())
- .setParam(PARAM_ERROR, request.getError())
- .setParam(PARAM_PERIOD, request.getPeriod()),
- CreateConditionWsResponse.parser());
- }
-
- public UpdateConditionWsResponse updateCondition(UpdateConditionRequest request) {
- return call(new PostRequest(path(ACTION_UPDATE_CONDITION))
- .setParam(PARAM_ID, request.getConditionId())
- .setParam(PARAM_METRIC, request.getMetricKey())
- .setParam(PARAM_OPERATOR, request.getOperator())
- .setParam(PARAM_WARNING, request.getWarning())
- .setParam(PARAM_ERROR, request.getError())
- .setParam(PARAM_PERIOD, request.getPeriod()),
- UpdateConditionWsResponse.parser());
- }
-}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/qualitygate/SelectWsRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/qualitygate/SelectWsRequest.java
deleted file mode 100644
index a787caa6429..00000000000
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/qualitygate/SelectWsRequest.java
+++ /dev/null
@@ -1,57 +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.qualitygate;
-
-import javax.annotation.CheckForNull;
-
-public class SelectWsRequest {
- private long gateId;
- private String projectId;
- private String projectKey;
-
- public long getGateId() {
- return gateId;
- }
-
- public SelectWsRequest setGateId(long gateId) {
- this.gateId = gateId;
- return this;
- }
-
- @CheckForNull
- public String getProjectId() {
- return projectId;
- }
-
- public SelectWsRequest setProjectId(String projectId) {
- this.projectId = projectId;
- return this;
- }
-
- @CheckForNull
- public String getProjectKey() {
- return projectKey;
- }
-
- public SelectWsRequest setProjectKey(String projectKey) {
- this.projectKey = projectKey;
- return this;
- }
-}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/qualitygate/UpdateConditionRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/qualitygate/UpdateConditionRequest.java
deleted file mode 100644
index 5afa9fd22f7..00000000000
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/qualitygate/UpdateConditionRequest.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.qualitygate;
-
-import javax.annotation.CheckForNull;
-import javax.annotation.Nullable;
-import javax.annotation.concurrent.Immutable;
-
-import static com.google.common.base.Preconditions.checkArgument;
-import static com.google.common.base.Strings.isNullOrEmpty;
-
-@Immutable
-public class UpdateConditionRequest {
-
- private final long conditionId;
- private final String metricKey;
- private final String operator;
- private final String warning;
- private final String error;
- private final Integer period;
-
- private UpdateConditionRequest(Builder builder) {
- this.conditionId = builder.conditionId;
- this.metricKey = builder.metricKey;
- this.operator = builder.operator;
- this.warning = builder.warning;
- this.error = builder.error;
- this.period = builder.period;
- }
-
- public long getConditionId() {
- return conditionId;
- }
-
- public String getMetricKey() {
- return metricKey;
- }
-
- public String getOperator() {
- return operator;
- }
-
- @CheckForNull
- public String getWarning() {
- return warning;
- }
-
- @CheckForNull
- public String getError() {
- return error;
- }
-
- @CheckForNull
- public Integer getPeriod() {
- return period;
- }
- public static Builder builder() {
- return new Builder();
- }
-
- public static class Builder {
- private long conditionId;
- private String metricKey;
- private String operator;
- private String warning;
- private String error;
- private Integer period;
-
- private Builder() {
- // enforce factory method use
- }
-
- public Builder setConditionId(long conditionId) {
- this.conditionId = conditionId;
- return this;
- }
-
- public Builder setMetricKey(String metricKey) {
- this.metricKey = metricKey;
- return this;
- }
-
- public Builder setOperator(String operator) {
- this.operator = operator;
- return this;
- }
-
- public Builder setWarning(@Nullable String warning) {
- this.warning = warning;
- return this;
- }
-
- public Builder setError(@Nullable String error) {
- this.error = error;
- return this;
- }
-
- public Builder setPeriod(@Nullable Integer period) {
- this.period = period;
- return this;
- }
-
- public UpdateConditionRequest build() {
- checkArgument(conditionId > 0, "Condition id is mandatory and must not be empty");
- checkArgument(!isNullOrEmpty(metricKey), "Metric key is mandatory and must not be empty");
- checkArgument(!isNullOrEmpty(operator), "Operator is mandatory and must not be empty");
- return new UpdateConditionRequest(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
index 2364a1dae50..30d6141fa5d 100644
--- 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
@@ -20,13 +20,13 @@
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.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;
@@ -118,7 +118,7 @@ public class QualityProfilesService extends BaseService {
SearchWsResponse.parser());
}
- public QualityProfiles.ShowResponse show(ShowRequest request) {
+ public Qualityprofiles.ShowResponse show(ShowRequest request) {
return call(
new GetRequest(path(ACTION_SHOW))
.setParam(PARAM_KEY, request.getKey())
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/root/RootsService.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/root/RootsService.java
index 833df7ae5d0..43b06b8a3e0 100644
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/root/RootsService.java
+++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/root/RootsService.java
@@ -19,7 +19,7 @@
*/
package org.sonarqube.ws.client.root;
-import org.sonarqube.ws.WsRoot;
+import org.sonarqube.ws.Root;
import org.sonarqube.ws.client.BaseService;
import org.sonarqube.ws.client.GetRequest;
import org.sonarqube.ws.client.PostRequest;
@@ -30,8 +30,8 @@ public class RootsService extends BaseService {
super(wsConnector, "api/roots");
}
- public WsRoot.SearchWsResponse search() {
- return call(new GetRequest(path("search")), WsRoot.SearchWsResponse.parser());
+ public Root.SearchWsResponse search() {
+ return call(new GetRequest(path("search")), Root.SearchWsResponse.parser());
}
public void setRoot(String login) {
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/system/SystemService.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/system/SystemServiceOld.java
index 916072d2157..949cec119da 100644
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/system/SystemService.java
+++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/system/SystemServiceOld.java
@@ -19,28 +19,28 @@
*/
package org.sonarqube.ws.client.system;
-import org.sonarqube.ws.WsSystem;
+import org.sonarqube.ws.System;
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 org.sonarqube.ws.client.WsResponse;
-public class SystemService extends BaseService {
- public SystemService(WsConnector wsConnector) {
+public class SystemServiceOld extends BaseService {
+ public SystemServiceOld(WsConnector wsConnector) {
super(wsConnector, "api/system");
}
- public WsSystem.HealthResponse health() {
- return call(new GetRequest(path("health")), WsSystem.HealthResponse.parser());
+ public System.HealthResponse health() {
+ return call(new GetRequest(path("health")), System.HealthResponse.parser());
}
public void restart() {
call(new PostRequest(path("restart")));
}
- public WsSystem.StatusResponse status() {
- return call(new GetRequest(path("status")), WsSystem.StatusResponse.parser());
+ public System.StatusResponse status() {
+ return call(new GetRequest(path("status")), System.StatusResponse.parser());
}
public void changeLogLevel(String level) {
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/user/UsersService.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/user/UsersService.java
index c8151dc9133..9f2cb3f06a0 100644
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/user/UsersService.java
+++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/user/UsersService.java
@@ -20,10 +20,10 @@
package org.sonarqube.ws.client.user;
import java.util.List;
-import org.sonarqube.ws.WsUsers.CreateWsResponse;
-import org.sonarqube.ws.WsUsers.CurrentWsResponse;
-import org.sonarqube.ws.WsUsers.GroupsWsResponse;
-import org.sonarqube.ws.WsUsers.SearchWsResponse;
+import org.sonarqube.ws.Users.CreateWsResponse;
+import org.sonarqube.ws.Users.CurrentWsResponse;
+import org.sonarqube.ws.Users.GroupsWsResponse;
+import org.sonarqube.ws.Users.SearchWsResponse;
import org.sonarqube.ws.client.BaseService;
import org.sonarqube.ws.client.GetRequest;
import org.sonarqube.ws.client.PostRequest;
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/usergroup/UserGroupsService.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/usergroup/UserGroupsService.java
index 6851ea3d8da..9cd0a388db7 100644
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/usergroup/UserGroupsService.java
+++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/usergroup/UserGroupsService.java
@@ -28,9 +28,9 @@ import static org.sonar.api.server.ws.WebService.Param.FIELDS;
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.TEXT_QUERY;
-import static org.sonarqube.ws.WsUserGroups.CreateWsResponse;
-import static org.sonarqube.ws.WsUserGroups.SearchWsResponse;
-import static org.sonarqube.ws.WsUserGroups.UpdateWsResponse;
+import static org.sonarqube.ws.UserGroups.CreateWsResponse;
+import static org.sonarqube.ws.UserGroups.SearchWsResponse;
+import static org.sonarqube.ws.UserGroups.UpdateWsResponse;
public class UserGroupsService extends BaseService {
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/usertoken/UserTokensService.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/usertoken/UserTokensService.java
index 39fdf987ddb..d3cd30a8be1 100644
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/usertoken/UserTokensService.java
+++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/usertoken/UserTokensService.java
@@ -19,8 +19,8 @@
*/
package org.sonarqube.ws.client.usertoken;
-import org.sonarqube.ws.WsUserTokens.GenerateWsResponse;
-import org.sonarqube.ws.WsUserTokens.SearchWsResponse;
+import org.sonarqube.ws.UserTokens.GenerateWsResponse;
+import org.sonarqube.ws.UserTokens.SearchWsResponse;
import org.sonarqube.ws.client.BaseService;
import org.sonarqube.ws.client.GetRequest;
import org.sonarqube.ws.client.PostRequest;
diff --git a/sonar-ws/src/main/protobuf/ws-batch.proto b/sonar-ws/src/main/protobuf/ws-batch.proto
deleted file mode 100644
index dec9005867d..00000000000
--- a/sonar-ws/src/main/protobuf/ws-batch.proto
+++ /dev/null
@@ -1,47 +0,0 @@
-// SonarQube, open source software quality management tool.
-// Copyright (C) 2008-2016 SonarSource
-// mailto:contact AT sonarsource DOT com
-//
-// SonarQube 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.
-//
-// SonarQube 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.
-
-syntax = "proto2";
-
-package sonarqube.ws.batch;
-
-option java_package = "org.sonarqube.ws";
-option java_outer_classname = "WsBatch";
-
-option optimize_for = SPEED;
-
-// WS batch/project
-message WsProjectResponse {
- optional int64 timestamp = 1;
- map<string, Settings> settingsByModule = 2;
- map<string, FileDataByPath> fileDataByModuleAndPath = 3;
- optional int64 lastAnalysisDate = 4;
-
- message Settings {
- map<string,string> settings = 1;
- }
-
- message FileDataByPath {
- map<string, FileData> FileDataByPath = 1;
- }
-
- message FileData {
- optional string hash = 1;
- optional string revision = 2;
- }
-}
diff --git a/sonar-ws/src/main/protobuf/ws-ce.proto b/sonar-ws/src/main/protobuf/ws-ce.proto
deleted file mode 100644
index d5785806121..00000000000
--- a/sonar-ws/src/main/protobuf/ws-ce.proto
+++ /dev/null
@@ -1,103 +0,0 @@
-// SonarQube, open source software quality management tool.
-// Copyright (C) 2008-2016 SonarSource
-// mailto:contact AT sonarsource DOT com
-//
-// SonarQube 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.
-//
-// SonarQube 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.
-
-syntax = "proto2";
-
-package sonarqube.ws.ce;
-
-import "ws-commons.proto";
-
-option java_package = "org.sonarqube.ws";
-option java_outer_classname = "WsCe";
-option optimize_for = SPEED;
-
-// POST api/ce/submit
-message SubmitResponse {
- optional string taskId = 1;
- optional string projectId = 2;
-}
-
-// GET api/ce/task
-message TaskResponse {
- optional Task task = 1;
-}
-
-// GET api/ce/activity
-message ActivityResponse {
- // paging has been deprecated in 5.5
- optional sonarqube.ws.commons.Paging unusedPaging = 1;
- repeated Task tasks = 2;
-}
-
-// GET api/ce/activity_status
-message ActivityStatusWsResponse {
- optional int32 pending = 1;
- optional int32 failing = 2;
- optional int32 inProgress = 3;
-}
-
-// GET api/ce/component
-message ProjectResponse {
- repeated Task queue = 1;
- optional Task current = 2;
-}
-
-// GET api/ce/task_types
-message TaskTypesWsResponse {
- repeated string taskTypes = 1;
-}
-
-// GET api/ce/worker_count
-message WorkerCountResponse {
- optional int32 value = 1;
- optional bool canSetWorkerCount = 2;
-}
-
-message Task {
- optional string id = 1;
- optional string type = 2;
- optional string componentId = 3;
- optional string componentKey = 4;
- optional string componentName = 5;
- optional string componentQualifier = 6;
- optional string analysisId = 7;
- optional TaskStatus status = 8;
- optional string submittedAt = 9;
- optional string submitterLogin = 10;
- optional string startedAt = 11;
- optional string executedAt = 12;
- optional bool isLastExecuted = 13;
- optional int64 executionTimeMs = 14;
- optional bool logs = 15;
- optional string errorMessage = 16;
- optional string errorStacktrace = 17;
- optional string scannerContext = 18;
- optional bool hasScannerContext = 19;
- optional string organization = 20;
- optional string branch = 21;
- optional sonarqube.ws.commons.BranchType branchType = 22;
- optional string errorType = 23;
-}
-
-enum TaskStatus {
- PENDING = 0;
- IN_PROGRESS = 1;
- SUCCESS = 2;
- FAILED = 3;
- CANCELED = 4;
-}
diff --git a/sonar-ws/src/main/protobuf/ws-commons.proto b/sonar-ws/src/main/protobuf/ws-commons.proto
deleted file mode 100644
index a9b566583e3..00000000000
--- a/sonar-ws/src/main/protobuf/ws-commons.proto
+++ /dev/null
@@ -1,124 +0,0 @@
-// SonarQube, open source software quality management tool.
-// Copyright (C) 2008-2016 SonarSource
-// mailto:contact AT sonarsource DOT com
-//
-// SonarQube 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.
-//
-// SonarQube 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.
-
-syntax = "proto2";
-
-package sonarqube.ws.commons;
-
-option java_package = "org.sonarqube.ws";
-option java_outer_classname = "Common";
-option optimize_for = SPEED;
-
-message Paging {
- optional int32 pageIndex = 1;
- optional int32 pageSize = 2;
- optional int32 total = 3;
-}
-
-message Facet {
- // kind of key
- optional string property = 1;
- repeated FacetValue values = 2;
-}
-
-message Facets {
- repeated Facet facets = 1;
-}
-
-message FacetValue {
- optional string val = 1;
- optional int64 count = 2;
-}
-
-enum Severity {
- INFO = 0;
- MINOR = 1;
- MAJOR = 2;
- CRITICAL = 3;
- BLOCKER = 4;
-}
-
-message Rule {
- optional string key = 1;
- optional string name = 2;
- optional string lang = 3;
- optional RuleStatus status = 4;
- optional string langName = 5;
-}
-
-message Rules {
- repeated Rule rules = 1;
-}
-
-enum RuleStatus {
- BETA = 0;
- DEPRECATED = 1;
- READY = 2;
- REMOVED = 3;
-}
-
-// Lines start at 1 and line offsets start at 0
-message TextRange {
- // Start line. Should never be absent
- optional int32 startLine = 1;
-
- // End line (inclusive). Absent means it is same as start line
- optional int32 endLine = 2;
-
- // If absent it means range starts at the first offset of start line
- optional int32 startOffset = 3;
-
- // If absent it means range ends at the last offset of end line
- optional int32 endOffset = 4;
-}
-
-message Metric {
- optional string key = 1;
- optional string name = 2;
- optional string description = 3;
- optional string domain = 4;
- optional string type = 5;
- optional bool higherValuesAreBetter = 6;
- optional bool qualitative = 7;
- optional bool hidden = 8;
- optional bool custom = 9;
- optional int32 decimalScale = 10;
- optional string bestValue = 11;
- optional string worstValue = 12;
-}
-
-enum RuleType {
- // Zero is required in order to not get MAINTAINABILITY as default value
- // See http://androiddevblog.com/protocol-buffers-pitfall-adding-enum-values/
- UNKNOWN = 0;
-
- // same name as in Java enum IssueType,
- // same index values as in database (see column ISSUES.ISSUE_TYPE)
- CODE_SMELL = 1;
- BUG = 2;
- VULNERABILITY = 3;
-}
-
-enum BranchType {
- // Zero is required in order to not get LONG as default value
- // See http://androiddevblog.com/protocol-buffers-pitfall-adding-enum-values/
- UNKNOWN_BRANCH_TYPE = 0;
-
- LONG = 1;
- SHORT = 2;
-}
diff --git a/sonar-ws/src/main/protobuf/ws-components.proto b/sonar-ws/src/main/protobuf/ws-components.proto
deleted file mode 100644
index 7b776586468..00000000000
--- a/sonar-ws/src/main/protobuf/ws-components.proto
+++ /dev/null
@@ -1,130 +0,0 @@
-// SonarQube, open source software quality management tool.
-// Copyright (C) 2008-2016 SonarSource
-// mailto:contact AT sonarsource DOT com
-//
-// SonarQube 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.
-//
-// SonarQube 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.
-
-syntax = "proto2";
-
-package sonarqube.ws.component;
-
-import "ws-commons.proto";
-
-option java_package = "org.sonarqube.ws";
-option java_outer_classname = "WsComponents";
-option optimize_for = SPEED;
-
-// WS api/components/search
-message SearchWsResponse {
- optional sonarqube.ws.commons.Paging paging = 1;
- repeated Component components = 2;
-}
-
-// WS api/components/tree
-message TreeWsResponse {
- optional sonarqube.ws.commons.Paging paging = 1;
- optional Component baseComponent = 3;
- repeated Component components = 4;
-}
-
-// WS api/components/show
-message ShowWsResponse {
- optional sonarqube.ws.commons.Paging paging = 1;
- optional Component component = 2;
- repeated Component ancestors = 3;
-}
-
-// WS api/components/suggestions
-message SuggestionsWsResponse {
- repeated Category results = 1;
- optional string warning = 2;
- repeated Organization organizations = 3;
- repeated Project projects = 4;
-
- message Category {
- optional string q = 1;
- repeated Suggestion items = 2;
- optional int64 more = 3;
- }
-
- message Suggestion {
- optional string key = 1;
- optional string name = 2;
- optional string match = 3;
- optional string organization = 4;
- optional string project = 5;
- optional bool isRecentlyBrowsed = 6;
- optional bool isFavorite = 7;
- }
-
- message Organization {
- optional string key = 1;
- optional string name = 2;
- }
-
- message Project {
- optional string key = 1;
- optional string name = 2;
- }
-}
-
-// WS api/components/search_projects
-message SearchProjectsWsResponse {
- optional sonarqube.ws.commons.Paging paging = 1;
- repeated Component components = 2;
- optional sonarqube.ws.commons.Facets facets = 3;
-}
-
-// WS api/components/provisioned
-message ProvisionedWsResponse {
- optional sonarqube.ws.commons.Paging paging = 1;
- repeated Component projects = 2;
-
- message Component {
- optional string uuid = 1;
- optional string key = 2;
- optional string name = 3;
- optional string creationDate = 4;
- optional string visibility = 5;
- }
-}
-
-message Component {
- optional string organization = 12;
- optional string id = 1;
- optional string key = 2;
- optional string refId = 3;
- optional string refKey = 4;
- optional string projectId = 5;
- optional string name = 6;
- optional string description = 7;
- optional string qualifier = 8;
- optional string path = 9;
- optional string language = 10;
- optional bool isFavorite = 11;
- optional string analysisDate = 13;
- optional Tags tags = 14;
- optional string visibility = 15;
- optional string leakPeriodDate = 16;
- // Root project key
- optional string project = 17;
- optional string branch = 18;
- optional string version = 19;
-
- message Tags {
- repeated string tags = 1;
- }
-}
-
diff --git a/sonar-ws/src/main/protobuf/ws-duplications.proto b/sonar-ws/src/main/protobuf/ws-duplications.proto
deleted file mode 100644
index 50f72a22ffd..00000000000
--- a/sonar-ws/src/main/protobuf/ws-duplications.proto
+++ /dev/null
@@ -1,55 +0,0 @@
-// SonarQube, open source software quality management tool.
-// Copyright (C) 2008-2016 SonarSource
-// mailto:contact AT sonarsource DOT com
-//
-// SonarQube 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.
-//
-// SonarQube 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.
-
-syntax = "proto3";
-
-package sonarqube.ws.duplication;
-
-option java_package = "org.sonarqube.ws";
-option java_outer_classname = "WsDuplications";
-option optimize_for = SPEED;
-
-// WS api/duplications/show
-message ShowResponse {
- repeated Duplication duplications = 1;
- map<string,File> files = 2;
-
-}
-
-message Duplication {
- repeated Block blocks = 1;
-}
-
-message Block {
- int32 from = 1;
- int32 size = 2;
- string _ref = 3;
-}
-
-message File {
- string key = 1;
- string name = 2;
- string uuid = 3;
- string project = 4;
- string projectUuid = 5;
- string projectName = 6;
- string subProject = 7;
- string subProjectUuid = 8;
- string subProjectName = 9;
- string branch = 10;
-}
diff --git a/sonar-ws/src/main/protobuf/ws-editions.proto b/sonar-ws/src/main/protobuf/ws-editions.proto
deleted file mode 100644
index e916bf39357..00000000000
--- a/sonar-ws/src/main/protobuf/ws-editions.proto
+++ /dev/null
@@ -1,60 +0,0 @@
-// SonarQube, open source software quality management tool.
-// Copyright (C) 2008-2016 SonarSource
-// mailto:contact AT sonarsource DOT com
-//
-// SonarQube 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.
-//
-// SonarQube 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.
-
-syntax = "proto2";
-
-package sonarqube.ws.editions;
-
-option java_package = "org.sonarqube.ws";
-option java_outer_classname = "WsEditions";
-option optimize_for = SPEED;
-
-// GET api/editions/status
-// POST api/editions/apply_license
-message StatusResponse {
- optional string currentEditionKey = 1;
- optional InstallationStatus installationStatus = 2;
- optional string nextEditionKey = 3;
- optional string installError = 4;
-}
-
-enum InstallationStatus {
- NONE = 0;
- AUTOMATIC_IN_PROGRESS = 1;
- AUTOMATIC_READY = 2;
- MANUAL_IN_PROGRESS = 3;
- UNINSTALL_IN_PROGRESS = 4;
-}
-
-// POST api/editions/preview
-message PreviewResponse {
- optional string nextEditionKey = 1;
- optional PreviewStatus previewStatus = 2;
-}
-
-enum PreviewStatus {
- NO_INSTALL = 0;
- AUTOMATIC_INSTALL = 1;
- MANUAL_INSTALL = 2;
-}
-
-// POST api/editions/form_data
-message FormDataResponse {
- optional string serverId = 1;
- optional int64 ncloc = 2;
-}
diff --git a/sonar-ws/src/main/protobuf/ws-favorites.proto b/sonar-ws/src/main/protobuf/ws-favorites.proto
deleted file mode 100644
index 7cdb6eceb94..00000000000
--- a/sonar-ws/src/main/protobuf/ws-favorites.proto
+++ /dev/null
@@ -1,40 +0,0 @@
-// SonarQube, open source software quality management tool.
-// Copyright (C) 2008-2016 SonarSource
-// mailto:contact AT sonarsource DOT com
-//
-// SonarQube 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.
-//
-// SonarQube 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.
-
-syntax = "proto2";
-
-package sonarqube.ws.favorite;
-
-import "ws-commons.proto";
-
-option java_package = "org.sonarqube.ws";
-option java_outer_classname = "Favorites";
-option optimize_for = SPEED;
-
-// WS api/favorites/search
-message SearchResponse {
- optional sonarqube.ws.commons.Paging paging = 1;
- repeated Favorite favorites = 2;
-}
-
-message Favorite {
- optional string organization = 4;
- optional string key = 1;
- optional string name = 2;
- optional string qualifier = 3;
-}
diff --git a/sonar-ws/src/main/protobuf/ws-issues.proto b/sonar-ws/src/main/protobuf/ws-issues.proto
deleted file mode 100644
index a1309679f58..00000000000
--- a/sonar-ws/src/main/protobuf/ws-issues.proto
+++ /dev/null
@@ -1,232 +0,0 @@
-// SonarQube, open source software quality management tool.
-// Copyright (C) 2008-2016 SonarSource
-// mailto:contact AT sonarsource DOT com
-//
-// SonarQube 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.
-//
-// SonarQube 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.
-
-syntax = "proto2";
-
-package sonarqube.ws.issues;
-
-import "ws-commons.proto";
-
-option java_package = "org.sonarqube.ws";
-option java_outer_classname = "Issues";
-option optimize_for = SPEED;
-
-// Response of GET api/issues/search
-message SearchWsResponse {
- optional int64 total = 1;
- optional int64 p = 2;
- optional int32 ps = 3;
- optional sonarqube.ws.commons.Paging paging = 4;
-
- // Total amount of effort, only when the facet "total" is enabled
- optional int64 effortTotal = 13;
- // Deprecated since 5.5, replaced by effortTotal
- optional int64 debtTotal = 5;
-
- repeated Issue issues = 6;
- repeated Component components = 7;
- optional sonarqube.ws.commons.Rules rules = 8;
- optional Users users = 9;
-
- // Deprecated since 5.5, action plan has been removed
- optional ActionPlans unusedActionPlans = 10;
- optional Languages languages = 11;
- optional sonarqube.ws.commons.Facets facets = 12;
-}
-
-// Response of most of POST/issues/{operation}, for instance assign, add_comment and set_severity
-message Operation {
- optional Issue issue = 1;
- repeated Component components = 2;
- repeated sonarqube.ws.commons.Rule rules = 3;
- repeated Users.User users = 4;
- // Deprecated since 5.5, action plan has been removed
- repeated ActionPlan unusedActionPlans = 5;
-}
-
-message Issue {
- optional string key = 1;
- optional string rule = 2;
- optional sonarqube.ws.commons.Severity severity = 3;
- optional string component = 4;
- optional int64 unusedComponentId = 5;
- optional string project = 6;
- optional string subProject = 7;
- optional int32 line = 8;
- optional string hash = 31;
- optional sonarqube.ws.commons.TextRange textRange = 9;
- repeated Flow flows = 10;
- optional string resolution = 11;
- optional string status = 12;
- optional string message = 13;
-
- optional string effort = 28;
- // Deprecated since 5.5, replaced by effort
- optional string debt = 14;
-
- optional string assignee = 15;
-
- // Unused since 5.5, manual issues feature has been removed
- optional string unusedReporter = 16;
-
- // SCM login of the committer who introduced the issue
- optional string author = 17;
-
- // Deprecated since 5.5, action plan has been removed
- optional string actionPlan = 18;
-
- repeated string tags = 19;
-
- // the transitions allowed for the requesting user.
- optional Transitions transitions = 20;
-
- // the actions allowed for the requesting user.
- optional Actions actions = 21;
-
- optional Comments comments = 22;
- optional string creationDate = 23;
- optional string updateDate = 24;
- optional string fUpdateAge = 25;
- optional string closeDate = 26;
-
- optional sonarqube.ws.commons.RuleType type = 27;
-
- optional string organization = 29;
- optional string branch = 30;
-}
-
-message Transitions {
- repeated string transitions = 1;
-}
-
-message Actions {
- repeated string actions = 1;
-}
-
-message Flow {
- repeated Location locations = 1;
-}
-
-message Location {
- optional string unusedComponentId = 1;
- // Only when component is a file. Can be empty for a file if this is an issue global to the file.
- optional sonarqube.ws.commons.TextRange textRange = 2;
- optional string msg = 3;
-}
-
-message Comment {
- optional string key = 1;
- optional string login = 2;
- // TODO drop, it's already in field "users"
- optional string email = 3;
- // TODO drop, it's already in field "users"
- optional string userName = 4;
- optional string htmlText = 5;
- // TODO rename markdownText ?
- optional string markdown = 6;
- optional bool updatable = 7;
- optional string createdAt = 8;
-}
-
-message Comments {
- repeated Comment comments = 1;
-}
-
-// Deprecated since 5.5
-message ActionPlan {
- optional string key = 1;
- optional string name = 2;
-
- // TODO define enum
- optional string status = 3;
- optional string deadLine = 4;
- // TODO to be renamed, is it id or key ?
- optional string project = 5;
-}
-
-// Deprecated since 5.5
-message ActionPlans {
- repeated ActionPlan actionPlans = 1;
-}
-
-message Language {
- optional string key = 1;
- optional string name = 2;
-}
-
-message Languages {
- repeated Language languages = 1;
-}
-
-message Component {
- optional string organization = 11;
- optional int64 deprecatedId = 1;
- optional string key = 2;
- optional string uuid = 3;
- optional bool enabled = 4;
- optional string qualifier = 5;
- optional string name = 6;
- optional string longName = 7;
- optional string path = 8;
- optional int64 unusedProjectId = 9;
- optional int64 unusedSubProjectId = 10;
- optional string branch = 12;
-}
-
-// Response of GET api/issues/changelog
-message ChangelogWsResponse {
- repeated Changelog changelog = 1;
-
- message Changelog {
- optional string user = 1;
- optional string userName = 2;
- // Email is no more returned since 6.3
- optional string deprecatedEmail = 3;
- optional string creationDate = 4;
- repeated Diff diffs = 5;
- optional string avatar = 6;
-
- message Diff {
- optional string key = 1;
- optional string newValue = 2;
- optional string oldValue = 3;
- }
- }
-}
-
-// Response of POST api/issues/bulk_change
-message BulkChangeWsResponse {
- optional int64 total = 1;
- optional int64 success = 2;
- optional int64 ignored = 3;
- optional int64 failures = 4;
-}
-
-message Users {
- repeated User users = 1;
-
- message User {
- optional string login = 1;
- optional string name = 2;
- optional string avatar = 3;
- optional bool active = 4;
- }
-}
-
-
-
diff --git a/sonar-ws/src/main/protobuf/ws-measures.proto b/sonar-ws/src/main/protobuf/ws-measures.proto
deleted file mode 100644
index 199184eda3b..00000000000
--- a/sonar-ws/src/main/protobuf/ws-measures.proto
+++ /dev/null
@@ -1,110 +0,0 @@
-// SonarQube, open source software quality management tool.
-// Copyright (C) 2008-2016 SonarSource
-// mailto:contact AT sonarsource DOT com
-//
-// SonarQube 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.
-//
-// SonarQube 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.
-
-syntax = "proto2";
-
-package sonarqube.ws.measures;
-
-import "ws-commons.proto";
-
-option java_package = "org.sonarqube.ws";
-option java_outer_classname = "WsMeasures";
-option optimize_for = SPEED;
-
-// WS api/measures/component_tree
-message ComponentTreeWsResponse {
- optional sonarqube.ws.commons.Paging paging = 1;
- optional Component baseComponent = 2;
- repeated Component components = 3;
- optional Metrics metrics = 4;
- optional Periods periods = 5;
-}
-
-// WS api/measures/component
-message ComponentWsResponse {
- optional Component component = 1;
- optional Metrics metrics = 2;
- optional Periods periods = 3;
-}
-
-// WS api/measures/search
-message SearchWsResponse {
- repeated Measure measures = 1;
-}
-
-// WS api/measures/search_history
-message SearchHistoryResponse {
- optional sonarqube.ws.commons.Paging paging = 1;
- repeated HistoryMeasure measures = 2;
-
- message HistoryMeasure {
- optional string metric = 1;
- repeated HistoryValue history = 2;
- }
-
- message HistoryValue {
- optional string date = 1;
- optional string value = 2;
- }
-}
-
-message Component {
- optional string id = 1;
- optional string key = 2;
- optional string refId = 3;
- optional string refKey = 4;
- optional string projectId = 5;
- optional string name = 6;
- optional string description = 7;
- optional string qualifier = 8;
- optional string path = 9;
- optional string language = 10;
- repeated Measure measures = 11;
- optional string branch = 12;
-}
-
-message Period {
- optional int32 index = 1;
- optional string mode = 2;
- optional string date = 3;
- optional string parameter = 4;
-}
-
-message Periods {
- repeated Period periods = 1;
-}
-
-message Metrics {
- repeated sonarqube.ws.commons.Metric metrics = 1;
-}
-
-message Measure {
- optional string metric = 1;
- optional string value = 2;
- optional PeriodsValue periods = 3;
- optional string component = 4;
-}
-
-message PeriodsValue {
- repeated PeriodValue periodsValue = 1;
-}
-
-message PeriodValue {
- optional int32 index = 1;
- optional string value = 2;
-}
diff --git a/sonar-ws/src/main/protobuf/ws-notifications.proto b/sonar-ws/src/main/protobuf/ws-notifications.proto
deleted file mode 100644
index ac0cb034748..00000000000
--- a/sonar-ws/src/main/protobuf/ws-notifications.proto
+++ /dev/null
@@ -1,41 +0,0 @@
-// SonarQube, open source software quality management tool.
-// Copyright (C) 2008-2016 SonarSource
-// mailto:contact AT sonarsource DOT com
-//
-// SonarQube 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.
-//
-// SonarQube 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.
-
-syntax = "proto2";
-
-package sonarqube.ws.notification;
-
-option java_package = "org.sonarqube.ws";
-option java_outer_classname = "Notifications";
-option optimize_for = SPEED;
-
-// WS api/notifications/list
-message ListResponse {
- repeated Notification notifications = 1;
- repeated string channels = 2;
- repeated string globalTypes = 3;
- repeated string perProjectTypes = 4;
-}
-
-message Notification {
- optional string channel = 1;
- optional string type = 2;
- optional string organization = 5;
- optional string project = 3;
- optional string projectName = 4;
-}
diff --git a/sonar-ws/src/main/protobuf/ws-organizations.proto b/sonar-ws/src/main/protobuf/ws-organizations.proto
deleted file mode 100644
index f6f2733c772..00000000000
--- a/sonar-ws/src/main/protobuf/ws-organizations.proto
+++ /dev/null
@@ -1,70 +0,0 @@
-// SonarQube, open source software quality management tool.
-// Copyright (C) 2008-2016 SonarSource
-// mailto:contact AT sonarsource DOT com
-//
-// SonarQube 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.
-//
-// SonarQube 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.
-
-syntax = "proto2";
-
-package sonarqube.ws.organizations;
-
-import "ws-commons.proto";
-
-option java_package = "org.sonarqube.ws";
-option java_outer_classname = "Organizations";
-option optimize_for = SPEED;
-
-// WS api/organizations/create
-message CreateWsResponse {
- optional Organization organization = 1;
-}
-
-// WS api/organizations/update
-message UpdateWsResponse {
- optional Organization organization = 1;
-}
-
-// WS api/organizations/search
-message SearchWsResponse {
- repeated Organization organizations = 1;
- optional sonarqube.ws.commons.Paging paging = 2;
-}
-
-// WS api/organizations/search_members
-message SearchMembersWsResponse {
- optional sonarqube.ws.commons.Paging paging = 1;
- repeated User users = 2;
-}
-
-// WS api/organizations/add_member
-message AddMemberWsResponse {
- optional User user = 1;
-}
-
-message Organization {
- optional string key = 1;
- optional string name = 2;
- optional string description = 3;
- optional string url = 4;
- optional string avatar = 5;
- optional bool guarded = 6;
-}
-
-message User {
- optional string login = 1;
- optional string name = 2;
- optional string avatar = 3;
- optional int32 groupCount = 4;
-}
diff --git a/sonar-ws/src/main/protobuf/ws-permissions.proto b/sonar-ws/src/main/protobuf/ws-permissions.proto
deleted file mode 100644
index 6b6b1e2e501..00000000000
--- a/sonar-ws/src/main/protobuf/ws-permissions.proto
+++ /dev/null
@@ -1,138 +0,0 @@
-// SonarQube, open source software quality management tool.
-// Copyright (C) 2008-2016 SonarSource
-// mailto:contact AT sonarsource DOT com
-//
-// SonarQube 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.
-//
-// SonarQube 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.
-
-syntax = "proto2";
-
-package sonarqube.ws.permissions;
-
-import "ws-commons.proto";
-
-option java_package = "org.sonarqube.ws";
-option java_outer_classname = "WsPermissions";
-option optimize_for = SPEED;
-
-// WS api/permissions/template_users for internal use only
-message OldUsersWsResponse {
- optional sonarqube.ws.commons.Paging paging = 1;
- repeated OldUser users = 2;
-}
-
-// WS api/permissions/users for internal use only
-message UsersWsResponse {
- optional sonarqube.ws.commons.Paging paging = 1;
- repeated User users = 2;
-}
-
-// WS api/permissions/groups for internal use only
-message WsGroupsResponse {
- optional sonarqube.ws.commons.Paging paging = 1;
- repeated Group groups = 2;
-}
-
-// WS api/permissions/template_groups for internal use only
-message WsTemplateGroupsResponse {
- optional sonarqube.ws.commons.Paging paging = 1;
- repeated OldGroup groups = 2;
-}
-
-message WsSearchGlobalPermissionsResponse {
- repeated Permission permissions = 1;
-}
-
-message SearchProjectPermissionsWsResponse {
- message Project {
- optional string id = 1;
- optional string key = 2;
- optional string qualifier = 3;
- optional string name = 4;
- repeated Permission permissions = 5;
- }
-
- optional sonarqube.ws.commons.Paging paging = 1;
- repeated Project projects = 2;
- repeated Permission permissions = 3;
-}
-
-message CreateTemplateWsResponse {
- optional PermissionTemplate permissionTemplate = 1;
-}
-
-message UpdateTemplateWsResponse {
- optional PermissionTemplate permissionTemplate = 1;
-}
-
-message SearchTemplatesWsResponse {
- message TemplateIdQualifier {
- optional string templateId = 1;
- optional string qualifier = 2;
- }
-
- repeated PermissionTemplate permissionTemplates = 1;
- repeated TemplateIdQualifier defaultTemplates = 2;
- repeated Permission permissions = 3;
-}
-
-message Permission {
- optional string key = 1;
- optional string name = 2;
- optional string description = 3;
- optional int32 usersCount = 4;
- optional int32 groupsCount = 5;
- optional bool withProjectCreator = 6;
-}
-
-message PermissionTemplate {
- optional string id = 1;
- optional string name = 2;
- optional string description = 3;
- optional string projectKeyPattern = 4;
- // ex: 2015-08-25T16:18:48+0200
- optional string createdAt = 5;
- // ex: 2015-08-25T16:18:48+0200
- optional string updatedAt = 6;
- repeated Permission permissions = 7;
-}
-
-message OldUser {
- optional string login = 1;
- optional string name = 2;
- optional string email = 3;
- optional bool selected = 4;
-}
-
-message User {
- optional string login = 1;
- optional string name = 2;
- optional string email = 3;
- repeated string permissions = 4;
- optional string avatar = 5;
-}
-
-message OldGroup {
- optional string id = 1;
- optional string name = 2;
- optional string description = 3;
- optional bool selected = 4;
-}
-
-message Group {
- optional string id = 1;
- optional string name = 2;
- optional string description = 3;
- repeated string permissions = 4;
-}
diff --git a/sonar-ws/src/main/protobuf/ws-project_tags.proto b/sonar-ws/src/main/protobuf/ws-project_tags.proto
deleted file mode 100644
index 99cc43c2e10..00000000000
--- a/sonar-ws/src/main/protobuf/ws-project_tags.proto
+++ /dev/null
@@ -1,30 +0,0 @@
-// SonarQube, open source software quality management tool.
-// Copyright (C) 2008-2016 SonarSource
-// mailto:contact AT sonarsource DOT com
-//
-// SonarQube 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.
-//
-// SonarQube 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.
-
-syntax = "proto3";
-
-package sonarqube.ws.projects;
-
-option java_package = "org.sonarqube.ws";
-option java_outer_classname = "WsProjectTags";
-option optimize_for = SPEED;
-
-// Response for api/project_tags/search
-message SearchResponse {
- repeated string tags = 1;
-}
diff --git a/sonar-ws/src/main/protobuf/ws-projectanalyses.proto b/sonar-ws/src/main/protobuf/ws-projectanalyses.proto
deleted file mode 100644
index 3b4ea562bb9..00000000000
--- a/sonar-ws/src/main/protobuf/ws-projectanalyses.proto
+++ /dev/null
@@ -1,57 +0,0 @@
-// SonarQube, open source software quality management tool.
-// Copyright (C) 2008-2016 SonarSource
-// mailto:contact AT sonarsource DOT com
-//
-// SonarQube 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.
-//
-// SonarQube 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.
-
-syntax = "proto2";
-
-package sonarqube.ws.projectanalysis;
-
-import "ws-commons.proto";
-
-option java_package = "org.sonarqube.ws";
-option java_outer_classname = "ProjectAnalyses";
-option optimize_for = SPEED;
-
-// WS api/project_analyses/create_event
-message CreateEventResponse {
- optional Event event = 1;
-}
-
-// WS api/project_analyses/update_event
-message UpdateEventResponse {
- optional Event event = 1;
-}
-
-// WS api/project_analyses/search
-message SearchResponse {
- optional sonarqube.ws.commons.Paging paging = 1;
- repeated Analysis analyses = 2;
-}
-
-message Event {
- optional string key = 1;
- optional string analysis = 2;
- optional string category = 3;
- optional string name = 4;
- optional string description = 5;
-}
-
-message Analysis {
- optional string key = 1;
- optional string date = 2;
- repeated Event events = 3;
-}
diff --git a/sonar-ws/src/main/protobuf/ws-projectbranches.proto b/sonar-ws/src/main/protobuf/ws-projectbranches.proto
deleted file mode 100644
index d4b2a183e4e..00000000000
--- a/sonar-ws/src/main/protobuf/ws-projectbranches.proto
+++ /dev/null
@@ -1,60 +0,0 @@
-// SonarQube, open source software quality management tool.
-// Copyright (C) 2008-2016 SonarSource
-// mailto:contact AT sonarsource DOT com
-//
-// SonarQube 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.
-//
-// SonarQube 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.
-
-syntax = "proto2";
-
-package sonarqube.ws.projectbranch;
-
-option java_package = "org.sonarqube.ws";
-option java_outer_classname = "WsBranches";
-option optimize_for = SPEED;
-
-import "ws-commons.proto";
-
-// WS api/project_branches/list
-message ListWsResponse {
- repeated Branch branches = 1;
-}
-
-// WS api/project_branches/show
-message ShowWsResponse {
- optional Branch branch = 1;
-}
-
-message Branch {
- optional string name = 1;
- optional bool isMain = 2;
- optional sonarqube.ws.commons.BranchType type = 3;
- // Merge branch is only present for short living branch
- optional string mergeBranch = 4;
- optional Status status = 5;
- optional bool isOrphan = 6;
- optional string analysisDate = 7;
-
- message Status {
- // Quality gate status is only present for long living branch
- optional string qualityGateStatus = 1;
- // Merge bugs, vulnerabilities and codeSmell are only present for short living branch
- optional int64 bugs = 2;
- optional int64 vulnerabilities = 3;
- optional int64 codeSmells = 4;
- }
-
-}
-
-
diff --git a/sonar-ws/src/main/protobuf/ws-projectlink.proto b/sonar-ws/src/main/protobuf/ws-projectlink.proto
deleted file mode 100644
index 073b3e498b0..00000000000
--- a/sonar-ws/src/main/protobuf/ws-projectlink.proto
+++ /dev/null
@@ -1,23 +0,0 @@
-syntax = "proto2";
-
-package sonarqube.ws.projectlink;
-
-option java_package = "org.sonarqube.ws";
-option java_outer_classname = "WsProjectLinks";
-option optimize_for = SPEED;
-
-// WS api/project_links/list
-message SearchWsResponse {
- repeated Link links = 1;
-}
-
-message CreateWsResponse {
- optional Link link = 1;
-}
-
-message Link {
- optional string id = 1;
- optional string name = 2;
- optional string type = 3;
- optional string url = 4;
-} \ No newline at end of file
diff --git a/sonar-ws/src/main/protobuf/ws-projects.proto b/sonar-ws/src/main/protobuf/ws-projects.proto
deleted file mode 100644
index 8668ffc355a..00000000000
--- a/sonar-ws/src/main/protobuf/ws-projects.proto
+++ /dev/null
@@ -1,86 +0,0 @@
-// SonarQube, open source software quality management tool.
-// Copyright (C) 2008-2016 SonarSource
-// mailto:contact AT sonarsource DOT com
-//
-// SonarQube 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.
-//
-// SonarQube 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.
-
-syntax = "proto2";
-
-package sonarqube.ws.projects;
-
-import "ws-commons.proto";
-
-option java_package = "org.sonarqube.ws";
-option java_outer_classname = "WsProjects";
-option optimize_for = SPEED;
-
-message SearchMyProjectsWsResponse {
- message Project {
- optional string id = 1;
- optional string key = 2;
- optional string name = 4;
- optional string description = 5;
- optional string lastAnalysisDate = 6;
- optional string qualityGate = 7;
- repeated Link links = 8;
- }
-
- message Link {
- optional string name = 1;
- optional string type = 2;
- optional string href = 3;
- }
-
- optional sonarqube.ws.commons.Paging paging = 1;
- repeated Project projects = 2;
-}
-
-message CreateWsResponse {
- optional Project project = 1;
-
- message Project {
- optional string key = 1;
- optional string name = 2;
- optional string qualifier = 3;
- optional string visibility = 4;
- }
-}
-
-// WS api/projects/search
-message SearchWsResponse {
- optional sonarqube.ws.commons.Paging paging = 1;
- repeated Component components = 2;
-
- message Component {
- optional string organization = 1;
- optional string id = 2;
- optional string key = 3;
- optional string name = 4;
- optional string qualifier = 5;
- optional string visibility = 6;
- optional string lastAnalysisDate = 7;
- }
-}
-
-// WS api/projects/prepare_bulk_update_key
-message BulkUpdateKeyWsResponse {
- repeated Key keys = 1;
-
- message Key {
- optional string key = 1;
- optional string newKey = 2;
- optional bool duplicate = 3;
- }
-}
diff --git a/sonar-ws/src/main/protobuf/ws-qualitygates.proto b/sonar-ws/src/main/protobuf/ws-qualitygates.proto
deleted file mode 100644
index 8444dbac729..00000000000
--- a/sonar-ws/src/main/protobuf/ws-qualitygates.proto
+++ /dev/null
@@ -1,122 +0,0 @@
-// SonarQube, open source software quality management tool.
-// Copyright (C) 2008-2016 SonarSource
-// mailto:contact AT sonarsource DOT com
-//
-// SonarQube 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.
-//
-// SonarQube 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.
-
-syntax = "proto2";
-
-package sonarqube.ws.qualitygate;
-
-option java_package = "org.sonarqube.ws";
-option java_outer_classname = "WsQualityGates";
-option optimize_for = SPEED;
-
-// GET api/qualitygates/project_status
-message ProjectStatusWsResponse {
- optional ProjectStatus projectStatus = 1;
-
- message ProjectStatus {
- optional Status status = 1;
- repeated Condition conditions = 2;
- repeated Period periods = 3;
- optional bool ignoredConditions = 4;
- }
-
- message Condition {
- optional Status status = 1;
- optional string metricKey = 2;
- optional Comparator comparator = 3;
- optional int32 periodIndex = 4;
- optional string warningThreshold = 5;
- optional string errorThreshold = 6;
- optional string actualValue = 7;
- }
-
- message Period {
- optional int32 index = 1;
- optional string mode = 2;
- optional string date = 3;
- optional string parameter = 4;
- }
-
- enum Status {
- OK = 1;
- WARN = 2;
- ERROR = 3;
- NONE = 4;
- }
-
- enum Comparator {
- GT = 1;
- LT = 2;
- EQ = 3;
- NE = 4;
- }
-}
-
-// GET api/qualitygates/get_by_project
-message GetByProjectWsResponse {
- optional QualityGate qualityGate = 1;
-}
-
-message QualityGate {
- optional string id = 1;
- optional string name = 2;
- optional bool default = 3;
-}
-
-// GET api/qualitygates/app
-message AppWsResponse {
- optional bool edit = 1;
- repeated Metric metrics = 3;
-
- message Metric {
- optional string key = 1;
- optional string name = 2;
- optional string type = 3;
- optional string domain = 4;
- optional bool hidden = 5;
- }
-}
-
-// POST api/qualitygates/create
-message CreateWsResponse {
- optional int64 id = 1;
- optional string name = 2;
-}
-
-// POST api/qualitygates/create_condition
-message CreateConditionWsResponse {
- optional int64 id = 1;
- optional string metric = 2;
- optional string op = 3;
- optional string warning = 4;
- optional string error = 5;
- optional int32 period = 6;
-}
-
-// POST api/qualitygates/update_condition
-message UpdateConditionWsResponse {
- optional int64 id = 1;
- optional string metric = 2;
- optional string op = 3;
- optional string warning = 4;
- optional string error = 5;
- optional int32 period = 6;
-}
-
-
-
diff --git a/sonar-ws/src/main/protobuf/ws-qualityprofiles.proto b/sonar-ws/src/main/protobuf/ws-qualityprofiles.proto
deleted file mode 100644
index ae1097dd5b5..00000000000
--- a/sonar-ws/src/main/protobuf/ws-qualityprofiles.proto
+++ /dev/null
@@ -1,169 +0,0 @@
-// SonarQube, open source software quality management tool.
-// Copyright (C) 2008-2016 SonarSource
-// mailto:contact AT sonarsource DOT com
-//
-// SonarQube 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.
-//
-// SonarQube 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.
-
-syntax = "proto2";
-
-package sonarqube.ws.qualityprofiles;
-
-import "ws-commons.proto";
-
-option java_package = "org.sonarqube.ws";
-option java_outer_classname = "QualityProfiles";
-option optimize_for = SPEED;
-
-// WS api/qualityprofiles/search
-message SearchWsResponse {
- repeated QualityProfile profiles = 1;
- optional Actions actions = 2;
-
- message QualityProfile {
- optional string key = 1;
- optional string name = 2;
- optional string language = 3;
- optional string languageName = 4;
- optional bool isInherited = 5;
- optional string parentKey = 6;
- optional string parentName = 7;
- optional bool isDefault = 8;
- optional int64 activeRuleCount = 9;
- optional int64 activeDeprecatedRuleCount = 12;
- optional int64 projectCount = 10;
- optional string rulesUpdatedAt = 11;
- optional string lastUsed = 13;
- optional string userUpdatedAt = 14;
- optional string organization = 15;
- optional bool isBuiltIn = 16;
- optional Actions actions = 17;
-
- message Actions {
- optional bool edit = 1;
- optional bool setAsDefault = 2;
- optional bool copy = 3;
- }
- }
-
- message Actions {
- optional bool create = 1;
- }
-}
-
-// WS api/qualityprofiles/create
-message CreateWsResponse {
- optional QualityProfile profile = 1;
-
- message QualityProfile {
- optional string key = 1;
- optional string name = 2;
- optional string language = 3;
- optional string languageName = 4;
- optional bool isInherited = 5;
- optional bool isDefault = 6;
- optional Infos infos = 7;
- optional Warnings warnings = 8;
- optional string organization = 9;
-
- message Infos {
- repeated string infos = 1;
- }
-
- message Warnings {
- repeated string warnings = 1;
- }
- }
-}
-
-// WS api/qualityprofiles/inheritance
-message InheritanceWsResponse {
- optional QualityProfile profile = 1;
- repeated QualityProfile ancestors = 2;
- repeated QualityProfile children = 3;
-
- message QualityProfile {
- optional string key = 1;
- optional string name = 2;
- optional string parent = 3;
- optional int64 activeRuleCount = 4;
- optional int64 overridingRuleCount = 5;
- optional bool isBuiltIn = 6;
- }
-}
-
-// WS api/qualityprofiles/copy
-message CopyWsResponse {
- optional string key = 1;
- optional string name = 2;
- optional string language = 3;
- optional string languageName = 4;
- optional bool isDefault = 5;
- optional bool isInherited = 6;
- optional string parentKey = 7;
-}
-
-// WS api/qualityprofiles/show
-message ShowResponse {
- optional QualityProfile profile = 1;
- optional CompareToSonarWay compareToSonarWay = 2;
-
- message QualityProfile {
- optional string key = 1;
- optional string name = 2;
- optional string language = 3;
- optional string languageName = 4;
- optional bool isInherited = 5;
- optional bool isDefault = 6;
- optional int64 activeRuleCount = 7;
- optional int64 activeDeprecatedRuleCount = 8;
- optional int64 projectCount = 9;
- optional string rulesUpdatedAt = 10;
- optional string lastUsed = 11;
- optional string userUpdatedAt = 12;
- optional string organization = 13;
- optional bool isBuiltIn = 14;
- }
-
- message CompareToSonarWay {
- optional string profile = 1;
- optional string profileName = 2;
- optional int64 missingRuleCount = 3;
- }
-}
-
-// WS api/qualityprofiles/search_users
-message SearchUsersResponse {
- optional sonarqube.ws.commons.Paging paging = 1;
- repeated User users = 2;
-
- message User {
- optional string login = 1;
- optional string name = 2;
- optional string avatar = 3;
- optional bool selected = 4;
- }
-}
-
-// WS api/qualityprofiles/search_groups
-message SearchGroupsResponse {
- optional sonarqube.ws.commons.Paging paging = 1;
- repeated Group groups = 2;
-
- message Group {
- optional string name = 1;
- optional string description = 2;
- optional bool selected = 3;
- }
-}
diff --git a/sonar-ws/src/main/protobuf/ws-root.proto b/sonar-ws/src/main/protobuf/ws-root.proto
deleted file mode 100644
index 1501a70d793..00000000000
--- a/sonar-ws/src/main/protobuf/ws-root.proto
+++ /dev/null
@@ -1,36 +0,0 @@
-// SonarQube, open source software quality management tool.
-// Copyright (C) 2008-2016 SonarSource
-// mailto:contact AT sonarsource DOT com
-//
-// SonarQube 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.
-//
-// SonarQube 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.
-
-syntax = "proto2";
-
-package sonarqube.ws.root;
-
-option java_package = "org.sonarqube.ws";
-option java_outer_classname = "WsRoot";
-option optimize_for = SPEED;
-
-// WS api/root/search
-message SearchWsResponse {
- repeated Root roots = 1;
-}
-
-message Root {
- optional string login = 1;
- optional string name = 2;
- optional string email = 3;
-}
diff --git a/sonar-ws/src/main/protobuf/ws-rules.proto b/sonar-ws/src/main/protobuf/ws-rules.proto
deleted file mode 100644
index d3dfe2cd826..00000000000
--- a/sonar-ws/src/main/protobuf/ws-rules.proto
+++ /dev/null
@@ -1,177 +0,0 @@
-// SonarQube, open source software quality management tool.
-// Copyright (C) 2008-2016 SonarSource
-// mailto:contact AT sonarsource DOT com
-//
-// SonarQube 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.
-//
-// SonarQube 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.
-
-syntax = "proto2";
-
-package sonarqube.ws.rules;
-
-import "ws-commons.proto";
-
-option java_package = "org.sonarqube.ws";
-option java_outer_classname = "Rules";
-option optimize_for = SPEED;
-
-// WS api/rules/list for internal use only
-message ListResponse {
-
- message Rule {
- optional string repository = 1;
- optional string key = 2;
- optional string internal_key = 3;
- optional string name = 4;
- }
-
- repeated Rule rules = 1;
-}
-
-// WS api/rules/search
-message SearchResponse {
- optional int64 total = 1;
- optional int32 p = 2;
- optional int64 ps = 3;
- repeated Rule rules = 4;
- optional Actives actives = 5;
- optional QProfiles qProfiles = 6;
- optional sonarqube.ws.commons.Facets facets = 7;
-}
-
-//WS api/rules/show
-message ShowResponse {
- optional Rule rule = 1;
- repeated Active actives = 3;
-}
-
-//WS api/rules/create
-message CreateResponse {
- optional Rule rule = 1;
-}
-
-//WS api/rules/update
-message UpdateResponse {
- optional Rule rule = 1;
-}
-
-message Rule {
- optional string key = 1;
- optional string repo = 2;
- optional string name = 3;
- optional string createdAt = 4;
- optional string htmlDesc = 5;
- optional string htmlNote = 6;
- optional string mdDesc = 7;
- optional string mdNote = 8;
- optional string noteLogin = 9;
- optional string severity = 10;
- optional sonarqube.ws.commons.RuleStatus status = 11;
- optional string internalKey = 12;
- optional bool isTemplate = 13;
- optional string templateKey = 14;
- optional Tags tags = 15;
- optional SysTags sysTags = 16;
- optional string lang = 19;
- optional string langName = 20;
- optional Params params = 21;
- // characteristic fields, unsupported since 5.5
- optional string unusedDefaultDebtChar = 23;
- optional string unusedDefaultDebtSubChar = 24;
- optional string unusedDebtChar = 25;
- optional string unusedDebtSubChar = 26;
- optional string unusedDebtCharName = 27;
- optional string unusedDebtSubCharName = 28;
-
- // Deprecated since 5.5, replaced by defaultRemFnType
- optional string defaultDebtRemFnType = 29;
- // Deprecated since 5.5, replaced by defaultRemFnGapMultiplier
- optional string defaultDebtRemFnCoeff = 30;
- // Deprecated since 5.5, replaced by defaultRemFnBaseEffort
- optional string defaultDebtRemFnOffset = 31;
- // Deprecated since 5.5, replaced by gapDescription
- optional string effortToFixDescription = 32;
- // Deprecated since 5.5, replaced by remFnOverloaded
- optional bool debtOverloaded = 33;
- // Deprecated since 5.5, replaced by remFnType
- optional string debtRemFnType = 34;
- // Deprecated since 5.5, replaced by remFnGapMultiplier
- optional string debtRemFnCoeff = 35;
- // Deprecated since 5.5, replaced by remFnBaseEffort
- optional string debtRemFnOffset = 36;
-
- optional string defaultRemFnType = 38;
- optional string defaultRemFnGapMultiplier = 39;
- optional string defaultRemFnBaseEffort = 40;
- optional string remFnType = 41;
- optional string remFnGapMultiplier = 42;
- optional string remFnBaseEffort = 43;
- optional bool remFnOverloaded = 45;
- optional string gapDescription = 44;
-
- optional sonarqube.ws.commons.RuleType type = 37;
-
- message Params {
- repeated Param params = 1;
- }
-
- message Param {
- optional string key = 1;
- optional string htmlDesc = 2;
- optional string defaultValue = 3;
- optional string type = 4;
- }
-}
-
-message SysTags {
- repeated string sysTags = 1;
-}
-
-message Tags {
- repeated string tags = 1;
-}
-
-message Actives {
- map<string, ActiveList> actives = 1;
-}
-
-message ActiveList {
- repeated Active activeList = 1;
-}
-
-message Active {
- optional string qProfile = 1;
- optional string inherit = 2;
- optional string severity = 3;
- // Unused since 5.6, it has been removed because it was never used and costly to compute
- optional string unusedParent = 4;
- repeated Param params = 5;
- optional string createdAt = 6;
-
- message Param {
- optional string key = 1;
- optional string value = 2;
- }
-}
-
-message QProfiles {
- map<string,QProfile> qProfiles = 1;
-}
-
-message QProfile {
- optional string name = 1;
- optional string lang = 2;
- optional string langName = 3;
- optional string parent = 4;
-}
diff --git a/sonar-ws/src/main/protobuf/ws-settings.proto b/sonar-ws/src/main/protobuf/ws-settings.proto
deleted file mode 100644
index db185b54446..00000000000
--- a/sonar-ws/src/main/protobuf/ws-settings.proto
+++ /dev/null
@@ -1,119 +0,0 @@
-// SonarQube, open source software quality management tool.
-// Copyright (C) 2008-2016 SonarSource
-// mailto:contact AT sonarsource DOT com
-//
-// SonarQube 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.
-//
-// SonarQube 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.
-
-syntax = "proto3";
-
-package sonarqube.ws.settings;
-
-option java_package = "org.sonarqube.ws";
-option java_outer_classname = "Settings";
-option optimize_for = SPEED;
-
-// Response of GET api/settings/list_definitions
-message ListDefinitionsWsResponse {
- repeated Definition definitions = 1;
-}
-
-// Response of GET api/settings/encrypt
-message EncryptWsResponse {
- string encryptedValue = 1;
-}
-
-// Response of GET api/settings/generate_secret_key
-message GenerateSecretKeyWsResponse {
- string secretKey = 1;
-}
-
-// Response of GET api/settings/check_secret_key
-message CheckSecretKeyWsResponse {
- bool secretKeyAvailable = 1;
-}
-
-message Definition {
- string key = 1;
- oneof nameOneOf {string name = 2;}
- string description = 3;
- Type type = 4;
- oneof categoryOneOf {string category = 5;}
- oneof subCategoryOneOf {string subCategory = 6;}
- oneof defaultValueOneOf {string defaultValue = 7;}
- bool multiValues = 8;
- repeated string options = 9;
- repeated Field fields = 10;
- oneof deprecatedKeyOneOf {string deprecatedKey = 11;}
-}
-
-message Field {
- string key = 1;
- string name = 2;
- string description = 3;
- Type type = 4;
- repeated string options = 5;
-}
-
-enum Type {
- STRING = 0;
- TEXT = 1;
- PASSWORD = 2;
- BOOLEAN = 3;
- INTEGER = 4;
- FLOAT = 5;
- LONG = 6;
- REGULAR_EXPRESSION = 7;
- METRIC = 8;
- USER_LOGIN = 9;
- METRIC_LEVEL = 10;
- SINGLE_SELECT_LIST = 11;
- PROPERTY_SET = 12;
- LICENSE = 13;
-}
-
-// Response of GET api/settings/values
-message ValuesWsResponse {
- repeated Setting settings = 1;
-}
-
-message Setting {
- string key = 1;
- oneof valueOneOf {
- string value = 2;
- Values values = 3;
- FieldValues fieldValues = 4;
- }
- bool inherited = 5;
- oneof parentValueOneOf {
- string parentValue = 6;
- Values parentValues = 7;
- FieldValues parentFieldValues = 8;
- }
-}
-
-message Values {
- repeated string values = 1;
-}
-
-message FieldValues {
- repeated Value fieldValues = 1;
-
- message Value {
- map<string, string> value = 1;
- }
-}
-
-
-
diff --git a/sonar-ws/src/main/protobuf/ws-system.proto b/sonar-ws/src/main/protobuf/ws-system.proto
deleted file mode 100644
index 5a6cddfe4e8..00000000000
--- a/sonar-ws/src/main/protobuf/ws-system.proto
+++ /dev/null
@@ -1,77 +0,0 @@
-// SonarQube, open source software quality management tool.
-// Copyright (C) 2008-2016 SonarSource
-// mailto:contact AT sonarsource DOT com
-//
-// SonarQube 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.
-//
-// SonarQube 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.
-
-syntax = "proto2";
-
-package sonarqube.ws.system;
-
-option java_package = "org.sonarqube.ws";
-option java_outer_classname = "WsSystem";
-option optimize_for = SPEED;
-
-// GET api/system/health
-message HealthResponse {
- optional Health health = 1;
- repeated Cause causes = 2;
- optional Nodes nodes = 3;
-}
-
-message Nodes {
- repeated Node nodes = 1;
-}
-
-// GET api/system/status
-message StatusResponse {
- optional string id = 1;
- optional string version = 2;
- optional Status status = 3;
-}
-
-message Cause {
- optional string message = 1;
-}
-
-enum Health {
- GREEN = 0;
- YELLOW = 1;
- RED = 2;
-}
-
-enum Status {
- STARTING = 0;
- UP = 1;
- DOWN = 2;
- RESTARTING = 3;
- DB_MIGRATION_NEEDED = 4;
- DB_MIGRATION_RUNNING = 5;
-}
-
-message Node {
- optional string name = 1;
- optional NodeType type = 2;
- optional string host = 3;
- optional int32 port = 4;
- optional string startedAt = 5;
- optional Health health = 6;
- repeated Cause causes = 7;
-}
-
-enum NodeType {
- APPLICATION = 0;
- SEARCH = 1;
-}
diff --git a/sonar-ws/src/main/protobuf/ws-tests.proto b/sonar-ws/src/main/protobuf/ws-tests.proto
deleted file mode 100644
index 5138b369cdd..00000000000
--- a/sonar-ws/src/main/protobuf/ws-tests.proto
+++ /dev/null
@@ -1,68 +0,0 @@
-// SonarQube, open source software quality management tool.
-// Copyright (C) 2008-2016 SonarSource
-// mailto:contact AT sonarsource DOT com
-//
-// SonarQube 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.
-//
-// SonarQube 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.
-
-syntax = "proto2";
-
-package sonarqube.ws.tests;
-
-import "ws-commons.proto";
-
-option java_package = "org.sonarqube.ws";
-option java_outer_classname = "WsTests";
-option optimize_for = SPEED;
-
-// WS api/tests/list
-message ListResponse {
- optional sonarqube.ws.commons.Paging paging = 1;
- repeated Test tests = 2;
-}
-
-// WS api/tests/covered_files
-message CoveredFilesResponse {
- repeated CoveredFile files = 1;
-
- message CoveredFile {
- optional string id = 1;
- optional string key = 2;
- optional string longName = 3;
- optional int32 coveredLines = 4;
- optional string branch = 5;
- }
-}
-
-
-message Test {
- optional string id = 1;
- optional string name = 2;
- optional string fileId = 3;
- optional string fileKey = 4;
- optional string fileName = 5;
- optional TestStatus status = 6;
- optional int64 durationInMs = 7;
- optional int32 coveredLines = 8;
- optional string message = 9;
- optional string stacktrace = 10;
- optional string fileBranch = 11;
-}
-
-enum TestStatus {
- OK = 1;
- FAILURE = 2;
- ERROR = 3;
- SKIPPED = 4;
-}
diff --git a/sonar-ws/src/main/protobuf/ws-user_groups.proto b/sonar-ws/src/main/protobuf/ws-user_groups.proto
deleted file mode 100644
index 25c7704ce9f..00000000000
--- a/sonar-ws/src/main/protobuf/ws-user_groups.proto
+++ /dev/null
@@ -1,52 +0,0 @@
-// SonarQube, open source software quality management tool.
-// Copyright (C) 2008-2016 SonarSource
-// mailto:contact AT sonarsource DOT com
-//
-// SonarQube 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.
-//
-// SonarQube 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.
-
-syntax = "proto2";
-
-package sonarqube.ws.usergroup;
-
-import "ws-commons.proto";
-
-option java_package = "org.sonarqube.ws";
-option java_outer_classname = "WsUserGroups";
-option optimize_for = SPEED;
-
-// WS api/user_groups/create
-message CreateWsResponse {
- optional Group group = 1;
-}
-
-// WS api/user_groups/update
-message UpdateWsResponse {
- optional Group group = 1;
-}
-
-// WS api/user_groups/search
-message SearchWsResponse {
- optional sonarqube.ws.commons.Paging paging = 1;
- repeated Group groups = 2;
-}
-
-message Group {
- optional int64 id = 1;
- optional string organization = 2;
- optional string name = 3;
- optional string description = 4;
- optional int32 membersCount = 5;
- optional bool default = 6;
-}
diff --git a/sonar-ws/src/main/protobuf/ws-user_tokens.proto b/sonar-ws/src/main/protobuf/ws-user_tokens.proto
deleted file mode 100644
index f1e1ae4311a..00000000000
--- a/sonar-ws/src/main/protobuf/ws-user_tokens.proto
+++ /dev/null
@@ -1,43 +0,0 @@
-// SonarQube, open source software quality management tool.
-// Copyright (C) 2008-2016 SonarSource
-// mailto:contact AT sonarsource DOT com
-//
-// SonarQube 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.
-//
-// SonarQube 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.
-
-syntax = "proto2";
-
-package sonarqube.ws.usertoken;
-
-option java_package = "org.sonarqube.ws";
-option java_outer_classname = "WsUserTokens";
-option optimize_for = SPEED;
-
-// WS api/user_tokens/generate
-message GenerateWsResponse {
- optional string login = 1;
- optional string name = 2;
- optional string token = 3;
-}
-
-// WS api/user_tokens/search
-message SearchWsResponse {
- optional string login = 1;
- repeated UserToken userTokens = 2;
-
- message UserToken {
- optional string name = 1;
- optional string createdAt = 2;
- }
-}
diff --git a/sonar-ws/src/main/protobuf/ws-users.proto b/sonar-ws/src/main/protobuf/ws-users.proto
deleted file mode 100644
index cf5a9d96456..00000000000
--- a/sonar-ws/src/main/protobuf/ws-users.proto
+++ /dev/null
@@ -1,116 +0,0 @@
-// SonarQube, open source software quality management tool.
-// Copyright (C) 2008-2016 SonarSource
-// mailto:contact AT sonarsource DOT com
-//
-// SonarQube 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.
-//
-// SonarQube 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.
-
-syntax = "proto2";
-
-package sonarqube.ws.users;
-
-import "ws-commons.proto";
-
-option java_package = "org.sonarqube.ws";
-option java_outer_classname = "WsUsers";
-option optimize_for = SPEED;
-
-// WS api/users/search
-message SearchWsResponse {
- optional sonarqube.ws.commons.Paging paging = 1;
- repeated User users = 2;
-
- message User {
- optional string login = 1;
- optional string name = 2;
- optional bool active = 3;
- optional string email = 4;
- optional ScmAccounts scmAccounts = 5;
- optional Groups groups = 6;
- optional int32 tokensCount = 7;
- optional bool local = 8;
- optional string externalIdentity = 9;
- optional string externalProvider = 10;
- optional string avatar = 11;
- }
-
- message Groups {
- repeated string groups = 1;
- }
-
- message ScmAccounts {
- repeated string scmAccounts = 1;
- }
-}
-
-// WS api/users/identity_providers
-message IdentityProvidersWsResponse {
- repeated IdentityProvider identityProviders = 1;
-}
-
-message IdentityProvider {
- optional string key = 1;
- optional string name = 2;
- optional string iconPath = 3;
- optional string backgroundColor = 4;
-}
-
-message CreateWsResponse {
- optional User user = 1;
-
- message User {
- optional string login = 1;
- optional string name = 2;
- optional string email = 3;
- repeated string scmAccounts = 4;
- optional bool active = 5;
- optional bool local = 6;
- }
-}
-
-// WS api/users/groups
-message GroupsWsResponse {
- optional sonarqube.ws.commons.Paging paging = 1;
- repeated Group groups = 2;
-
- message Group {
- optional int64 id = 1;
- optional string name = 2;
- optional string description = 3;
- optional bool selected = 4;
- optional bool default = 5;
- }
-}
-
-// WS api/users/current
-message CurrentWsResponse {
- optional bool isLoggedIn = 1;
- optional string login = 2;
- optional string name = 3;
- optional string email = 4;
- optional bool local = 5;
- optional string externalIdentity = 6;
- optional string externalProvider = 7;
- repeated string scmAccounts = 8;
- repeated string groups = 9;
- optional Permissions permissions = 10;
- optional bool showOnboardingTutorial = 11;
- optional string avatar = 12;
-
- message Permissions {
- repeated string global = 1;
- }
-}
-
-
diff --git a/sonar-ws/src/main/protobuf/ws-webhooks.proto b/sonar-ws/src/main/protobuf/ws-webhooks.proto
deleted file mode 100644
index a7ef3a9ab2b..00000000000
--- a/sonar-ws/src/main/protobuf/ws-webhooks.proto
+++ /dev/null
@@ -1,49 +0,0 @@
-// SonarQube, open source software quality management tool.
-// Copyright (C) 2008-2016 SonarSource
-// mailto:contact AT sonarsource DOT com
-//
-// SonarQube 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.
-//
-// SonarQube 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.
-
-syntax = "proto2";
-
-package sonarqube.ws.webhooks;
-
-option java_package = "org.sonarqube.ws";
-option java_outer_classname = "Webhooks";
-option optimize_for = SPEED;
-
-// WS api/webhooks/deliveries
-message DeliveriesWsResponse {
- repeated Delivery deliveries = 1;
-}
-
-// WS api/webhooks/delivery
-message DeliveryWsResponse {
- optional Delivery delivery = 1;
-}
-
-message Delivery {
- optional string id = 1;
- optional string componentKey = 2;
- optional string ceTaskId = 3;
- optional string name = 4;
- optional string url = 5;
- optional string at = 6;
- optional bool success = 7;
- optional int32 httpStatus = 8;
- optional int32 durationMs = 9;
- optional string payload = 10;
- optional string errorStacktrace = 11;
-}