From 8587775dbe02b9a92f592e375d1faf28285572b6 Mon Sep 17 00:00:00 2001 From: Teryk Bellahsene Date: Mon, 21 Sep 2015 14:34:41 +0200 Subject: [PATCH] SONAR-6864 Rename WS batch/* to scanner/* --- .../test/java/server/suite/ServerTest.java | 6 +- .../platformlevel/PlatformLevel4.java | 4 +- .../{batch => scanner}/GlobalAction.java | 4 +- .../{batch => scanner}/IssuesAction.java | 4 +- .../server/{batch => scanner}/Messages.java | 2 +- .../{batch => scanner}/ProjectAction.java | 6 +- .../{batch => scanner}/ProjectDataLoader.java | 2 +- .../{batch => scanner}/ProjectDataQuery.java | 2 +- .../ScannerIndex.java} | 6 +- .../BatchWs.java => scanner/ScannerWs.java} | 20 +- .../ScannerWsAction.java} | 4 +- .../ScannerWsModule.java} | 8 +- .../{batch => scanner}/UsersAction.java | 4 +- .../{batch => scanner}/package-info.java | 2 +- .../{batch => scanner}/GlobalActionTest.java | 12 +- .../{batch => scanner}/IssuesActionTest.java | 18 +- .../{batch => scanner}/ProjectActionTest.java | 6 +- .../ProjectDataLoaderMediumTest.java | 2 +- .../ScannerIndexTest.java} | 30 +- .../ScannerWsModuleTest.java} | 6 +- .../ScannerWsTest.java} | 16 +- .../{batch => scanner}/UsersActionTest.java | 6 +- .../return_global_referentials.json | 0 .../return_global_settings.json | 0 ...hout_scan_but_with_preview_permission.json | 0 .../project_referentials.json | 0 .../src/main/webapp/WEB-INF/config/routes.rb | 4 +- .../DefaultGlobalRepositoriesLoader.java | 2 +- .../DefaultProjectRepositoriesLoader.java | 2 +- .../repository/DefaultServerIssuesLoader.java | 2 +- .../repository/user/UserRepositoryLoader.java | 2 +- .../cache/ProjectCacheSynchronizerTest.java | 69 ++- .../DefaultGlobalRepositoriesLoaderTest.java | 21 +- .../DefaultProjectRepositoriesLoaderTest.java | 24 +- .../DefaultServerIssuesLoaderTest.java | 4 +- .../user/UserRepositoryLoaderTest.java | 6 +- .../ws/{WsBatch.java => WsScanner.java} | 456 +++++++++--------- .../{ws-batch.proto => ws-scanner.proto} | 4 +- 38 files changed, 380 insertions(+), 386 deletions(-) rename server/sonar-server/src/main/java/org/sonar/server/{batch => scanner}/GlobalAction.java (97%) rename server/sonar-server/src/main/java/org/sonar/server/{batch => scanner}/IssuesAction.java (98%) rename server/sonar-server/src/main/java/org/sonar/server/{batch => scanner}/Messages.java (96%) rename server/sonar-server/src/main/java/org/sonar/server/{batch => scanner}/ProjectAction.java (97%) rename server/sonar-server/src/main/java/org/sonar/server/{batch => scanner}/ProjectDataLoader.java (99%) rename server/sonar-server/src/main/java/org/sonar/server/{batch => scanner}/ProjectDataQuery.java (98%) rename server/sonar-server/src/main/java/org/sonar/server/{batch/BatchIndex.java => scanner/ScannerIndex.java} (95%) rename server/sonar-server/src/main/java/org/sonar/server/{batch/BatchWs.java => scanner/ScannerWs.java} (83%) rename server/sonar-server/src/main/java/org/sonar/server/{batch/BatchWsAction.java => scanner/ScannerWsAction.java} (91%) rename server/sonar-server/src/main/java/org/sonar/server/{batch/BatchWsModule.java => scanner/ScannerWsModule.java} (89%) rename server/sonar-server/src/main/java/org/sonar/server/{batch => scanner}/UsersAction.java (97%) rename server/sonar-server/src/main/java/org/sonar/server/{batch => scanner}/package-info.java (96%) rename server/sonar-server/src/test/java/org/sonar/server/{batch => scanner}/GlobalActionTest.java (90%) rename server/sonar-server/src/test/java/org/sonar/server/{batch => scanner}/IssuesActionTest.java (94%) rename server/sonar-server/src/test/java/org/sonar/server/{batch => scanner}/ProjectActionTest.java (91%) rename server/sonar-server/src/test/java/org/sonar/server/{batch => scanner}/ProjectDataLoaderMediumTest.java (99%) rename server/sonar-server/src/test/java/org/sonar/server/{batch/BatchIndexTest.java => scanner/ScannerIndexTest.java} (80%) rename server/sonar-server/src/test/java/org/sonar/server/{batch/BatchWsModuleTest.java => scanner/ScannerWsModuleTest.java} (91%) rename server/sonar-server/src/test/java/org/sonar/server/{batch/BatchWsTest.java => scanner/ScannerWsTest.java} (83%) rename server/sonar-server/src/test/java/org/sonar/server/{batch => scanner}/UsersActionTest.java (92%) rename server/sonar-server/src/test/resources/org/sonar/server/{batch => scanner}/GlobalActionTest/return_global_referentials.json (100%) rename server/sonar-server/src/test/resources/org/sonar/server/{batch => scanner}/GlobalActionTest/return_global_settings.json (100%) rename server/sonar-server/src/test/resources/org/sonar/server/{batch => scanner}/GlobalActionTest/return_only_license_settings_without_scan_but_with_preview_permission.json (100%) rename server/sonar-server/src/test/resources/org/sonar/server/{batch => scanner}/ProjectActionTest/project_referentials.json (100%) rename sonar-ws/src/main/gen-java/org/sonarqube/ws/{WsBatch.java => WsScanner.java} (80%) rename sonar-ws/src/main/protobuf/{ws-batch.proto => ws-scanner.proto} (95%) diff --git a/it/it-tests/src/test/java/server/suite/ServerTest.java b/it/it-tests/src/test/java/server/suite/ServerTest.java index 57ab6c3b33f..7e6a4ae7049 100644 --- a/it/it-tests/src/test/java/server/suite/ServerTest.java +++ b/it/it-tests/src/test/java/server/suite/ServerTest.java @@ -72,7 +72,7 @@ public class ServerTest { orchestrator.getServer().getAdminWsClient().update(new PropertyUpdateQuery("sonar.forceAuthentication", "true")); // /batch/index should never need authentication - String batchIndex = orchestrator.getServer().wsClient().get("/batch/index"); + String batchIndex = orchestrator.getServer().wsClient().get("/scanner/index"); assertThat(batchIndex).isNotEmpty(); String jar = batchIndex.split("\\|")[0]; @@ -80,13 +80,13 @@ public class ServerTest { // /batch/file should never need authentication HttpClient httpclient = new DefaultHttpClient(); try { - HttpGet get = new HttpGet(orchestrator.getServer().getUrl() + "/batch/file?name=" + jar); + HttpGet get = new HttpGet(orchestrator.getServer().getUrl() + "/scanner/file?name=" + jar); HttpResponse response = httpclient.execute(get); assertThat(response.getStatusLine().getStatusCode()).isEqualTo(200); EntityUtils.consume(response.getEntity()); // As Sonar runner is still using /batch/key, we have to also verify it - get = new HttpGet(orchestrator.getServer().getUrl() + "/batch/" + jar); + get = new HttpGet(orchestrator.getServer().getUrl() + "/scanner/" + jar); response = httpclient.execute(get); assertThat(response.getStatusLine().getStatusCode()).isEqualTo(200); EntityUtils.consume(response.getEntity()); diff --git a/server/sonar-server/src/main/java/org/sonar/server/platform/platformlevel/PlatformLevel4.java b/server/sonar-server/src/main/java/org/sonar/server/platform/platformlevel/PlatformLevel4.java index 1af4c400a59..aee4aebb5ae 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/platform/platformlevel/PlatformLevel4.java +++ b/server/sonar-server/src/main/java/org/sonar/server/platform/platformlevel/PlatformLevel4.java @@ -49,7 +49,7 @@ import org.sonar.server.activity.index.ActivityIndexer; import org.sonar.server.activity.ws.ActivitiesWs; import org.sonar.server.activity.ws.ActivityMapping; import org.sonar.server.authentication.ws.AuthenticationWs; -import org.sonar.server.batch.BatchWsModule; +import org.sonar.server.scanner.ScannerWsModule; import org.sonar.server.charts.ChartFactory; import org.sonar.server.charts.DistributionAreaChart; import org.sonar.server.charts.DistributionBarChart; @@ -343,7 +343,7 @@ public class PlatformLevel4 extends PlatformLevel { ActivityIndex.class, // batch - BatchWsModule.class, + ScannerWsModule.class, // Dashboard DashboardsWs.class, diff --git a/server/sonar-server/src/main/java/org/sonar/server/batch/GlobalAction.java b/server/sonar-server/src/main/java/org/sonar/server/scanner/GlobalAction.java similarity index 97% rename from server/sonar-server/src/main/java/org/sonar/server/batch/GlobalAction.java rename to server/sonar-server/src/main/java/org/sonar/server/scanner/GlobalAction.java index f528f93ac44..fc9706e67e2 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/batch/GlobalAction.java +++ b/server/sonar-server/src/main/java/org/sonar/server/scanner/GlobalAction.java @@ -18,7 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package org.sonar.server.batch; +package org.sonar.server.scanner; import org.apache.commons.io.IOUtils; import org.sonar.api.server.ws.Request; @@ -36,7 +36,7 @@ import org.sonar.server.exceptions.ForbiddenException; import org.sonar.server.plugins.MimeTypes; import org.sonar.server.user.UserSession; -public class GlobalAction implements BatchWsAction { +public class GlobalAction implements ScannerWsAction { private final DbClient dbClient; private final PropertiesDao propertiesDao; diff --git a/server/sonar-server/src/main/java/org/sonar/server/batch/IssuesAction.java b/server/sonar-server/src/main/java/org/sonar/server/scanner/IssuesAction.java similarity index 98% rename from server/sonar-server/src/main/java/org/sonar/server/batch/IssuesAction.java rename to server/sonar-server/src/main/java/org/sonar/server/scanner/IssuesAction.java index 6e3042a4d93..445ec7cef15 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/batch/IssuesAction.java +++ b/server/sonar-server/src/main/java/org/sonar/server/scanner/IssuesAction.java @@ -18,7 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package org.sonar.server.batch; +package org.sonar.server.scanner; import java.io.IOException; import java.io.OutputStream; @@ -43,7 +43,7 @@ import org.sonar.server.user.UserSession; import static com.google.common.collect.Maps.newHashMap; -public class IssuesAction implements BatchWsAction { +public class IssuesAction implements ScannerWsAction { private static final String PARAM_KEY = "key"; diff --git a/server/sonar-server/src/main/java/org/sonar/server/batch/Messages.java b/server/sonar-server/src/main/java/org/sonar/server/scanner/Messages.java similarity index 96% rename from server/sonar-server/src/main/java/org/sonar/server/batch/Messages.java rename to server/sonar-server/src/main/java/org/sonar/server/scanner/Messages.java index a08a8cecc83..5d7f085d242 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/batch/Messages.java +++ b/server/sonar-server/src/main/java/org/sonar/server/scanner/Messages.java @@ -17,7 +17,7 @@ * 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.sonar.server.batch; +package org.sonar.server.scanner; public interface Messages { diff --git a/server/sonar-server/src/main/java/org/sonar/server/batch/ProjectAction.java b/server/sonar-server/src/main/java/org/sonar/server/scanner/ProjectAction.java similarity index 97% rename from server/sonar-server/src/main/java/org/sonar/server/batch/ProjectAction.java rename to server/sonar-server/src/main/java/org/sonar/server/scanner/ProjectAction.java index df43571ca8b..c1c12330ae8 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/batch/ProjectAction.java +++ b/server/sonar-server/src/main/java/org/sonar/server/scanner/ProjectAction.java @@ -18,7 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package org.sonar.server.batch; +package org.sonar.server.scanner; import java.util.HashMap; import java.util.Map; @@ -27,11 +27,11 @@ import org.sonar.api.server.ws.Response; import org.sonar.api.server.ws.WebService; import org.sonar.batch.protocol.input.FileData; import org.sonar.batch.protocol.input.ProjectRepositories; -import org.sonarqube.ws.WsBatch.WsProjectResponse; +import org.sonarqube.ws.WsScanner.WsProjectResponse; import static org.sonar.server.ws.WsUtils.writeProtobuf; -public class ProjectAction implements BatchWsAction { +public class ProjectAction implements ScannerWsAction { private static final String PARAM_KEY = "key"; private static final String PARAM_PROFILE = "profile"; diff --git a/server/sonar-server/src/main/java/org/sonar/server/batch/ProjectDataLoader.java b/server/sonar-server/src/main/java/org/sonar/server/scanner/ProjectDataLoader.java similarity index 99% rename from server/sonar-server/src/main/java/org/sonar/server/batch/ProjectDataLoader.java rename to server/sonar-server/src/main/java/org/sonar/server/scanner/ProjectDataLoader.java index 2a0ccdd9562..313022d32c6 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/batch/ProjectDataLoader.java +++ b/server/sonar-server/src/main/java/org/sonar/server/scanner/ProjectDataLoader.java @@ -18,7 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package org.sonar.server.batch; +package org.sonar.server.scanner; import com.google.common.collect.ArrayListMultimap; import com.google.common.collect.Maps; diff --git a/server/sonar-server/src/main/java/org/sonar/server/batch/ProjectDataQuery.java b/server/sonar-server/src/main/java/org/sonar/server/scanner/ProjectDataQuery.java similarity index 98% rename from server/sonar-server/src/main/java/org/sonar/server/batch/ProjectDataQuery.java rename to server/sonar-server/src/main/java/org/sonar/server/scanner/ProjectDataQuery.java index fa3e8246d6f..de13aefd43e 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/batch/ProjectDataQuery.java +++ b/server/sonar-server/src/main/java/org/sonar/server/scanner/ProjectDataQuery.java @@ -18,7 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package org.sonar.server.batch; +package org.sonar.server.scanner; import javax.annotation.CheckForNull; import javax.annotation.Nullable; diff --git a/server/sonar-server/src/main/java/org/sonar/server/batch/BatchIndex.java b/server/sonar-server/src/main/java/org/sonar/server/scanner/ScannerIndex.java similarity index 95% rename from server/sonar-server/src/main/java/org/sonar/server/batch/BatchIndex.java rename to server/sonar-server/src/main/java/org/sonar/server/scanner/ScannerIndex.java index 77ab8034969..d9f82d207b9 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/batch/BatchIndex.java +++ b/server/sonar-server/src/main/java/org/sonar/server/scanner/ScannerIndex.java @@ -18,7 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package org.sonar.server.batch; +package org.sonar.server.scanner; import org.apache.commons.io.FileUtils; import org.apache.commons.io.filefilter.FileFilterUtils; @@ -38,13 +38,13 @@ import java.util.Collection; * JAR files to be downloaded by sonar-runner. */ @ServerSide -public class BatchIndex implements Startable { +public class ScannerIndex implements Startable { private final Server server; private String index; private File batchDir; - public BatchIndex(Server server) { + public ScannerIndex(Server server) { this.server = server; } diff --git a/server/sonar-server/src/main/java/org/sonar/server/batch/BatchWs.java b/server/sonar-server/src/main/java/org/sonar/server/scanner/ScannerWs.java similarity index 83% rename from server/sonar-server/src/main/java/org/sonar/server/batch/BatchWs.java rename to server/sonar-server/src/main/java/org/sonar/server/scanner/ScannerWs.java index df6a4bccbb8..b8d4c4c2898 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/batch/BatchWs.java +++ b/server/sonar-server/src/main/java/org/sonar/server/scanner/ScannerWs.java @@ -17,7 +17,7 @@ * 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.sonar.server.batch; +package org.sonar.server.scanner; import org.apache.commons.io.FileUtils; import org.apache.commons.io.IOUtils; @@ -28,15 +28,15 @@ import org.sonar.api.server.ws.WebService; import java.io.IOException; -public class BatchWs implements WebService { +public class ScannerWs implements WebService { - public static final String API_ENDPOINT = "batch"; + public static final String API_ENDPOINT = "scanner"; - private final BatchIndex batchIndex; - private final BatchWsAction[] actions; + private final ScannerIndex scannerIndex; + private final ScannerWsAction[] actions; - public BatchWs(BatchIndex batchIndex, BatchWsAction... actions) { - this.batchIndex = batchIndex; + public ScannerWs(ScannerIndex scannerIndex, ScannerWsAction... actions) { + this.scannerIndex = scannerIndex; this.actions = actions; } @@ -48,7 +48,7 @@ public class BatchWs implements WebService { defineIndexAction(controller); defineFileAction(controller); - for (BatchWsAction action : actions) { + for (ScannerWsAction action : actions) { action.define(controller); } @@ -64,7 +64,7 @@ public class BatchWs implements WebService { public void handle(Request request, Response response) { try { response.stream().setMediaType("text/plain"); - IOUtils.write(batchIndex.getIndex(), response.stream().output()); + IOUtils.write(scannerIndex.getIndex(), response.stream().output()); } catch (IOException e) { throw new IllegalStateException(e); } @@ -83,7 +83,7 @@ public class BatchWs implements WebService { String filename = request.mandatoryParam("name"); try { response.stream().setMediaType("application/java-archive"); - FileUtils.copyFile(batchIndex.getFile(filename), response.stream().output()); + FileUtils.copyFile(scannerIndex.getFile(filename), response.stream().output()); } catch (IOException e) { throw new IllegalStateException(e); } diff --git a/server/sonar-server/src/main/java/org/sonar/server/batch/BatchWsAction.java b/server/sonar-server/src/main/java/org/sonar/server/scanner/ScannerWsAction.java similarity index 91% rename from server/sonar-server/src/main/java/org/sonar/server/batch/BatchWsAction.java rename to server/sonar-server/src/main/java/org/sonar/server/scanner/ScannerWsAction.java index 66f279a690b..2df2a0f773a 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/batch/BatchWsAction.java +++ b/server/sonar-server/src/main/java/org/sonar/server/scanner/ScannerWsAction.java @@ -17,10 +17,10 @@ * 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.sonar.server.batch; +package org.sonar.server.scanner; import org.sonar.server.ws.WsAction; -public interface BatchWsAction extends WsAction { +public interface ScannerWsAction extends WsAction { // Marker interface } diff --git a/server/sonar-server/src/main/java/org/sonar/server/batch/BatchWsModule.java b/server/sonar-server/src/main/java/org/sonar/server/scanner/ScannerWsModule.java similarity index 89% rename from server/sonar-server/src/main/java/org/sonar/server/batch/BatchWsModule.java rename to server/sonar-server/src/main/java/org/sonar/server/scanner/ScannerWsModule.java index 3ea7bbab019..cc2b3be7175 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/batch/BatchWsModule.java +++ b/server/sonar-server/src/main/java/org/sonar/server/scanner/ScannerWsModule.java @@ -17,20 +17,20 @@ * 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.sonar.server.batch; +package org.sonar.server.scanner; import org.sonar.core.platform.Module; -public class BatchWsModule extends Module { +public class ScannerWsModule extends Module { @Override protected void configureModule() { add( - BatchIndex.class, + ScannerIndex.class, GlobalAction.class, ProjectAction.class, ProjectDataLoader.class, IssuesAction.class, UsersAction.class, - BatchWs.class); + ScannerWs.class); } } diff --git a/server/sonar-server/src/main/java/org/sonar/server/batch/UsersAction.java b/server/sonar-server/src/main/java/org/sonar/server/scanner/UsersAction.java similarity index 97% rename from server/sonar-server/src/main/java/org/sonar/server/batch/UsersAction.java rename to server/sonar-server/src/main/java/org/sonar/server/scanner/UsersAction.java index a4ecc638736..b738bf26486 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/batch/UsersAction.java +++ b/server/sonar-server/src/main/java/org/sonar/server/scanner/UsersAction.java @@ -18,7 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package org.sonar.server.batch; +package org.sonar.server.scanner; import java.io.IOException; import java.io.OutputStream; @@ -34,7 +34,7 @@ import org.sonar.server.user.UserSession; import org.sonar.server.user.index.UserDoc; import org.sonar.server.user.index.UserIndex; -public class UsersAction implements BatchWsAction { +public class UsersAction implements ScannerWsAction { private static final String PARAM_LOGINS = "logins"; diff --git a/server/sonar-server/src/main/java/org/sonar/server/batch/package-info.java b/server/sonar-server/src/main/java/org/sonar/server/scanner/package-info.java similarity index 96% rename from server/sonar-server/src/main/java/org/sonar/server/batch/package-info.java rename to server/sonar-server/src/main/java/org/sonar/server/scanner/package-info.java index 9fc58425b89..81945a8168e 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/batch/package-info.java +++ b/server/sonar-server/src/main/java/org/sonar/server/scanner/package-info.java @@ -19,6 +19,6 @@ */ @ParametersAreNonnullByDefault -package org.sonar.server.batch; +package org.sonar.server.scanner; import javax.annotation.ParametersAreNonnullByDefault; diff --git a/server/sonar-server/src/test/java/org/sonar/server/batch/GlobalActionTest.java b/server/sonar-server/src/test/java/org/sonar/server/scanner/GlobalActionTest.java similarity index 90% rename from server/sonar-server/src/test/java/org/sonar/server/batch/GlobalActionTest.java rename to server/sonar-server/src/test/java/org/sonar/server/scanner/GlobalActionTest.java index 31ebee42edf..69e19dfc12c 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/batch/GlobalActionTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/scanner/GlobalActionTest.java @@ -18,7 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package org.sonar.server.batch; +package org.sonar.server.scanner; import org.junit.Before; import org.junit.Rule; @@ -66,7 +66,7 @@ public class GlobalActionTest { when(dbClient.openSession(false)).thenReturn(session); when(dbClient.metricDao()).thenReturn(metricDao); - tester = new WsTester(new BatchWs(mock(BatchIndex.class), new GlobalAction(dbClient, propertiesDao, userSessionRule))); + tester = new WsTester(new ScannerWs(mock(ScannerIndex.class), new GlobalAction(dbClient, propertiesDao, userSessionRule))); } @Test @@ -78,7 +78,7 @@ public class GlobalActionTest { .setWorstValue(0d).setBestValue(100d).setOptimizedBestValue(false).setDirection(1).setEnabled(true) )); - WsTester.TestRequest request = tester.newGetRequest("batch", "global"); + WsTester.TestRequest request = tester.newGetRequest("scanner", "global"); request.execute().assertJson(getClass(), "return_global_referentials.json"); } @@ -92,7 +92,7 @@ public class GlobalActionTest { new PropertyDto().setKey("foo.license.secured").setValue("5678") )); - WsTester.TestRequest request = tester.newGetRequest("batch", "global"); + WsTester.TestRequest request = tester.newGetRequest("scanner", "global"); request.execute().assertJson(getClass(), "return_global_settings.json"); } @@ -106,7 +106,7 @@ public class GlobalActionTest { new PropertyDto().setKey("foo.license.secured").setValue("5678") )); - WsTester.TestRequest request = tester.newGetRequest("batch", "global"); + WsTester.TestRequest request = tester.newGetRequest("scanner", "global"); request.execute().assertJson(getClass(), "return_only_license_settings_without_scan_but_with_preview_permission.json"); } @@ -122,6 +122,6 @@ public class GlobalActionTest { thrown.expect(ForbiddenException.class); - tester.newGetRequest("batch", "global").execute(); + tester.newGetRequest("scanner", "global").execute(); } } diff --git a/server/sonar-server/src/test/java/org/sonar/server/batch/IssuesActionTest.java b/server/sonar-server/src/test/java/org/sonar/server/scanner/IssuesActionTest.java similarity index 94% rename from server/sonar-server/src/test/java/org/sonar/server/batch/IssuesActionTest.java rename to server/sonar-server/src/test/java/org/sonar/server/scanner/IssuesActionTest.java index 67950cbb5d0..ba9762e904d 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/batch/IssuesActionTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/scanner/IssuesActionTest.java @@ -18,7 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package org.sonar.server.batch; +package org.sonar.server.scanner; import java.io.ByteArrayInputStream; import java.util.Arrays; @@ -90,7 +90,7 @@ public class IssuesActionTest { issueAuthorizationIndexer = new IssueAuthorizationIndexer(null, es.client()); issuesAction = new IssuesAction(db.getDbClient(), issueIndex, userSessionRule, new ComponentFinder(db.getDbClient())); - tester = new WsTester(new BatchWs(new BatchIndex(mock(Server.class)), issuesAction)); + tester = new WsTester(new ScannerWs(new ScannerIndex(mock(Server.class)), issuesAction)); } @Test @@ -114,7 +114,7 @@ public class IssuesActionTest { userSessionRule.login("henry").setGlobalPermissions(GlobalPermissions.PREVIEW_EXECUTION); - WsTester.TestRequest request = tester.newGetRequest("batch", "issues").setParam("key", PROJECT_KEY); + WsTester.TestRequest request = tester.newGetRequest("scanner", "issues").setParam("key", PROJECT_KEY); ServerIssue serverIssue = ServerIssue.parseDelimitedFrom(new ByteArrayInputStream(request.execute().output())); assertThat(serverIssue.getKey()).isEqualTo("EFGH"); @@ -153,7 +153,7 @@ public class IssuesActionTest { userSessionRule.login("henry").setGlobalPermissions(GlobalPermissions.PREVIEW_EXECUTION); - WsTester.TestRequest request = tester.newGetRequest("batch", "issues").setParam("key", PROJECT_KEY); + WsTester.TestRequest request = tester.newGetRequest("scanner", "issues").setParam("key", PROJECT_KEY); ServerIssue serverIssue = ServerIssue.parseDelimitedFrom(new ByteArrayInputStream(request.execute().output())); assertThat(serverIssue.getKey()).isEqualTo("EFGH"); @@ -192,7 +192,7 @@ public class IssuesActionTest { userSessionRule.login("henry").setGlobalPermissions(GlobalPermissions.PREVIEW_EXECUTION); - WsTester.TestRequest request = tester.newGetRequest("batch", "issues").setParam("key", MODULE_KEY); + WsTester.TestRequest request = tester.newGetRequest("scanner", "issues").setParam("key", MODULE_KEY); ServerIssue serverIssue = ServerIssue.parseDelimitedFrom(new ByteArrayInputStream(request.execute().output())); assertThat(serverIssue.getKey()).isEqualTo("EFGH"); assertThat(serverIssue.getModuleKey()).isEqualTo(MODULE_KEY); @@ -230,7 +230,7 @@ public class IssuesActionTest { userSessionRule.login("henry").setGlobalPermissions(GlobalPermissions.PREVIEW_EXECUTION); - WsTester.TestRequest request = tester.newGetRequest("batch", "issues").setParam("key", FILE_KEY); + WsTester.TestRequest request = tester.newGetRequest("scanner", "issues").setParam("key", FILE_KEY); ServerIssue serverIssue = ServerIssue.parseDelimitedFrom(new ByteArrayInputStream(request.execute().output())); assertThat(serverIssue.getKey()).isEqualTo("EFGH"); assertThat(serverIssue.getModuleKey()).isEqualTo(MODULE_KEY); @@ -267,7 +267,7 @@ public class IssuesActionTest { userSessionRule.login("henry").setGlobalPermissions(GlobalPermissions.PREVIEW_EXECUTION); - WsTester.TestRequest request = tester.newGetRequest("batch", "issues").setParam("key", MODULE_KEY); + WsTester.TestRequest request = tester.newGetRequest("scanner", "issues").setParam("key", MODULE_KEY); ServerIssue previousIssue = ServerIssue.parseDelimitedFrom(new ByteArrayInputStream(request.execute().output())); assertThat(previousIssue.getKey()).isEqualTo("EFGH"); assertThat(previousIssue.getModuleKey()).isEqualTo(MODULE_KEY); @@ -306,7 +306,7 @@ public class IssuesActionTest { userSessionRule.login("henry").setGlobalPermissions(GlobalPermissions.PREVIEW_EXECUTION); - WsTester.TestRequest request = tester.newGetRequest("batch", "issues").setParam("key", PROJECT_KEY); + WsTester.TestRequest request = tester.newGetRequest("scanner", "issues").setParam("key", PROJECT_KEY); ServerIssue serverIssue = ServerIssue.parseDelimitedFrom(new ByteArrayInputStream(request.execute().output())); assertThat(serverIssue.getKey()).isEqualTo("EFGH"); // Module key of removed file should be returned @@ -317,7 +317,7 @@ public class IssuesActionTest { public void fail_without_preview_permission() throws Exception { userSessionRule.login("henry").setGlobalPermissions(GlobalPermissions.PROVISIONING); - WsTester.TestRequest request = tester.newGetRequest("batch", "issues").setParam("key", PROJECT_KEY); + WsTester.TestRequest request = tester.newGetRequest("scanner", "issues").setParam("key", PROJECT_KEY); request.execute(); } diff --git a/server/sonar-server/src/test/java/org/sonar/server/batch/ProjectActionTest.java b/server/sonar-server/src/test/java/org/sonar/server/scanner/ProjectActionTest.java similarity index 91% rename from server/sonar-server/src/test/java/org/sonar/server/batch/ProjectActionTest.java rename to server/sonar-server/src/test/java/org/sonar/server/scanner/ProjectActionTest.java index 372118eba96..29ac51b7c6f 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/batch/ProjectActionTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/scanner/ProjectActionTest.java @@ -18,7 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package org.sonar.server.batch; +package org.sonar.server.scanner; import org.junit.Before; import org.junit.Test; @@ -38,7 +38,7 @@ public class ProjectActionTest { @Before public void setUp() { - tester = new WsTester(new BatchWs(mock(BatchIndex.class), new ProjectAction(projectDataLoader))); + tester = new WsTester(new ScannerWs(mock(ScannerIndex.class), new ProjectAction(projectDataLoader))); } @Test @@ -51,7 +51,7 @@ public class ProjectActionTest { ArgumentCaptor queryArgumentCaptor = ArgumentCaptor.forClass(ProjectDataQuery.class); when(projectDataLoader.load(queryArgumentCaptor.capture())).thenReturn(projectReferentials); - WsTester.TestRequest request = tester.newGetRequest("batch", "project") + WsTester.TestRequest request = tester.newGetRequest("scanner", "project") .setParam("key", projectKey) .setParam("profile", "Default") .setParam("preview", "false"); diff --git a/server/sonar-server/src/test/java/org/sonar/server/batch/ProjectDataLoaderMediumTest.java b/server/sonar-server/src/test/java/org/sonar/server/scanner/ProjectDataLoaderMediumTest.java similarity index 99% rename from server/sonar-server/src/test/java/org/sonar/server/batch/ProjectDataLoaderMediumTest.java rename to server/sonar-server/src/test/java/org/sonar/server/scanner/ProjectDataLoaderMediumTest.java index 8498f3fc3db..c4cf868bb81 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/batch/ProjectDataLoaderMediumTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/scanner/ProjectDataLoaderMediumTest.java @@ -18,7 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package org.sonar.server.batch; +package org.sonar.server.scanner; import com.google.common.collect.ImmutableMap; import java.util.Date; diff --git a/server/sonar-server/src/test/java/org/sonar/server/batch/BatchIndexTest.java b/server/sonar-server/src/test/java/org/sonar/server/scanner/ScannerIndexTest.java similarity index 80% rename from server/sonar-server/src/test/java/org/sonar/server/batch/BatchIndexTest.java rename to server/sonar-server/src/test/java/org/sonar/server/scanner/ScannerIndexTest.java index 884524cc9ca..239a3402df6 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/batch/BatchIndexTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/scanner/ScannerIndexTest.java @@ -17,7 +17,7 @@ * 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.sonar.server.batch; +package org.sonar.server.scanner; import org.apache.commons.io.FileUtils; import org.apache.commons.lang.CharUtils; @@ -35,7 +35,7 @@ import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; -public class BatchIndexTest { +public class ScannerIndexTest { @Rule public TemporaryFolder temp = new TemporaryFolder(); @@ -60,21 +60,21 @@ public class BatchIndexTest { @Test public void get_index() { - BatchIndex batchIndex = new BatchIndex(server); - batchIndex.start(); + ScannerIndex scannerIndex = new ScannerIndex(server); + scannerIndex.start(); - String index = batchIndex.getIndex(); + String index = scannerIndex.getIndex(); assertThat(index).isEqualTo("sonar-batch.jar|acbd18db4cc2f85cedef654fccc4a4d8" + CharUtils.LF); - batchIndex.stop(); + scannerIndex.stop(); } @Test public void get_file() { - BatchIndex batchIndex = new BatchIndex(server); - batchIndex.start(); + ScannerIndex scannerIndex = new ScannerIndex(server); + scannerIndex.start(); - File file = batchIndex.getFile("sonar-batch.jar"); + File file = scannerIndex.getFile("sonar-batch.jar"); assertThat(file).isEqualTo(jar); } @@ -87,10 +87,10 @@ public class BatchIndexTest { thrown.expect(IllegalArgumentException.class); thrown.expectMessage("Bad filename: ../sonar-batch.jar"); - BatchIndex batchIndex = new BatchIndex(server); - batchIndex.start(); + ScannerIndex scannerIndex = new ScannerIndex(server); + scannerIndex.start(); - batchIndex.getFile("../sonar-batch.jar"); + scannerIndex.getFile("../sonar-batch.jar"); } @Test @@ -98,9 +98,9 @@ public class BatchIndexTest { thrown.expect(IllegalArgumentException.class); thrown.expectMessage("Bad filename: other.jar"); - BatchIndex batchIndex = new BatchIndex(server); - batchIndex.start(); + ScannerIndex scannerIndex = new ScannerIndex(server); + scannerIndex.start(); - batchIndex.getFile("other.jar"); + scannerIndex.getFile("other.jar"); } } diff --git a/server/sonar-server/src/test/java/org/sonar/server/batch/BatchWsModuleTest.java b/server/sonar-server/src/test/java/org/sonar/server/scanner/ScannerWsModuleTest.java similarity index 91% rename from server/sonar-server/src/test/java/org/sonar/server/batch/BatchWsModuleTest.java rename to server/sonar-server/src/test/java/org/sonar/server/scanner/ScannerWsModuleTest.java index 997ac69ffec..6b81f52a87e 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/batch/BatchWsModuleTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/scanner/ScannerWsModuleTest.java @@ -17,18 +17,18 @@ * 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.sonar.server.batch; +package org.sonar.server.scanner; import org.junit.Test; import org.sonar.core.platform.ComponentContainer; import static org.assertj.core.api.Assertions.assertThat; -public class BatchWsModuleTest { +public class ScannerWsModuleTest { @Test public void verify_count_of_added_components() { ComponentContainer container = new ComponentContainer(); - new BatchWsModule().configure(container); + new ScannerWsModule().configure(container); assertThat(container.size()).isEqualTo(9); } diff --git a/server/sonar-server/src/test/java/org/sonar/server/batch/BatchWsTest.java b/server/sonar-server/src/test/java/org/sonar/server/scanner/ScannerWsTest.java similarity index 83% rename from server/sonar-server/src/test/java/org/sonar/server/batch/BatchWsTest.java rename to server/sonar-server/src/test/java/org/sonar/server/scanner/ScannerWsTest.java index c1f20842324..e672e132cb8 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/batch/BatchWsTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/scanner/ScannerWsTest.java @@ -17,7 +17,7 @@ * 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.sonar.server.batch; +package org.sonar.server.scanner; import java.io.File; import org.apache.commons.io.FileUtils; @@ -41,7 +41,7 @@ import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; @RunWith(MockitoJUnitRunner.class) -public class BatchWsTest { +public class ScannerWsTest { @Rule public UserSessionRule userSessionRule = UserSessionRule.standalone(); @@ -52,13 +52,13 @@ public class BatchWsTest { public ExpectedException thrown = ExpectedException.none(); @Mock - BatchIndex batchIndex; + ScannerIndex scannerIndex; WsTester tester; @Before public void before() { - tester = new WsTester(new BatchWs(batchIndex, + tester = new WsTester(new ScannerWs(scannerIndex, new GlobalAction(mock(DbClient.class), mock(PropertiesDao.class), userSessionRule), new ProjectAction(mock(ProjectDataLoader.class)), new IssuesAction(mock(DbClient.class), mock(IssueIndex.class), userSessionRule, mock(ComponentFinder.class)))); @@ -66,9 +66,9 @@ public class BatchWsTest { @Test public void download_index() throws Exception { - when(batchIndex.getIndex()).thenReturn("sonar-batch.jar|acbd18db4cc2f85cedef654fccc4a4d8"); + when(scannerIndex.getIndex()).thenReturn("sonar-batch.jar|acbd18db4cc2f85cedef654fccc4a4d8"); - String index = tester.newGetRequest("batch", "index").execute().outputAsString(); + String index = tester.newGetRequest("scanner", "index").execute().outputAsString(); assertThat(index).isEqualTo("sonar-batch.jar|acbd18db4cc2f85cedef654fccc4a4d8"); } @@ -78,9 +78,9 @@ public class BatchWsTest { File file = temp.newFile(filename); FileUtils.writeStringToFile(file, "foo"); - when(batchIndex.getFile(filename)).thenReturn(file); + when(scannerIndex.getFile(filename)).thenReturn(file); - String jar = tester.newGetRequest("batch", "file").setParam("name", filename).execute().outputAsString(); + String jar = tester.newGetRequest("scanner", "file").setParam("name", filename).execute().outputAsString(); assertThat(jar).isEqualTo("foo"); } diff --git a/server/sonar-server/src/test/java/org/sonar/server/batch/UsersActionTest.java b/server/sonar-server/src/test/java/org/sonar/server/scanner/UsersActionTest.java similarity index 92% rename from server/sonar-server/src/test/java/org/sonar/server/batch/UsersActionTest.java rename to server/sonar-server/src/test/java/org/sonar/server/scanner/UsersActionTest.java index 43c000cafae..450a70d0691 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/batch/UsersActionTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/scanner/UsersActionTest.java @@ -18,7 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package org.sonar.server.batch; +package org.sonar.server.scanner; import org.junit.Before; import org.junit.ClassRule; @@ -60,7 +60,7 @@ public class UsersActionTest { userIndex = new UserIndex(es.client()); usersAction = new UsersAction(userIndex, userSessionRule); - tester = new WsTester(new BatchWs(new BatchIndex(mock(Server.class)), usersAction)); + tester = new WsTester(new ScannerWs(new ScannerIndex(mock(Server.class)), usersAction)); } @Test @@ -71,7 +71,7 @@ public class UsersActionTest { userSessionRule.login("sonarqtech").setGlobalPermissions(GlobalPermissions.PREVIEW_EXECUTION); - WsTester.TestRequest request = tester.newGetRequest("batch", "users").setParam("logins", "ada.lovelace,grace.hopper"); + WsTester.TestRequest request = tester.newGetRequest("scanner", "users").setParam("logins", "ada.lovelace,grace.hopper"); ByteArrayInputStream input = new ByteArrayInputStream(request.execute().output()); diff --git a/server/sonar-server/src/test/resources/org/sonar/server/batch/GlobalActionTest/return_global_referentials.json b/server/sonar-server/src/test/resources/org/sonar/server/scanner/GlobalActionTest/return_global_referentials.json similarity index 100% rename from server/sonar-server/src/test/resources/org/sonar/server/batch/GlobalActionTest/return_global_referentials.json rename to server/sonar-server/src/test/resources/org/sonar/server/scanner/GlobalActionTest/return_global_referentials.json diff --git a/server/sonar-server/src/test/resources/org/sonar/server/batch/GlobalActionTest/return_global_settings.json b/server/sonar-server/src/test/resources/org/sonar/server/scanner/GlobalActionTest/return_global_settings.json similarity index 100% rename from server/sonar-server/src/test/resources/org/sonar/server/batch/GlobalActionTest/return_global_settings.json rename to server/sonar-server/src/test/resources/org/sonar/server/scanner/GlobalActionTest/return_global_settings.json diff --git a/server/sonar-server/src/test/resources/org/sonar/server/batch/GlobalActionTest/return_only_license_settings_without_scan_but_with_preview_permission.json b/server/sonar-server/src/test/resources/org/sonar/server/scanner/GlobalActionTest/return_only_license_settings_without_scan_but_with_preview_permission.json similarity index 100% rename from server/sonar-server/src/test/resources/org/sonar/server/batch/GlobalActionTest/return_only_license_settings_without_scan_but_with_preview_permission.json rename to server/sonar-server/src/test/resources/org/sonar/server/scanner/GlobalActionTest/return_only_license_settings_without_scan_but_with_preview_permission.json diff --git a/server/sonar-server/src/test/resources/org/sonar/server/batch/ProjectActionTest/project_referentials.json b/server/sonar-server/src/test/resources/org/sonar/server/scanner/ProjectActionTest/project_referentials.json similarity index 100% rename from server/sonar-server/src/test/resources/org/sonar/server/batch/ProjectActionTest/project_referentials.json rename to server/sonar-server/src/test/resources/org/sonar/server/scanner/ProjectActionTest/project_referentials.json diff --git a/server/sonar-web/src/main/webapp/WEB-INF/config/routes.rb b/server/sonar-web/src/main/webapp/WEB-INF/config/routes.rb index 098d8cccf9a..1ccfc4e2216 100644 --- a/server/sonar-web/src/main/webapp/WEB-INF/config/routes.rb +++ b/server/sonar-web/src/main/webapp/WEB-INF/config/routes.rb @@ -9,8 +9,8 @@ ActionController::Routing::Routes.draw do |map| map.connect 'api', :controller => 'api/java_ws', :action => 'redirect_to_ws_listing' # deprecated, sonar-runner should use batch/index and batch/file?name=xxx - map.connect 'batch_bootstrap/index', :controller => 'api/java_ws', :action => 'index', :wspath => 'batch', :wsaction => 'index' - map.connect 'batch/:name', :controller => 'api/java_ws', :action => 'index', :wspath => 'batch', :wsaction => 'file', :requirements => { :name => /.*/ } + map.connect 'batch_bootstrap/index', :controller => 'api/java_ws', :action => 'index', :wspath => 'scanner', :wsaction => 'index' + map.connect 'scanner/:name', :controller => 'api/java_ws', :action => 'index', :wspath => 'scanner', :wsaction => 'file', :requirements => { :name => /.*/ } map.connect 'api/server/:action', :controller => 'api/server' map.connect 'api/resoures', :controller => 'api/resources', :action => 'index' diff --git a/sonar-batch/src/main/java/org/sonar/batch/repository/DefaultGlobalRepositoriesLoader.java b/sonar-batch/src/main/java/org/sonar/batch/repository/DefaultGlobalRepositoriesLoader.java index 51e7aaa4635..0575d6a2c72 100644 --- a/sonar-batch/src/main/java/org/sonar/batch/repository/DefaultGlobalRepositoriesLoader.java +++ b/sonar-batch/src/main/java/org/sonar/batch/repository/DefaultGlobalRepositoriesLoader.java @@ -30,7 +30,7 @@ import org.sonar.batch.protocol.input.GlobalRepositories; public class DefaultGlobalRepositoriesLoader implements GlobalRepositoriesLoader { - private static final String BATCH_GLOBAL_URL = "/batch/global"; + private static final String BATCH_GLOBAL_URL = "/scanner/global"; private final WSLoader wsLoader; diff --git a/sonar-batch/src/main/java/org/sonar/batch/repository/DefaultProjectRepositoriesLoader.java b/sonar-batch/src/main/java/org/sonar/batch/repository/DefaultProjectRepositoriesLoader.java index f4720065613..add0f3d157e 100644 --- a/sonar-batch/src/main/java/org/sonar/batch/repository/DefaultProjectRepositoriesLoader.java +++ b/sonar-batch/src/main/java/org/sonar/batch/repository/DefaultProjectRepositoriesLoader.java @@ -33,7 +33,7 @@ import org.sonar.batch.util.BatchUtils; public class DefaultProjectRepositoriesLoader implements ProjectRepositoriesLoader { private static final Logger LOG = LoggerFactory.getLogger(DefaultProjectRepositoriesLoader.class); - private static final String BATCH_PROJECT_URL = "/batch/project"; + private static final String BATCH_PROJECT_URL = "/scanner/project"; private final WSLoader wsLoader; private final DefaultAnalysisMode analysisMode; diff --git a/sonar-batch/src/main/java/org/sonar/batch/repository/DefaultServerIssuesLoader.java b/sonar-batch/src/main/java/org/sonar/batch/repository/DefaultServerIssuesLoader.java index 8cd966abb4d..aefe0569275 100644 --- a/sonar-batch/src/main/java/org/sonar/batch/repository/DefaultServerIssuesLoader.java +++ b/sonar-batch/src/main/java/org/sonar/batch/repository/DefaultServerIssuesLoader.java @@ -40,7 +40,7 @@ public class DefaultServerIssuesLoader implements ServerIssuesLoader { @Override public boolean load(String componentKey, Function consumer) { - WSLoaderResult result = wsLoader.loadSource("/batch/issues?key=" + BatchUtils.encodeForUrl(componentKey)); + WSLoaderResult result = wsLoader.loadSource("/scanner/issues?key=" + BatchUtils.encodeForUrl(componentKey)); parseIssues(result.get(), consumer); return result.isFromCache(); } diff --git a/sonar-batch/src/main/java/org/sonar/batch/repository/user/UserRepositoryLoader.java b/sonar-batch/src/main/java/org/sonar/batch/repository/user/UserRepositoryLoader.java index 09b5c027553..d40f918f87b 100644 --- a/sonar-batch/src/main/java/org/sonar/batch/repository/user/UserRepositoryLoader.java +++ b/sonar-batch/src/main/java/org/sonar/batch/repository/user/UserRepositoryLoader.java @@ -73,7 +73,7 @@ public class UserRepositoryLoader { } private ByteSource loadQuery(String loginsQuery, @Nullable MutableBoolean fromCache) { - WSLoaderResult result = wsLoader.loadSource("/batch/users?logins=" + loginsQuery); + WSLoaderResult result = wsLoader.loadSource("/scanner/users?logins=" + loginsQuery); if (fromCache != null) { fromCache.setValue(result.isFromCache()); } diff --git a/sonar-batch/src/test/java/org/sonar/batch/cache/ProjectCacheSynchronizerTest.java b/sonar-batch/src/test/java/org/sonar/batch/cache/ProjectCacheSynchronizerTest.java index 2621af33476..a4dade54f2d 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/cache/ProjectCacheSynchronizerTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/cache/ProjectCacheSynchronizerTest.java @@ -19,58 +19,55 @@ */ package org.sonar.batch.cache; -import static org.mockito.Mockito.when; - -import org.sonar.batch.repository.ProjectRepositoriesFactory; - -import org.sonar.batch.repository.DefaultProjectRepositoriesFactory; -import org.junit.Rule; -import org.junit.rules.ExpectedException; -import org.sonar.batch.repository.ProjectSettingsRepo; import com.google.common.base.Function; import com.google.common.collect.ImmutableList; -import org.sonar.batch.protocol.input.ActiveRule; -import org.sonar.batch.protocol.input.QProfile; -import org.apache.commons.lang.mutable.MutableBoolean; -import org.sonar.batch.repository.DefaultProjectSettingsLoader; -import org.sonar.batch.rule.DefaultActiveRulesLoader; -import org.sonar.batch.repository.DefaultQualityProfileLoader; -import org.sonar.batch.repository.ProjectSettingsLoader; -import org.sonar.batch.rule.ActiveRulesLoader; -import org.sonar.batch.repository.QualityProfileLoader; -import org.sonar.batch.analysis.DefaultAnalysisMode; -import org.sonar.batch.analysis.AnalysisProperties; -import org.sonar.batch.protocol.input.ProjectRepositories; -import org.sonar.batch.repository.DefaultServerIssuesLoader; -import org.sonar.batch.repository.DefaultProjectRepositoriesLoader; -import org.sonar.api.batch.bootstrap.ProjectReactor; import com.google.common.io.ByteSource; - +import com.google.common.io.Resources; import java.io.IOException; import java.net.URL; import java.nio.charset.StandardCharsets; import java.util.Date; import java.util.HashMap; - -import static org.mockito.Matchers.eq; -import static org.mockito.Matchers.any; -import static org.mockito.Mockito.mock; -import static org.mockito.Matchers.anyString; -import static org.mockito.Mockito.verify; -import static org.mockito.Mockito.verifyNoMoreInteractions; -import com.google.common.io.Resources; -import org.junit.Test; +import org.apache.commons.lang.mutable.MutableBoolean; import org.junit.Before; -import org.mockito.MockitoAnnotations; +import org.junit.Rule; +import org.junit.Test; +import org.junit.rules.ExpectedException; import org.mockito.Mock; +import org.mockito.MockitoAnnotations; import org.sonar.api.batch.bootstrap.ProjectDefinition; +import org.sonar.api.batch.bootstrap.ProjectReactor; +import org.sonar.batch.analysis.AnalysisProperties; +import org.sonar.batch.analysis.DefaultAnalysisMode; +import org.sonar.batch.protocol.input.ActiveRule; +import org.sonar.batch.protocol.input.ProjectRepositories; +import org.sonar.batch.protocol.input.QProfile; +import org.sonar.batch.repository.DefaultProjectRepositoriesFactory; +import org.sonar.batch.repository.DefaultProjectRepositoriesLoader; +import org.sonar.batch.repository.DefaultProjectSettingsLoader; +import org.sonar.batch.repository.DefaultQualityProfileLoader; +import org.sonar.batch.repository.DefaultServerIssuesLoader; +import org.sonar.batch.repository.ProjectRepositoriesFactory; import org.sonar.batch.repository.ProjectRepositoriesLoader; +import org.sonar.batch.repository.ProjectSettingsLoader; +import org.sonar.batch.repository.ProjectSettingsRepo; +import org.sonar.batch.repository.QualityProfileLoader; import org.sonar.batch.repository.ServerIssuesLoader; import org.sonar.batch.repository.user.UserRepositoryLoader; +import org.sonar.batch.rule.ActiveRulesLoader; +import org.sonar.batch.rule.DefaultActiveRulesLoader; + +import static org.mockito.Matchers.any; +import static org.mockito.Matchers.anyString; +import static org.mockito.Matchers.eq; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.verify; +import static org.mockito.Mockito.verifyNoMoreInteractions; +import static org.mockito.Mockito.when; public class ProjectCacheSynchronizerTest { - private static final String BATCH_PROJECT = "/batch/project?key=org.codehaus.sonar-plugins%3Asonar-scm-git-plugin&preview=true"; - private static final String ISSUES = "/batch/issues?key=org.codehaus.sonar-plugins%3Asonar-scm-git-plugin"; + private static final String BATCH_PROJECT = "/scanner/project?key=org.codehaus.sonar-plugins%3Asonar-scm-git-plugin&preview=true"; + private static final String ISSUES = "/scanner/issues?key=org.codehaus.sonar-plugins%3Asonar-scm-git-plugin"; private static final String PROJECT_KEY = "org.codehaus.sonar-plugins:sonar-scm-git-plugin"; @Rule diff --git a/sonar-batch/src/test/java/org/sonar/batch/repository/DefaultGlobalRepositoriesLoaderTest.java b/sonar-batch/src/test/java/org/sonar/batch/repository/DefaultGlobalRepositoriesLoaderTest.java index ee9786e53a6..df13b2ae6a7 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/repository/DefaultGlobalRepositoriesLoaderTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/repository/DefaultGlobalRepositoriesLoaderTest.java @@ -19,22 +19,21 @@ */ package org.sonar.batch.repository; -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.when; -import static org.mockito.Mockito.verify; -import static org.mockito.Mockito.verifyNoMoreInteractions; - -import static org.assertj.core.api.Assertions.assertThat; - -import org.sonar.batch.cache.WSLoaderResult; -import org.sonar.batch.protocol.input.GlobalRepositories; import org.apache.commons.lang.mutable.MutableBoolean; import org.junit.Before; -import org.sonar.batch.cache.WSLoader; import org.junit.Test; +import org.sonar.batch.cache.WSLoader; +import org.sonar.batch.cache.WSLoaderResult; +import org.sonar.batch.protocol.input.GlobalRepositories; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.verify; +import static org.mockito.Mockito.verifyNoMoreInteractions; +import static org.mockito.Mockito.when; public class DefaultGlobalRepositoriesLoaderTest { - private static final String BATCH_GLOBAL_URL = "/batch/global"; + private static final String BATCH_GLOBAL_URL = "/scanner/global"; private WSLoader wsLoader; private WSLoaderResult result; private DefaultGlobalRepositoriesLoader globalRepositoryLoader; diff --git a/sonar-batch/src/test/java/org/sonar/batch/repository/DefaultProjectRepositoriesLoaderTest.java b/sonar-batch/src/test/java/org/sonar/batch/repository/DefaultProjectRepositoriesLoaderTest.java index 3d2b9d18937..19be82675cc 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/repository/DefaultProjectRepositoriesLoaderTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/repository/DefaultProjectRepositoriesLoaderTest.java @@ -19,25 +19,23 @@ */ package org.sonar.batch.repository; -import org.sonar.batch.cache.WSLoaderResult; - -import org.sonar.batch.analysis.DefaultAnalysisMode; -import org.sonar.batch.cache.WSLoader; -import org.apache.commons.lang.mutable.MutableBoolean; -import org.apache.commons.io.IOUtils; - import java.io.IOException; import java.util.Date; - -import static org.assertj.core.api.Assertions.assertThat; +import org.apache.commons.io.IOUtils; +import org.apache.commons.lang.mutable.MutableBoolean; import org.junit.Before; import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; import org.sonar.api.batch.bootstrap.ProjectDefinition; import org.sonar.api.utils.MessageException; +import org.sonar.batch.analysis.DefaultAnalysisMode; +import org.sonar.batch.cache.WSLoader; +import org.sonar.batch.cache.WSLoaderResult; import org.sonar.batch.protocol.input.ProjectRepositories; import org.sonar.batch.protocol.input.QProfile; + +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Matchers.anyString; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.spy; @@ -69,11 +67,11 @@ public class DefaultProjectRepositoriesLoaderTest { project = ProjectDefinition.create().setKey("foo"); when(analysisMode.isIssues()).thenReturn(false); loader.load(project.getKeyWithBranch(), null, null); - verify(wsLoader).loadString("/batch/project?key=foo&preview=false"); + verify(wsLoader).loadString("/scanner/project?key=foo&preview=false"); when(analysisMode.isIssues()).thenReturn(true); loader.load(project.getKeyWithBranch(), null, null); - verify(wsLoader).loadString("/batch/project?key=foo&preview=true"); + verify(wsLoader).loadString("/scanner/project?key=foo&preview=true"); } @Test @@ -96,7 +94,7 @@ public class DefaultProjectRepositoriesLoaderTest { addQualityProfile(); project = ProjectDefinition.create().setKey("foo bàr"); loader.load(project.getKeyWithBranch(), null, null); - verify(wsLoader).loadString("/batch/project?key=foo+b%C3%A0r&preview=false"); + verify(wsLoader).loadString("/scanner/project?key=foo+b%C3%A0r&preview=false"); } @Test @@ -104,7 +102,7 @@ public class DefaultProjectRepositoriesLoaderTest { addQualityProfile(); project = ProjectDefinition.create().setKey("foo"); loader.load(project.getKeyWithBranch(), "my-profile#2", null); - verify(wsLoader).loadString("/batch/project?key=foo&profile=my-profile%232&preview=false"); + verify(wsLoader).loadString("/scanner/project?key=foo&profile=my-profile%232&preview=false"); } @Test diff --git a/sonar-batch/src/test/java/org/sonar/batch/repository/DefaultServerIssuesLoaderTest.java b/sonar-batch/src/test/java/org/sonar/batch/repository/DefaultServerIssuesLoaderTest.java index 04f5dda2325..07dab6b0ab5 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/repository/DefaultServerIssuesLoaderTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/repository/DefaultServerIssuesLoaderTest.java @@ -52,7 +52,7 @@ public class DefaultServerIssuesLoaderTest { @Test public void loadFromWs() throws Exception { ByteSource bs = mock(ByteSource.class); - when(wsLoader.loadSource("/batch/issues?key=foo")).thenReturn(new WSLoaderResult<>(bs, true)); + when(wsLoader.loadSource("/scanner/issues?key=foo")).thenReturn(new WSLoaderResult<>(bs, true)); ByteArrayOutputStream bos = new ByteArrayOutputStream(); @@ -80,7 +80,7 @@ public class DefaultServerIssuesLoaderTest { public void testError() throws IOException { ByteSource source = mock(ByteSource.class); when(source.openBufferedStream()).thenThrow(IOException.class); - when(wsLoader.loadSource("/batch/issues?key=foo")).thenReturn(new WSLoaderResult(source, true)); + when(wsLoader.loadSource("/scanner/issues?key=foo")).thenReturn(new WSLoaderResult(source, true)); loader.load("foo", mock(Function.class)); } } diff --git a/sonar-batch/src/test/java/org/sonar/batch/repository/user/UserRepositoryLoaderTest.java b/sonar-batch/src/test/java/org/sonar/batch/repository/user/UserRepositoryLoaderTest.java index 5410f18a7c1..a449f57837d 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/repository/user/UserRepositoryLoaderTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/repository/user/UserRepositoryLoaderTest.java @@ -69,7 +69,7 @@ public class UserRepositoryLoaderTest { public void testLoad() throws IOException { Map userMap = ImmutableMap.of("fmallet", "Freddy Mallet", "sbrandhof", "Simon"); WSLoaderResult res = new WSLoaderResult<>(createUsersMock(userMap), true); - when(wsLoader.loadSource("/batch/users?logins=fmallet,sbrandhof")).thenReturn(res); + when(wsLoader.loadSource("/scanner/users?logins=fmallet,sbrandhof")).thenReturn(res); assertThat(userRepo.load(Arrays.asList("fmallet", "sbrandhof"))).extracting("login", "name").containsOnly(tuple("fmallet", "Freddy Mallet"), tuple("sbrandhof", "Simon")); } @@ -90,7 +90,7 @@ public class UserRepositoryLoaderTest { @Test public void testLoadSingleUser() throws IOException { WSLoaderResult res = new WSLoaderResult<>(createUsersMock(ImmutableMap.of("fmallet", "Freddy Mallet")), true); - when(wsLoader.loadSource("/batch/users?logins=fmallet")).thenReturn(res); + when(wsLoader.loadSource("/scanner/users?logins=fmallet")).thenReturn(res); assertThat(userRepo.load("fmallet").getName()).isEqualTo("Freddy Mallet"); } @@ -113,7 +113,7 @@ public class UserRepositoryLoaderTest { WSLoaderResult res = new WSLoaderResult<>(source, true); - when(wsLoader.loadSource("/batch/users?logins=fmallet,sbrandhof")).thenReturn(res); + when(wsLoader.loadSource("/scanner/users?logins=fmallet,sbrandhof")).thenReturn(res); InputStream errorInputStream = mock(InputStream.class); Mockito.doThrow(IOException.class).when(errorInputStream).read(); diff --git a/sonar-ws/src/main/gen-java/org/sonarqube/ws/WsBatch.java b/sonar-ws/src/main/gen-java/org/sonarqube/ws/WsScanner.java similarity index 80% rename from sonar-ws/src/main/gen-java/org/sonarqube/ws/WsBatch.java rename to sonar-ws/src/main/gen-java/org/sonarqube/ws/WsScanner.java index 991ac252b8e..44328550bdb 100644 --- a/sonar-ws/src/main/gen-java/org/sonarqube/ws/WsBatch.java +++ b/sonar-ws/src/main/gen-java/org/sonarqube/ws/WsScanner.java @@ -1,10 +1,10 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: ws-batch.proto +// source: ws-scanner.proto package org.sonarqube.ws; -public final class WsBatch { - private WsBatch() {} +public final class WsScanner { + private WsScanner() {} public static void registerAllExtensions( com.google.protobuf.ExtensionRegistry registry) { } @@ -24,13 +24,13 @@ public final class WsBatch { /** * map<string, .sonarqube.ws.batch.WsProjectResponse.Settings> settingsByModule = 2; */ - java.util.Map + java.util.Map getSettingsByModule(); /** * map<string, .sonarqube.ws.batch.WsProjectResponse.FileDataByPath> fileDataByModuleAndPatch = 3; */ - java.util.Map + java.util.Map getFileDataByModuleAndPatch(); /** @@ -46,7 +46,7 @@ public final class WsBatch { * Protobuf type {@code sonarqube.ws.batch.WsProjectResponse} * *
-   * WS api/batch/project
+   * WS api/scanner/project
    * 
*/ public static final class WsProjectResponse extends @@ -100,7 +100,7 @@ public final class WsBatch { SettingsByModuleDefaultEntryHolder.defaultEntry); mutable_bitField0_ |= 0x00000002; } - com.google.protobuf.MapEntry + com.google.protobuf.MapEntry settingsByModule = input.readMessage( SettingsByModuleDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); settingsByModule_.getMutableMap().put(settingsByModule.getKey(), settingsByModule.getValue()); @@ -112,7 +112,7 @@ public final class WsBatch { FileDataByModuleAndPatchDefaultEntryHolder.defaultEntry); mutable_bitField0_ |= 0x00000004; } - com.google.protobuf.MapEntry + com.google.protobuf.MapEntry fileDataByModuleAndPatch = input.readMessage( FileDataByModuleAndPatchDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); fileDataByModuleAndPatch_.getMutableMap().put(fileDataByModuleAndPatch.getKey(), fileDataByModuleAndPatch.getValue()); @@ -138,7 +138,7 @@ public final class WsBatch { } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return org.sonarqube.ws.WsBatch.internal_static_sonarqube_ws_batch_WsProjectResponse_descriptor; + return org.sonarqube.ws.WsScanner.internal_static_sonarqube_ws_batch_WsProjectResponse_descriptor; } @SuppressWarnings({"rawtypes"}) @@ -156,9 +156,9 @@ public final class WsBatch { } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return org.sonarqube.ws.WsBatch.internal_static_sonarqube_ws_batch_WsProjectResponse_fieldAccessorTable + return org.sonarqube.ws.WsScanner.internal_static_sonarqube_ws_batch_WsProjectResponse_fieldAccessorTable .ensureFieldAccessorsInitialized( - org.sonarqube.ws.WsBatch.WsProjectResponse.class, org.sonarqube.ws.WsBatch.WsProjectResponse.Builder.class); + org.sonarqube.ws.WsScanner.WsProjectResponse.class, org.sonarqube.ws.WsScanner.WsProjectResponse.Builder.class); } public interface SettingsOrBuilder extends @@ -239,7 +239,7 @@ public final class WsBatch { } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return org.sonarqube.ws.WsBatch.internal_static_sonarqube_ws_batch_WsProjectResponse_Settings_descriptor; + return org.sonarqube.ws.WsScanner.internal_static_sonarqube_ws_batch_WsProjectResponse_Settings_descriptor; } @SuppressWarnings({"rawtypes"}) @@ -255,9 +255,9 @@ public final class WsBatch { } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return org.sonarqube.ws.WsBatch.internal_static_sonarqube_ws_batch_WsProjectResponse_Settings_fieldAccessorTable + return org.sonarqube.ws.WsScanner.internal_static_sonarqube_ws_batch_WsProjectResponse_Settings_fieldAccessorTable .ensureFieldAccessorsInitialized( - org.sonarqube.ws.WsBatch.WsProjectResponse.Settings.class, org.sonarqube.ws.WsBatch.WsProjectResponse.Settings.Builder.class); + org.sonarqube.ws.WsScanner.WsProjectResponse.Settings.class, org.sonarqube.ws.WsScanner.WsProjectResponse.Settings.Builder.class); } public static final int SETTINGS_FIELD_NUMBER = 1; @@ -266,7 +266,7 @@ public final class WsBatch { java.lang.String, java.lang.String> defaultEntry = com.google.protobuf.MapEntry .newDefaultInstance( - org.sonarqube.ws.WsBatch.internal_static_sonarqube_ws_batch_WsProjectResponse_Settings_SettingsEntry_descriptor, + org.sonarqube.ws.WsScanner.internal_static_sonarqube_ws_batch_WsProjectResponse_Settings_SettingsEntry_descriptor, com.google.protobuf.WireFormat.FieldType.STRING, "", com.google.protobuf.WireFormat.FieldType.STRING, @@ -336,53 +336,53 @@ public final class WsBatch { } private static final long serialVersionUID = 0L; - public static org.sonarqube.ws.WsBatch.WsProjectResponse.Settings parseFrom( + public static org.sonarqube.ws.WsScanner.WsProjectResponse.Settings parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static org.sonarqube.ws.WsBatch.WsProjectResponse.Settings parseFrom( + public static org.sonarqube.ws.WsScanner.WsProjectResponse.Settings parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static org.sonarqube.ws.WsBatch.WsProjectResponse.Settings parseFrom(byte[] data) + public static org.sonarqube.ws.WsScanner.WsProjectResponse.Settings parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static org.sonarqube.ws.WsBatch.WsProjectResponse.Settings parseFrom( + public static org.sonarqube.ws.WsScanner.WsProjectResponse.Settings parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static org.sonarqube.ws.WsBatch.WsProjectResponse.Settings parseFrom(java.io.InputStream input) + public static org.sonarqube.ws.WsScanner.WsProjectResponse.Settings parseFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } - public static org.sonarqube.ws.WsBatch.WsProjectResponse.Settings parseFrom( + public static org.sonarqube.ws.WsScanner.WsProjectResponse.Settings parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } - public static org.sonarqube.ws.WsBatch.WsProjectResponse.Settings parseDelimitedFrom(java.io.InputStream input) + public static org.sonarqube.ws.WsScanner.WsProjectResponse.Settings parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseDelimitedFrom(input); } - public static org.sonarqube.ws.WsBatch.WsProjectResponse.Settings parseDelimitedFrom( + public static org.sonarqube.ws.WsScanner.WsProjectResponse.Settings parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseDelimitedFrom(input, extensionRegistry); } - public static org.sonarqube.ws.WsBatch.WsProjectResponse.Settings parseFrom( + public static org.sonarqube.ws.WsScanner.WsProjectResponse.Settings parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } - public static org.sonarqube.ws.WsBatch.WsProjectResponse.Settings parseFrom( + public static org.sonarqube.ws.WsScanner.WsProjectResponse.Settings parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -393,7 +393,7 @@ public final class WsBatch { public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(org.sonarqube.ws.WsBatch.WsProjectResponse.Settings prototype) { + public static Builder newBuilder(org.sonarqube.ws.WsScanner.WsProjectResponse.Settings prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } public Builder toBuilder() { @@ -413,10 +413,10 @@ public final class WsBatch { public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:sonarqube.ws.batch.WsProjectResponse.Settings) - org.sonarqube.ws.WsBatch.WsProjectResponse.SettingsOrBuilder { + org.sonarqube.ws.WsScanner.WsProjectResponse.SettingsOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return org.sonarqube.ws.WsBatch.internal_static_sonarqube_ws_batch_WsProjectResponse_Settings_descriptor; + return org.sonarqube.ws.WsScanner.internal_static_sonarqube_ws_batch_WsProjectResponse_Settings_descriptor; } @SuppressWarnings({"rawtypes"}) @@ -443,12 +443,12 @@ public final class WsBatch { } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return org.sonarqube.ws.WsBatch.internal_static_sonarqube_ws_batch_WsProjectResponse_Settings_fieldAccessorTable + return org.sonarqube.ws.WsScanner.internal_static_sonarqube_ws_batch_WsProjectResponse_Settings_fieldAccessorTable .ensureFieldAccessorsInitialized( - org.sonarqube.ws.WsBatch.WsProjectResponse.Settings.class, org.sonarqube.ws.WsBatch.WsProjectResponse.Settings.Builder.class); + org.sonarqube.ws.WsScanner.WsProjectResponse.Settings.class, org.sonarqube.ws.WsScanner.WsProjectResponse.Settings.Builder.class); } - // Construct using org.sonarqube.ws.WsBatch.WsProjectResponse.Settings.newBuilder() + // Construct using org.sonarqube.ws.WsScanner.WsProjectResponse.Settings.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -470,23 +470,23 @@ public final class WsBatch { public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return org.sonarqube.ws.WsBatch.internal_static_sonarqube_ws_batch_WsProjectResponse_Settings_descriptor; + return org.sonarqube.ws.WsScanner.internal_static_sonarqube_ws_batch_WsProjectResponse_Settings_descriptor; } - public org.sonarqube.ws.WsBatch.WsProjectResponse.Settings getDefaultInstanceForType() { - return org.sonarqube.ws.WsBatch.WsProjectResponse.Settings.getDefaultInstance(); + public org.sonarqube.ws.WsScanner.WsProjectResponse.Settings getDefaultInstanceForType() { + return org.sonarqube.ws.WsScanner.WsProjectResponse.Settings.getDefaultInstance(); } - public org.sonarqube.ws.WsBatch.WsProjectResponse.Settings build() { - org.sonarqube.ws.WsBatch.WsProjectResponse.Settings result = buildPartial(); + public org.sonarqube.ws.WsScanner.WsProjectResponse.Settings build() { + org.sonarqube.ws.WsScanner.WsProjectResponse.Settings result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - public org.sonarqube.ws.WsBatch.WsProjectResponse.Settings buildPartial() { - org.sonarqube.ws.WsBatch.WsProjectResponse.Settings result = new org.sonarqube.ws.WsBatch.WsProjectResponse.Settings(this); + public org.sonarqube.ws.WsScanner.WsProjectResponse.Settings buildPartial() { + org.sonarqube.ws.WsScanner.WsProjectResponse.Settings result = new org.sonarqube.ws.WsScanner.WsProjectResponse.Settings(this); int from_bitField0_ = bitField0_; result.settings_ = internalGetSettings(); result.settings_.makeImmutable(); @@ -495,16 +495,16 @@ public final class WsBatch { } public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof org.sonarqube.ws.WsBatch.WsProjectResponse.Settings) { - return mergeFrom((org.sonarqube.ws.WsBatch.WsProjectResponse.Settings)other); + if (other instanceof org.sonarqube.ws.WsScanner.WsProjectResponse.Settings) { + return mergeFrom((org.sonarqube.ws.WsScanner.WsProjectResponse.Settings)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(org.sonarqube.ws.WsBatch.WsProjectResponse.Settings other) { - if (other == org.sonarqube.ws.WsBatch.WsProjectResponse.Settings.getDefaultInstance()) return this; + public Builder mergeFrom(org.sonarqube.ws.WsScanner.WsProjectResponse.Settings other) { + if (other == org.sonarqube.ws.WsScanner.WsProjectResponse.Settings.getDefaultInstance()) return this; internalGetMutableSettings().mergeFrom( other.internalGetSettings()); this.mergeUnknownFields(other.unknownFields); @@ -520,11 +520,11 @@ public final class WsBatch { com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - org.sonarqube.ws.WsBatch.WsProjectResponse.Settings parsedMessage = null; + org.sonarqube.ws.WsScanner.WsProjectResponse.Settings parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (org.sonarqube.ws.WsBatch.WsProjectResponse.Settings) e.getUnfinishedMessage(); + parsedMessage = (org.sonarqube.ws.WsScanner.WsProjectResponse.Settings) e.getUnfinishedMessage(); throw e; } finally { if (parsedMessage != null) { @@ -575,12 +575,12 @@ public final class WsBatch { } // @@protoc_insertion_point(class_scope:sonarqube.ws.batch.WsProjectResponse.Settings) - private static final org.sonarqube.ws.WsBatch.WsProjectResponse.Settings DEFAULT_INSTANCE; + private static final org.sonarqube.ws.WsScanner.WsProjectResponse.Settings DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new org.sonarqube.ws.WsBatch.WsProjectResponse.Settings(); + DEFAULT_INSTANCE = new org.sonarqube.ws.WsScanner.WsProjectResponse.Settings(); } - public static org.sonarqube.ws.WsBatch.WsProjectResponse.Settings getDefaultInstance() { + public static org.sonarqube.ws.WsScanner.WsProjectResponse.Settings getDefaultInstance() { return DEFAULT_INSTANCE; } @@ -608,7 +608,7 @@ public final class WsBatch { return PARSER; } - public org.sonarqube.ws.WsBatch.WsProjectResponse.Settings getDefaultInstanceForType() { + public org.sonarqube.ws.WsScanner.WsProjectResponse.Settings getDefaultInstanceForType() { return DEFAULT_INSTANCE; } @@ -621,7 +621,7 @@ public final class WsBatch { /** * map<string, .sonarqube.ws.batch.WsProjectResponse.FileData> FileDataByPath = 1; */ - java.util.Map + java.util.Map getFileDataByPath(); } /** @@ -671,7 +671,7 @@ public final class WsBatch { FileDataByPathDefaultEntryHolder.defaultEntry); mutable_bitField0_ |= 0x00000001; } - com.google.protobuf.MapEntry + com.google.protobuf.MapEntry fileDataByPath = input.readMessage( FileDataByPathDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); fileDataByPath_.getMutableMap().put(fileDataByPath.getKey(), fileDataByPath.getValue()); @@ -692,7 +692,7 @@ public final class WsBatch { } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return org.sonarqube.ws.WsBatch.internal_static_sonarqube_ws_batch_WsProjectResponse_FileDataByPath_descriptor; + return org.sonarqube.ws.WsScanner.internal_static_sonarqube_ws_batch_WsProjectResponse_FileDataByPath_descriptor; } @SuppressWarnings({"rawtypes"}) @@ -708,26 +708,26 @@ public final class WsBatch { } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return org.sonarqube.ws.WsBatch.internal_static_sonarqube_ws_batch_WsProjectResponse_FileDataByPath_fieldAccessorTable + return org.sonarqube.ws.WsScanner.internal_static_sonarqube_ws_batch_WsProjectResponse_FileDataByPath_fieldAccessorTable .ensureFieldAccessorsInitialized( - org.sonarqube.ws.WsBatch.WsProjectResponse.FileDataByPath.class, org.sonarqube.ws.WsBatch.WsProjectResponse.FileDataByPath.Builder.class); + org.sonarqube.ws.WsScanner.WsProjectResponse.FileDataByPath.class, org.sonarqube.ws.WsScanner.WsProjectResponse.FileDataByPath.Builder.class); } public static final int FILEDATABYPATH_FIELD_NUMBER = 1; private static final class FileDataByPathDefaultEntryHolder { static final com.google.protobuf.MapEntry< - java.lang.String, org.sonarqube.ws.WsBatch.WsProjectResponse.FileData> defaultEntry = + java.lang.String, org.sonarqube.ws.WsScanner.WsProjectResponse.FileData> defaultEntry = com.google.protobuf.MapEntry - .newDefaultInstance( - org.sonarqube.ws.WsBatch.internal_static_sonarqube_ws_batch_WsProjectResponse_FileDataByPath_FileDataByPathEntry_descriptor, + .newDefaultInstance( + org.sonarqube.ws.WsScanner.internal_static_sonarqube_ws_batch_WsProjectResponse_FileDataByPath_FileDataByPathEntry_descriptor, com.google.protobuf.WireFormat.FieldType.STRING, "", com.google.protobuf.WireFormat.FieldType.MESSAGE, - org.sonarqube.ws.WsBatch.WsProjectResponse.FileData.getDefaultInstance()); + org.sonarqube.ws.WsScanner.WsProjectResponse.FileData.getDefaultInstance()); } private com.google.protobuf.MapField< - java.lang.String, org.sonarqube.ws.WsBatch.WsProjectResponse.FileData> fileDataByPath_; - private com.google.protobuf.MapField + java.lang.String, org.sonarqube.ws.WsScanner.WsProjectResponse.FileData> fileDataByPath_; + private com.google.protobuf.MapField internalGetFileDataByPath() { if (fileDataByPath_ == null) { return com.google.protobuf.MapField.emptyMapField( @@ -739,7 +739,7 @@ public final class WsBatch { * map<string, .sonarqube.ws.batch.WsProjectResponse.FileData> FileDataByPath = 1; */ - public java.util.Map getFileDataByPath() { + public java.util.Map getFileDataByPath() { return internalGetFileDataByPath().getMap(); } @@ -755,9 +755,9 @@ public final class WsBatch { public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - for (java.util.Map.Entry entry + for (java.util.Map.Entry entry : internalGetFileDataByPath().getMap().entrySet()) { - com.google.protobuf.MapEntry + com.google.protobuf.MapEntry fileDataByPath = FileDataByPathDefaultEntryHolder.defaultEntry.newBuilderForType() .setKey(entry.getKey()) .setValue(entry.getValue()) @@ -773,9 +773,9 @@ public final class WsBatch { if (size != -1) return size; size = 0; - for (java.util.Map.Entry entry + for (java.util.Map.Entry entry : internalGetFileDataByPath().getMap().entrySet()) { - com.google.protobuf.MapEntry + com.google.protobuf.MapEntry fileDataByPath = FileDataByPathDefaultEntryHolder.defaultEntry.newBuilderForType() .setKey(entry.getKey()) .setValue(entry.getValue()) @@ -789,53 +789,53 @@ public final class WsBatch { } private static final long serialVersionUID = 0L; - public static org.sonarqube.ws.WsBatch.WsProjectResponse.FileDataByPath parseFrom( + public static org.sonarqube.ws.WsScanner.WsProjectResponse.FileDataByPath parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static org.sonarqube.ws.WsBatch.WsProjectResponse.FileDataByPath parseFrom( + public static org.sonarqube.ws.WsScanner.WsProjectResponse.FileDataByPath parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static org.sonarqube.ws.WsBatch.WsProjectResponse.FileDataByPath parseFrom(byte[] data) + public static org.sonarqube.ws.WsScanner.WsProjectResponse.FileDataByPath parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static org.sonarqube.ws.WsBatch.WsProjectResponse.FileDataByPath parseFrom( + public static org.sonarqube.ws.WsScanner.WsProjectResponse.FileDataByPath parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static org.sonarqube.ws.WsBatch.WsProjectResponse.FileDataByPath parseFrom(java.io.InputStream input) + public static org.sonarqube.ws.WsScanner.WsProjectResponse.FileDataByPath parseFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } - public static org.sonarqube.ws.WsBatch.WsProjectResponse.FileDataByPath parseFrom( + public static org.sonarqube.ws.WsScanner.WsProjectResponse.FileDataByPath parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } - public static org.sonarqube.ws.WsBatch.WsProjectResponse.FileDataByPath parseDelimitedFrom(java.io.InputStream input) + public static org.sonarqube.ws.WsScanner.WsProjectResponse.FileDataByPath parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseDelimitedFrom(input); } - public static org.sonarqube.ws.WsBatch.WsProjectResponse.FileDataByPath parseDelimitedFrom( + public static org.sonarqube.ws.WsScanner.WsProjectResponse.FileDataByPath parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseDelimitedFrom(input, extensionRegistry); } - public static org.sonarqube.ws.WsBatch.WsProjectResponse.FileDataByPath parseFrom( + public static org.sonarqube.ws.WsScanner.WsProjectResponse.FileDataByPath parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } - public static org.sonarqube.ws.WsBatch.WsProjectResponse.FileDataByPath parseFrom( + public static org.sonarqube.ws.WsScanner.WsProjectResponse.FileDataByPath parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -846,7 +846,7 @@ public final class WsBatch { public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(org.sonarqube.ws.WsBatch.WsProjectResponse.FileDataByPath prototype) { + public static Builder newBuilder(org.sonarqube.ws.WsScanner.WsProjectResponse.FileDataByPath prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } public Builder toBuilder() { @@ -866,10 +866,10 @@ public final class WsBatch { public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:sonarqube.ws.batch.WsProjectResponse.FileDataByPath) - org.sonarqube.ws.WsBatch.WsProjectResponse.FileDataByPathOrBuilder { + org.sonarqube.ws.WsScanner.WsProjectResponse.FileDataByPathOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return org.sonarqube.ws.WsBatch.internal_static_sonarqube_ws_batch_WsProjectResponse_FileDataByPath_descriptor; + return org.sonarqube.ws.WsScanner.internal_static_sonarqube_ws_batch_WsProjectResponse_FileDataByPath_descriptor; } @SuppressWarnings({"rawtypes"}) @@ -896,12 +896,12 @@ public final class WsBatch { } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return org.sonarqube.ws.WsBatch.internal_static_sonarqube_ws_batch_WsProjectResponse_FileDataByPath_fieldAccessorTable + return org.sonarqube.ws.WsScanner.internal_static_sonarqube_ws_batch_WsProjectResponse_FileDataByPath_fieldAccessorTable .ensureFieldAccessorsInitialized( - org.sonarqube.ws.WsBatch.WsProjectResponse.FileDataByPath.class, org.sonarqube.ws.WsBatch.WsProjectResponse.FileDataByPath.Builder.class); + org.sonarqube.ws.WsScanner.WsProjectResponse.FileDataByPath.class, org.sonarqube.ws.WsScanner.WsProjectResponse.FileDataByPath.Builder.class); } - // Construct using org.sonarqube.ws.WsBatch.WsProjectResponse.FileDataByPath.newBuilder() + // Construct using org.sonarqube.ws.WsScanner.WsProjectResponse.FileDataByPath.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -923,23 +923,23 @@ public final class WsBatch { public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return org.sonarqube.ws.WsBatch.internal_static_sonarqube_ws_batch_WsProjectResponse_FileDataByPath_descriptor; + return org.sonarqube.ws.WsScanner.internal_static_sonarqube_ws_batch_WsProjectResponse_FileDataByPath_descriptor; } - public org.sonarqube.ws.WsBatch.WsProjectResponse.FileDataByPath getDefaultInstanceForType() { - return org.sonarqube.ws.WsBatch.WsProjectResponse.FileDataByPath.getDefaultInstance(); + public org.sonarqube.ws.WsScanner.WsProjectResponse.FileDataByPath getDefaultInstanceForType() { + return org.sonarqube.ws.WsScanner.WsProjectResponse.FileDataByPath.getDefaultInstance(); } - public org.sonarqube.ws.WsBatch.WsProjectResponse.FileDataByPath build() { - org.sonarqube.ws.WsBatch.WsProjectResponse.FileDataByPath result = buildPartial(); + public org.sonarqube.ws.WsScanner.WsProjectResponse.FileDataByPath build() { + org.sonarqube.ws.WsScanner.WsProjectResponse.FileDataByPath result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - public org.sonarqube.ws.WsBatch.WsProjectResponse.FileDataByPath buildPartial() { - org.sonarqube.ws.WsBatch.WsProjectResponse.FileDataByPath result = new org.sonarqube.ws.WsBatch.WsProjectResponse.FileDataByPath(this); + public org.sonarqube.ws.WsScanner.WsProjectResponse.FileDataByPath buildPartial() { + org.sonarqube.ws.WsScanner.WsProjectResponse.FileDataByPath result = new org.sonarqube.ws.WsScanner.WsProjectResponse.FileDataByPath(this); int from_bitField0_ = bitField0_; result.fileDataByPath_ = internalGetFileDataByPath(); result.fileDataByPath_.makeImmutable(); @@ -948,16 +948,16 @@ public final class WsBatch { } public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof org.sonarqube.ws.WsBatch.WsProjectResponse.FileDataByPath) { - return mergeFrom((org.sonarqube.ws.WsBatch.WsProjectResponse.FileDataByPath)other); + if (other instanceof org.sonarqube.ws.WsScanner.WsProjectResponse.FileDataByPath) { + return mergeFrom((org.sonarqube.ws.WsScanner.WsProjectResponse.FileDataByPath)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(org.sonarqube.ws.WsBatch.WsProjectResponse.FileDataByPath other) { - if (other == org.sonarqube.ws.WsBatch.WsProjectResponse.FileDataByPath.getDefaultInstance()) return this; + public Builder mergeFrom(org.sonarqube.ws.WsScanner.WsProjectResponse.FileDataByPath other) { + if (other == org.sonarqube.ws.WsScanner.WsProjectResponse.FileDataByPath.getDefaultInstance()) return this; internalGetMutableFileDataByPath().mergeFrom( other.internalGetFileDataByPath()); this.mergeUnknownFields(other.unknownFields); @@ -973,11 +973,11 @@ public final class WsBatch { com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - org.sonarqube.ws.WsBatch.WsProjectResponse.FileDataByPath parsedMessage = null; + org.sonarqube.ws.WsScanner.WsProjectResponse.FileDataByPath parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (org.sonarqube.ws.WsBatch.WsProjectResponse.FileDataByPath) e.getUnfinishedMessage(); + parsedMessage = (org.sonarqube.ws.WsScanner.WsProjectResponse.FileDataByPath) e.getUnfinishedMessage(); throw e; } finally { if (parsedMessage != null) { @@ -989,8 +989,8 @@ public final class WsBatch { private int bitField0_; private com.google.protobuf.MapField< - java.lang.String, org.sonarqube.ws.WsBatch.WsProjectResponse.FileData> fileDataByPath_; - private com.google.protobuf.MapField + java.lang.String, org.sonarqube.ws.WsScanner.WsProjectResponse.FileData> fileDataByPath_; + private com.google.protobuf.MapField internalGetFileDataByPath() { if (fileDataByPath_ == null) { return com.google.protobuf.MapField.emptyMapField( @@ -998,7 +998,7 @@ public final class WsBatch { } return fileDataByPath_; } - private com.google.protobuf.MapField + private com.google.protobuf.MapField internalGetMutableFileDataByPath() { onChanged();; if (fileDataByPath_ == null) { @@ -1013,13 +1013,13 @@ public final class WsBatch { /** * map<string, .sonarqube.ws.batch.WsProjectResponse.FileData> FileDataByPath = 1; */ - public java.util.Map getFileDataByPath() { + public java.util.Map getFileDataByPath() { return internalGetFileDataByPath().getMap(); } /** * map<string, .sonarqube.ws.batch.WsProjectResponse.FileData> FileDataByPath = 1; */ - public java.util.Map + public java.util.Map getMutableFileDataByPath() { return internalGetMutableFileDataByPath().getMutableMap(); } @@ -1028,12 +1028,12 @@ public final class WsBatch { } // @@protoc_insertion_point(class_scope:sonarqube.ws.batch.WsProjectResponse.FileDataByPath) - private static final org.sonarqube.ws.WsBatch.WsProjectResponse.FileDataByPath DEFAULT_INSTANCE; + private static final org.sonarqube.ws.WsScanner.WsProjectResponse.FileDataByPath DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new org.sonarqube.ws.WsBatch.WsProjectResponse.FileDataByPath(); + DEFAULT_INSTANCE = new org.sonarqube.ws.WsScanner.WsProjectResponse.FileDataByPath(); } - public static org.sonarqube.ws.WsBatch.WsProjectResponse.FileDataByPath getDefaultInstance() { + public static org.sonarqube.ws.WsScanner.WsProjectResponse.FileDataByPath getDefaultInstance() { return DEFAULT_INSTANCE; } @@ -1061,7 +1061,7 @@ public final class WsBatch { return PARSER; } - public org.sonarqube.ws.WsBatch.WsProjectResponse.FileDataByPath getDefaultInstanceForType() { + public org.sonarqube.ws.WsScanner.WsProjectResponse.FileDataByPath getDefaultInstanceForType() { return DEFAULT_INSTANCE; } @@ -1169,14 +1169,14 @@ public final class WsBatch { } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return org.sonarqube.ws.WsBatch.internal_static_sonarqube_ws_batch_WsProjectResponse_FileData_descriptor; + return org.sonarqube.ws.WsScanner.internal_static_sonarqube_ws_batch_WsProjectResponse_FileData_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return org.sonarqube.ws.WsBatch.internal_static_sonarqube_ws_batch_WsProjectResponse_FileData_fieldAccessorTable + return org.sonarqube.ws.WsScanner.internal_static_sonarqube_ws_batch_WsProjectResponse_FileData_fieldAccessorTable .ensureFieldAccessorsInitialized( - org.sonarqube.ws.WsBatch.WsProjectResponse.FileData.class, org.sonarqube.ws.WsBatch.WsProjectResponse.FileData.Builder.class); + org.sonarqube.ws.WsScanner.WsProjectResponse.FileData.class, org.sonarqube.ws.WsScanner.WsProjectResponse.FileData.Builder.class); } private int bitField0_; @@ -1305,53 +1305,53 @@ public final class WsBatch { } private static final long serialVersionUID = 0L; - public static org.sonarqube.ws.WsBatch.WsProjectResponse.FileData parseFrom( + public static org.sonarqube.ws.WsScanner.WsProjectResponse.FileData parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static org.sonarqube.ws.WsBatch.WsProjectResponse.FileData parseFrom( + public static org.sonarqube.ws.WsScanner.WsProjectResponse.FileData parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static org.sonarqube.ws.WsBatch.WsProjectResponse.FileData parseFrom(byte[] data) + public static org.sonarqube.ws.WsScanner.WsProjectResponse.FileData parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static org.sonarqube.ws.WsBatch.WsProjectResponse.FileData parseFrom( + public static org.sonarqube.ws.WsScanner.WsProjectResponse.FileData parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static org.sonarqube.ws.WsBatch.WsProjectResponse.FileData parseFrom(java.io.InputStream input) + public static org.sonarqube.ws.WsScanner.WsProjectResponse.FileData parseFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } - public static org.sonarqube.ws.WsBatch.WsProjectResponse.FileData parseFrom( + public static org.sonarqube.ws.WsScanner.WsProjectResponse.FileData parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } - public static org.sonarqube.ws.WsBatch.WsProjectResponse.FileData parseDelimitedFrom(java.io.InputStream input) + public static org.sonarqube.ws.WsScanner.WsProjectResponse.FileData parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseDelimitedFrom(input); } - public static org.sonarqube.ws.WsBatch.WsProjectResponse.FileData parseDelimitedFrom( + public static org.sonarqube.ws.WsScanner.WsProjectResponse.FileData parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseDelimitedFrom(input, extensionRegistry); } - public static org.sonarqube.ws.WsBatch.WsProjectResponse.FileData parseFrom( + public static org.sonarqube.ws.WsScanner.WsProjectResponse.FileData parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } - public static org.sonarqube.ws.WsBatch.WsProjectResponse.FileData parseFrom( + public static org.sonarqube.ws.WsScanner.WsProjectResponse.FileData parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -1362,7 +1362,7 @@ public final class WsBatch { public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(org.sonarqube.ws.WsBatch.WsProjectResponse.FileData prototype) { + public static Builder newBuilder(org.sonarqube.ws.WsScanner.WsProjectResponse.FileData prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } public Builder toBuilder() { @@ -1382,20 +1382,20 @@ public final class WsBatch { public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:sonarqube.ws.batch.WsProjectResponse.FileData) - org.sonarqube.ws.WsBatch.WsProjectResponse.FileDataOrBuilder { + org.sonarqube.ws.WsScanner.WsProjectResponse.FileDataOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return org.sonarqube.ws.WsBatch.internal_static_sonarqube_ws_batch_WsProjectResponse_FileData_descriptor; + return org.sonarqube.ws.WsScanner.internal_static_sonarqube_ws_batch_WsProjectResponse_FileData_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return org.sonarqube.ws.WsBatch.internal_static_sonarqube_ws_batch_WsProjectResponse_FileData_fieldAccessorTable + return org.sonarqube.ws.WsScanner.internal_static_sonarqube_ws_batch_WsProjectResponse_FileData_fieldAccessorTable .ensureFieldAccessorsInitialized( - org.sonarqube.ws.WsBatch.WsProjectResponse.FileData.class, org.sonarqube.ws.WsBatch.WsProjectResponse.FileData.Builder.class); + org.sonarqube.ws.WsScanner.WsProjectResponse.FileData.class, org.sonarqube.ws.WsScanner.WsProjectResponse.FileData.Builder.class); } - // Construct using org.sonarqube.ws.WsBatch.WsProjectResponse.FileData.newBuilder() + // Construct using org.sonarqube.ws.WsScanner.WsProjectResponse.FileData.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -1420,23 +1420,23 @@ public final class WsBatch { public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return org.sonarqube.ws.WsBatch.internal_static_sonarqube_ws_batch_WsProjectResponse_FileData_descriptor; + return org.sonarqube.ws.WsScanner.internal_static_sonarqube_ws_batch_WsProjectResponse_FileData_descriptor; } - public org.sonarqube.ws.WsBatch.WsProjectResponse.FileData getDefaultInstanceForType() { - return org.sonarqube.ws.WsBatch.WsProjectResponse.FileData.getDefaultInstance(); + public org.sonarqube.ws.WsScanner.WsProjectResponse.FileData getDefaultInstanceForType() { + return org.sonarqube.ws.WsScanner.WsProjectResponse.FileData.getDefaultInstance(); } - public org.sonarqube.ws.WsBatch.WsProjectResponse.FileData build() { - org.sonarqube.ws.WsBatch.WsProjectResponse.FileData result = buildPartial(); + public org.sonarqube.ws.WsScanner.WsProjectResponse.FileData build() { + org.sonarqube.ws.WsScanner.WsProjectResponse.FileData result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - public org.sonarqube.ws.WsBatch.WsProjectResponse.FileData buildPartial() { - org.sonarqube.ws.WsBatch.WsProjectResponse.FileData result = new org.sonarqube.ws.WsBatch.WsProjectResponse.FileData(this); + public org.sonarqube.ws.WsScanner.WsProjectResponse.FileData buildPartial() { + org.sonarqube.ws.WsScanner.WsProjectResponse.FileData result = new org.sonarqube.ws.WsScanner.WsProjectResponse.FileData(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { @@ -1453,16 +1453,16 @@ public final class WsBatch { } public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof org.sonarqube.ws.WsBatch.WsProjectResponse.FileData) { - return mergeFrom((org.sonarqube.ws.WsBatch.WsProjectResponse.FileData)other); + if (other instanceof org.sonarqube.ws.WsScanner.WsProjectResponse.FileData) { + return mergeFrom((org.sonarqube.ws.WsScanner.WsProjectResponse.FileData)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(org.sonarqube.ws.WsBatch.WsProjectResponse.FileData other) { - if (other == org.sonarqube.ws.WsBatch.WsProjectResponse.FileData.getDefaultInstance()) return this; + public Builder mergeFrom(org.sonarqube.ws.WsScanner.WsProjectResponse.FileData other) { + if (other == org.sonarqube.ws.WsScanner.WsProjectResponse.FileData.getDefaultInstance()) return this; if (other.hasHash()) { bitField0_ |= 0x00000001; hash_ = other.hash_; @@ -1486,11 +1486,11 @@ public final class WsBatch { com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - org.sonarqube.ws.WsBatch.WsProjectResponse.FileData parsedMessage = null; + org.sonarqube.ws.WsScanner.WsProjectResponse.FileData parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (org.sonarqube.ws.WsBatch.WsProjectResponse.FileData) e.getUnfinishedMessage(); + parsedMessage = (org.sonarqube.ws.WsScanner.WsProjectResponse.FileData) e.getUnfinishedMessage(); throw e; } finally { if (parsedMessage != null) { @@ -1657,12 +1657,12 @@ public final class WsBatch { } // @@protoc_insertion_point(class_scope:sonarqube.ws.batch.WsProjectResponse.FileData) - private static final org.sonarqube.ws.WsBatch.WsProjectResponse.FileData DEFAULT_INSTANCE; + private static final org.sonarqube.ws.WsScanner.WsProjectResponse.FileData DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new org.sonarqube.ws.WsBatch.WsProjectResponse.FileData(); + DEFAULT_INSTANCE = new org.sonarqube.ws.WsScanner.WsProjectResponse.FileData(); } - public static org.sonarqube.ws.WsBatch.WsProjectResponse.FileData getDefaultInstance() { + public static org.sonarqube.ws.WsScanner.WsProjectResponse.FileData getDefaultInstance() { return DEFAULT_INSTANCE; } @@ -1690,7 +1690,7 @@ public final class WsBatch { return PARSER; } - public org.sonarqube.ws.WsBatch.WsProjectResponse.FileData getDefaultInstanceForType() { + public org.sonarqube.ws.WsScanner.WsProjectResponse.FileData getDefaultInstanceForType() { return DEFAULT_INSTANCE; } @@ -1715,18 +1715,18 @@ public final class WsBatch { public static final int SETTINGSBYMODULE_FIELD_NUMBER = 2; private static final class SettingsByModuleDefaultEntryHolder { static final com.google.protobuf.MapEntry< - java.lang.String, org.sonarqube.ws.WsBatch.WsProjectResponse.Settings> defaultEntry = + java.lang.String, org.sonarqube.ws.WsScanner.WsProjectResponse.Settings> defaultEntry = com.google.protobuf.MapEntry - .newDefaultInstance( - org.sonarqube.ws.WsBatch.internal_static_sonarqube_ws_batch_WsProjectResponse_SettingsByModuleEntry_descriptor, + .newDefaultInstance( + org.sonarqube.ws.WsScanner.internal_static_sonarqube_ws_batch_WsProjectResponse_SettingsByModuleEntry_descriptor, com.google.protobuf.WireFormat.FieldType.STRING, "", com.google.protobuf.WireFormat.FieldType.MESSAGE, - org.sonarqube.ws.WsBatch.WsProjectResponse.Settings.getDefaultInstance()); + org.sonarqube.ws.WsScanner.WsProjectResponse.Settings.getDefaultInstance()); } private com.google.protobuf.MapField< - java.lang.String, org.sonarqube.ws.WsBatch.WsProjectResponse.Settings> settingsByModule_; - private com.google.protobuf.MapField + java.lang.String, org.sonarqube.ws.WsScanner.WsProjectResponse.Settings> settingsByModule_; + private com.google.protobuf.MapField internalGetSettingsByModule() { if (settingsByModule_ == null) { return com.google.protobuf.MapField.emptyMapField( @@ -1738,25 +1738,25 @@ public final class WsBatch { * map<string, .sonarqube.ws.batch.WsProjectResponse.Settings> settingsByModule = 2; */ - public java.util.Map getSettingsByModule() { + public java.util.Map getSettingsByModule() { return internalGetSettingsByModule().getMap(); } public static final int FILEDATABYMODULEANDPATCH_FIELD_NUMBER = 3; private static final class FileDataByModuleAndPatchDefaultEntryHolder { static final com.google.protobuf.MapEntry< - java.lang.String, org.sonarqube.ws.WsBatch.WsProjectResponse.FileDataByPath> defaultEntry = + java.lang.String, org.sonarqube.ws.WsScanner.WsProjectResponse.FileDataByPath> defaultEntry = com.google.protobuf.MapEntry - .newDefaultInstance( - org.sonarqube.ws.WsBatch.internal_static_sonarqube_ws_batch_WsProjectResponse_FileDataByModuleAndPatchEntry_descriptor, + .newDefaultInstance( + org.sonarqube.ws.WsScanner.internal_static_sonarqube_ws_batch_WsProjectResponse_FileDataByModuleAndPatchEntry_descriptor, com.google.protobuf.WireFormat.FieldType.STRING, "", com.google.protobuf.WireFormat.FieldType.MESSAGE, - org.sonarqube.ws.WsBatch.WsProjectResponse.FileDataByPath.getDefaultInstance()); + org.sonarqube.ws.WsScanner.WsProjectResponse.FileDataByPath.getDefaultInstance()); } private com.google.protobuf.MapField< - java.lang.String, org.sonarqube.ws.WsBatch.WsProjectResponse.FileDataByPath> fileDataByModuleAndPatch_; - private com.google.protobuf.MapField + java.lang.String, org.sonarqube.ws.WsScanner.WsProjectResponse.FileDataByPath> fileDataByModuleAndPatch_; + private com.google.protobuf.MapField internalGetFileDataByModuleAndPatch() { if (fileDataByModuleAndPatch_ == null) { return com.google.protobuf.MapField.emptyMapField( @@ -1768,7 +1768,7 @@ public final class WsBatch { * map<string, .sonarqube.ws.batch.WsProjectResponse.FileDataByPath> fileDataByModuleAndPatch = 3; */ - public java.util.Map getFileDataByModuleAndPatch() { + public java.util.Map getFileDataByModuleAndPatch() { return internalGetFileDataByModuleAndPatch().getMap(); } @@ -1802,18 +1802,18 @@ public final class WsBatch { if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeInt64(1, timestamp_); } - for (java.util.Map.Entry entry + for (java.util.Map.Entry entry : internalGetSettingsByModule().getMap().entrySet()) { - com.google.protobuf.MapEntry + com.google.protobuf.MapEntry settingsByModule = SettingsByModuleDefaultEntryHolder.defaultEntry.newBuilderForType() .setKey(entry.getKey()) .setValue(entry.getValue()) .build(); output.writeMessage(2, settingsByModule); } - for (java.util.Map.Entry entry + for (java.util.Map.Entry entry : internalGetFileDataByModuleAndPatch().getMap().entrySet()) { - com.google.protobuf.MapEntry + com.google.protobuf.MapEntry fileDataByModuleAndPatch = FileDataByModuleAndPatchDefaultEntryHolder.defaultEntry.newBuilderForType() .setKey(entry.getKey()) .setValue(entry.getValue()) @@ -1836,9 +1836,9 @@ public final class WsBatch { size += com.google.protobuf.CodedOutputStream .computeInt64Size(1, timestamp_); } - for (java.util.Map.Entry entry + for (java.util.Map.Entry entry : internalGetSettingsByModule().getMap().entrySet()) { - com.google.protobuf.MapEntry + com.google.protobuf.MapEntry settingsByModule = SettingsByModuleDefaultEntryHolder.defaultEntry.newBuilderForType() .setKey(entry.getKey()) .setValue(entry.getValue()) @@ -1846,9 +1846,9 @@ public final class WsBatch { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, settingsByModule); } - for (java.util.Map.Entry entry + for (java.util.Map.Entry entry : internalGetFileDataByModuleAndPatch().getMap().entrySet()) { - com.google.protobuf.MapEntry + com.google.protobuf.MapEntry fileDataByModuleAndPatch = FileDataByModuleAndPatchDefaultEntryHolder.defaultEntry.newBuilderForType() .setKey(entry.getKey()) .setValue(entry.getValue()) @@ -1866,53 +1866,53 @@ public final class WsBatch { } private static final long serialVersionUID = 0L; - public static org.sonarqube.ws.WsBatch.WsProjectResponse parseFrom( + public static org.sonarqube.ws.WsScanner.WsProjectResponse parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static org.sonarqube.ws.WsBatch.WsProjectResponse parseFrom( + public static org.sonarqube.ws.WsScanner.WsProjectResponse parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static org.sonarqube.ws.WsBatch.WsProjectResponse parseFrom(byte[] data) + public static org.sonarqube.ws.WsScanner.WsProjectResponse parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static org.sonarqube.ws.WsBatch.WsProjectResponse parseFrom( + public static org.sonarqube.ws.WsScanner.WsProjectResponse parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static org.sonarqube.ws.WsBatch.WsProjectResponse parseFrom(java.io.InputStream input) + public static org.sonarqube.ws.WsScanner.WsProjectResponse parseFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } - public static org.sonarqube.ws.WsBatch.WsProjectResponse parseFrom( + public static org.sonarqube.ws.WsScanner.WsProjectResponse parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } - public static org.sonarqube.ws.WsBatch.WsProjectResponse parseDelimitedFrom(java.io.InputStream input) + public static org.sonarqube.ws.WsScanner.WsProjectResponse parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseDelimitedFrom(input); } - public static org.sonarqube.ws.WsBatch.WsProjectResponse parseDelimitedFrom( + public static org.sonarqube.ws.WsScanner.WsProjectResponse parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseDelimitedFrom(input, extensionRegistry); } - public static org.sonarqube.ws.WsBatch.WsProjectResponse parseFrom( + public static org.sonarqube.ws.WsScanner.WsProjectResponse parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } - public static org.sonarqube.ws.WsBatch.WsProjectResponse parseFrom( + public static org.sonarqube.ws.WsScanner.WsProjectResponse parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -1923,7 +1923,7 @@ public final class WsBatch { public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(org.sonarqube.ws.WsBatch.WsProjectResponse prototype) { + public static Builder newBuilder(org.sonarqube.ws.WsScanner.WsProjectResponse prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } public Builder toBuilder() { @@ -1941,16 +1941,16 @@ public final class WsBatch { * Protobuf type {@code sonarqube.ws.batch.WsProjectResponse} * *
-     * WS api/batch/project
+     * WS api/scanner/project
      * 
*/ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:sonarqube.ws.batch.WsProjectResponse) - org.sonarqube.ws.WsBatch.WsProjectResponseOrBuilder { + org.sonarqube.ws.WsScanner.WsProjectResponseOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return org.sonarqube.ws.WsBatch.internal_static_sonarqube_ws_batch_WsProjectResponse_descriptor; + return org.sonarqube.ws.WsScanner.internal_static_sonarqube_ws_batch_WsProjectResponse_descriptor; } @SuppressWarnings({"rawtypes"}) @@ -1981,12 +1981,12 @@ public final class WsBatch { } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return org.sonarqube.ws.WsBatch.internal_static_sonarqube_ws_batch_WsProjectResponse_fieldAccessorTable + return org.sonarqube.ws.WsScanner.internal_static_sonarqube_ws_batch_WsProjectResponse_fieldAccessorTable .ensureFieldAccessorsInitialized( - org.sonarqube.ws.WsBatch.WsProjectResponse.class, org.sonarqube.ws.WsBatch.WsProjectResponse.Builder.class); + org.sonarqube.ws.WsScanner.WsProjectResponse.class, org.sonarqube.ws.WsScanner.WsProjectResponse.Builder.class); } - // Construct using org.sonarqube.ws.WsBatch.WsProjectResponse.newBuilder() + // Construct using org.sonarqube.ws.WsScanner.WsProjectResponse.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -2013,23 +2013,23 @@ public final class WsBatch { public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return org.sonarqube.ws.WsBatch.internal_static_sonarqube_ws_batch_WsProjectResponse_descriptor; + return org.sonarqube.ws.WsScanner.internal_static_sonarqube_ws_batch_WsProjectResponse_descriptor; } - public org.sonarqube.ws.WsBatch.WsProjectResponse getDefaultInstanceForType() { - return org.sonarqube.ws.WsBatch.WsProjectResponse.getDefaultInstance(); + public org.sonarqube.ws.WsScanner.WsProjectResponse getDefaultInstanceForType() { + return org.sonarqube.ws.WsScanner.WsProjectResponse.getDefaultInstance(); } - public org.sonarqube.ws.WsBatch.WsProjectResponse build() { - org.sonarqube.ws.WsBatch.WsProjectResponse result = buildPartial(); + public org.sonarqube.ws.WsScanner.WsProjectResponse build() { + org.sonarqube.ws.WsScanner.WsProjectResponse result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - public org.sonarqube.ws.WsBatch.WsProjectResponse buildPartial() { - org.sonarqube.ws.WsBatch.WsProjectResponse result = new org.sonarqube.ws.WsBatch.WsProjectResponse(this); + public org.sonarqube.ws.WsScanner.WsProjectResponse buildPartial() { + org.sonarqube.ws.WsScanner.WsProjectResponse result = new org.sonarqube.ws.WsScanner.WsProjectResponse(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { @@ -2050,16 +2050,16 @@ public final class WsBatch { } public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof org.sonarqube.ws.WsBatch.WsProjectResponse) { - return mergeFrom((org.sonarqube.ws.WsBatch.WsProjectResponse)other); + if (other instanceof org.sonarqube.ws.WsScanner.WsProjectResponse) { + return mergeFrom((org.sonarqube.ws.WsScanner.WsProjectResponse)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(org.sonarqube.ws.WsBatch.WsProjectResponse other) { - if (other == org.sonarqube.ws.WsBatch.WsProjectResponse.getDefaultInstance()) return this; + public Builder mergeFrom(org.sonarqube.ws.WsScanner.WsProjectResponse other) { + if (other == org.sonarqube.ws.WsScanner.WsProjectResponse.getDefaultInstance()) return this; if (other.hasTimestamp()) { setTimestamp(other.getTimestamp()); } @@ -2083,11 +2083,11 @@ public final class WsBatch { com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - org.sonarqube.ws.WsBatch.WsProjectResponse parsedMessage = null; + org.sonarqube.ws.WsScanner.WsProjectResponse parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (org.sonarqube.ws.WsBatch.WsProjectResponse) e.getUnfinishedMessage(); + parsedMessage = (org.sonarqube.ws.WsScanner.WsProjectResponse) e.getUnfinishedMessage(); throw e; } finally { if (parsedMessage != null) { @@ -2131,8 +2131,8 @@ public final class WsBatch { } private com.google.protobuf.MapField< - java.lang.String, org.sonarqube.ws.WsBatch.WsProjectResponse.Settings> settingsByModule_; - private com.google.protobuf.MapField + java.lang.String, org.sonarqube.ws.WsScanner.WsProjectResponse.Settings> settingsByModule_; + private com.google.protobuf.MapField internalGetSettingsByModule() { if (settingsByModule_ == null) { return com.google.protobuf.MapField.emptyMapField( @@ -2140,7 +2140,7 @@ public final class WsBatch { } return settingsByModule_; } - private com.google.protobuf.MapField + private com.google.protobuf.MapField internalGetMutableSettingsByModule() { onChanged();; if (settingsByModule_ == null) { @@ -2155,20 +2155,20 @@ public final class WsBatch { /** * map<string, .sonarqube.ws.batch.WsProjectResponse.Settings> settingsByModule = 2; */ - public java.util.Map getSettingsByModule() { + public java.util.Map getSettingsByModule() { return internalGetSettingsByModule().getMap(); } /** * map<string, .sonarqube.ws.batch.WsProjectResponse.Settings> settingsByModule = 2; */ - public java.util.Map + public java.util.Map getMutableSettingsByModule() { return internalGetMutableSettingsByModule().getMutableMap(); } private com.google.protobuf.MapField< - java.lang.String, org.sonarqube.ws.WsBatch.WsProjectResponse.FileDataByPath> fileDataByModuleAndPatch_; - private com.google.protobuf.MapField + java.lang.String, org.sonarqube.ws.WsScanner.WsProjectResponse.FileDataByPath> fileDataByModuleAndPatch_; + private com.google.protobuf.MapField internalGetFileDataByModuleAndPatch() { if (fileDataByModuleAndPatch_ == null) { return com.google.protobuf.MapField.emptyMapField( @@ -2176,7 +2176,7 @@ public final class WsBatch { } return fileDataByModuleAndPatch_; } - private com.google.protobuf.MapField + private com.google.protobuf.MapField internalGetMutableFileDataByModuleAndPatch() { onChanged();; if (fileDataByModuleAndPatch_ == null) { @@ -2191,13 +2191,13 @@ public final class WsBatch { /** * map<string, .sonarqube.ws.batch.WsProjectResponse.FileDataByPath> fileDataByModuleAndPatch = 3; */ - public java.util.Map getFileDataByModuleAndPatch() { + public java.util.Map getFileDataByModuleAndPatch() { return internalGetFileDataByModuleAndPatch().getMap(); } /** * map<string, .sonarqube.ws.batch.WsProjectResponse.FileDataByPath> fileDataByModuleAndPatch = 3; */ - public java.util.Map + public java.util.Map getMutableFileDataByModuleAndPatch() { return internalGetMutableFileDataByModuleAndPatch().getMutableMap(); } @@ -2238,12 +2238,12 @@ public final class WsBatch { } // @@protoc_insertion_point(class_scope:sonarqube.ws.batch.WsProjectResponse) - private static final org.sonarqube.ws.WsBatch.WsProjectResponse DEFAULT_INSTANCE; + private static final org.sonarqube.ws.WsScanner.WsProjectResponse DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new org.sonarqube.ws.WsBatch.WsProjectResponse(); + DEFAULT_INSTANCE = new org.sonarqube.ws.WsScanner.WsProjectResponse(); } - public static org.sonarqube.ws.WsBatch.WsProjectResponse getDefaultInstance() { + public static org.sonarqube.ws.WsScanner.WsProjectResponse getDefaultInstance() { return DEFAULT_INSTANCE; } @@ -2271,7 +2271,7 @@ public final class WsBatch { return PARSER; } - public org.sonarqube.ws.WsBatch.WsProjectResponse getDefaultInstanceForType() { + public org.sonarqube.ws.WsScanner.WsProjectResponse getDefaultInstanceForType() { return DEFAULT_INSTANCE; } @@ -2326,30 +2326,30 @@ public final class WsBatch { descriptor; static { java.lang.String[] descriptorData = { - "\n\016ws-batch.proto\022\022sonarqube.ws.batch\"\364\006\n" + - "\021WsProjectResponse\022\021\n\ttimestamp\030\001 \001(\003\022U\n" + - "\020settingsByModule\030\002 \003(\0132;.sonarqube.ws.b" + - "atch.WsProjectResponse.SettingsByModuleE" + - "ntry\022e\n\030fileDataByModuleAndPatch\030\003 \003(\0132C" + - ".sonarqube.ws.batch.WsProjectResponse.Fi" + - "leDataByModuleAndPatchEntry\022\030\n\020lastAnaly" + - "sisDate\030\004 \001(\003\032g\n\025SettingsByModuleEntry\022\013" + - "\n\003key\030\001 \001(\t\022=\n\005value\030\002 \001(\0132..sonarqube.w" + - "s.batch.WsProjectResponse.Settings:\0028\001\032u", - "\n\035FileDataByModuleAndPatchEntry\022\013\n\003key\030\001" + - " \001(\t\022C\n\005value\030\002 \001(\01324.sonarqube.ws.batch" + - ".WsProjectResponse.FileDataByPath:\0028\001\032\213\001" + - "\n\010Settings\022N\n\010settings\030\001 \003(\0132<.sonarqube" + - ".ws.batch.WsProjectResponse.Settings.Set" + - "tingsEntry\032/\n\rSettingsEntry\022\013\n\003key\030\001 \001(\t" + - "\022\r\n\005value\030\002 \001(\t:\0028\001\032\331\001\n\016FileDataByPath\022`" + - "\n\016FileDataByPath\030\001 \003(\0132H.sonarqube.ws.ba" + - "tch.WsProjectResponse.FileDataByPath.Fil" + - "eDataByPathEntry\032e\n\023FileDataByPathEntry\022", - "\013\n\003key\030\001 \001(\t\022=\n\005value\030\002 \001(\0132..sonarqube." + - "ws.batch.WsProjectResponse.FileData:\0028\001\032" + - "*\n\010FileData\022\014\n\004hash\030\001 \001(\t\022\020\n\010revision\030\002 " + - "\001(\tB\035\n\020org.sonarqube.wsB\007WsBatchH\001" + "\n\020ws-scanner.proto\022\022sonarqube.ws.batch\"\364" + + "\006\n\021WsProjectResponse\022\021\n\ttimestamp\030\001 \001(\003\022" + + "U\n\020settingsByModule\030\002 \003(\0132;.sonarqube.ws" + + ".batch.WsProjectResponse.SettingsByModul" + + "eEntry\022e\n\030fileDataByModuleAndPatch\030\003 \003(\013" + + "2C.sonarqube.ws.batch.WsProjectResponse." + + "FileDataByModuleAndPatchEntry\022\030\n\020lastAna" + + "lysisDate\030\004 \001(\003\032g\n\025SettingsByModuleEntry" + + "\022\013\n\003key\030\001 \001(\t\022=\n\005value\030\002 \001(\0132..sonarqube" + + ".ws.batch.WsProjectResponse.Settings:\0028\001", + "\032u\n\035FileDataByModuleAndPatchEntry\022\013\n\003key" + + "\030\001 \001(\t\022C\n\005value\030\002 \001(\01324.sonarqube.ws.bat" + + "ch.WsProjectResponse.FileDataByPath:\0028\001\032" + + "\213\001\n\010Settings\022N\n\010settings\030\001 \003(\0132<.sonarqu" + + "be.ws.batch.WsProjectResponse.Settings.S" + + "ettingsEntry\032/\n\rSettingsEntry\022\013\n\003key\030\001 \001" + + "(\t\022\r\n\005value\030\002 \001(\t:\0028\001\032\331\001\n\016FileDataByPath" + + "\022`\n\016FileDataByPath\030\001 \003(\0132H.sonarqube.ws." + + "batch.WsProjectResponse.FileDataByPath.F" + + "ileDataByPathEntry\032e\n\023FileDataByPathEntr", + "y\022\013\n\003key\030\001 \001(\t\022=\n\005value\030\002 \001(\0132..sonarqub" + + "e.ws.batch.WsProjectResponse.FileData:\0028" + + "\001\032*\n\010FileData\022\014\n\004hash\030\001 \001(\t\022\020\n\010revision\030" + + "\002 \001(\tB\037\n\020org.sonarqube.wsB\tWsScannerH\001" }; com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { diff --git a/sonar-ws/src/main/protobuf/ws-batch.proto b/sonar-ws/src/main/protobuf/ws-scanner.proto similarity index 95% rename from sonar-ws/src/main/protobuf/ws-batch.proto rename to sonar-ws/src/main/protobuf/ws-scanner.proto index cf46d50e59e..0f608533cc8 100644 --- a/sonar-ws/src/main/protobuf/ws-batch.proto +++ b/sonar-ws/src/main/protobuf/ws-scanner.proto @@ -21,11 +21,11 @@ syntax = "proto2"; package sonarqube.ws.batch; option java_package = "org.sonarqube.ws"; -option java_outer_classname = "WsBatch"; +option java_outer_classname = "WsScanner"; option optimize_for = SPEED; -// WS api/batch/project +// WS api/scanner/project message WsProjectResponse { optional int64 timestamp = 1; map settingsByModule = 2; -- 2.39.5