aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--server/sonar-server/src/main/java/org/sonar/server/activity/ws/ActivitiesWs.java (renamed from server/sonar-server/src/main/java/org/sonar/server/activity/ws/ActivitiesWebService.java)8
-rw-r--r--server/sonar-server/src/main/java/org/sonar/server/computation/ws/ComputationWs.java (renamed from server/sonar-server/src/main/java/org/sonar/server/computation/ws/ComputationWebService.java)8
-rw-r--r--server/sonar-server/src/main/java/org/sonar/server/computation/ws/ComputationWsAction.java2
-rw-r--r--server/sonar-server/src/main/java/org/sonar/server/computation/ws/IsQueueEmptyWs.java (renamed from server/sonar-server/src/main/java/org/sonar/server/computation/ws/IsQueueEmptyWebService.java)4
-rw-r--r--server/sonar-server/src/main/java/org/sonar/server/dashboard/ws/DashboardsWs.java (renamed from server/sonar-server/src/main/java/org/sonar/server/dashboard/ws/DashboardsWebService.java)4
-rw-r--r--server/sonar-server/src/main/java/org/sonar/server/platform/ServerComponents.java20
-rw-r--r--server/sonar-server/src/main/java/org/sonar/server/rule/ws/RulesWs.java (renamed from server/sonar-server/src/main/java/org/sonar/server/rule/ws/RulesWebService.java)4
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/activity/ws/ActivitiesWsMediumTest.java (renamed from server/sonar-server/src/test/java/org/sonar/server/activity/ws/ActivitiesWebServiceMediumTest.java)8
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/computation/ws/ComputationWsTest.java (renamed from server/sonar-server/src/test/java/org/sonar/server/computation/ws/ComputationWebServiceTest.java)4
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/computation/ws/IsQueueEmptyWsTest.java (renamed from server/sonar-server/src/test/java/org/sonar/server/computation/ws/IsQueueEmptyWebServiceTest.java)6
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/computation/ws/QueueWsActionTest.java6
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/computation/ws/SubmitReportWsActionTest.java6
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/rule/ws/AppActionTest.java2
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/rule/ws/DeleteActionTest.java2
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/rule/ws/RepositoriesActionTest.java4
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/rule/ws/RulesWsMediumTest.java (renamed from server/sonar-server/src/test/java/org/sonar/server/rule/ws/RulesWebServiceMediumTest.java)6
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/ws/ListingWsTest.java8
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/ws/WebServiceEngineTest.java15
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/web/RubyRailsWebservice.java2
-rw-r--r--sonar-plugin-api/src/test/java/org/sonar/api/server/ws/RequestTest.java4
-rw-r--r--sonar-plugin-api/src/test/java/org/sonar/api/server/ws/WebServiceTest.java10
21 files changed, 67 insertions, 66 deletions
diff --git a/server/sonar-server/src/main/java/org/sonar/server/activity/ws/ActivitiesWebService.java b/server/sonar-server/src/main/java/org/sonar/server/activity/ws/ActivitiesWs.java
index 925a0456d2b..8dfb980175e 100644
--- a/server/sonar-server/src/main/java/org/sonar/server/activity/ws/ActivitiesWebService.java
+++ b/server/sonar-server/src/main/java/org/sonar/server/activity/ws/ActivitiesWs.java
@@ -21,20 +21,20 @@ package org.sonar.server.activity.ws;
import org.sonar.api.server.ws.WebService;
-public class ActivitiesWebService implements WebService {
+public class ActivitiesWs implements WebService {
- public static final String API_ENDPOINT = "api/activities";
+ public static final String ENDPOINT = "api/activities";
private final SearchAction search;
- public ActivitiesWebService(SearchAction search) {
+ public ActivitiesWs(SearchAction search) {
this.search = search;
}
@Override
public void define(Context context) {
NewController controller = context
- .createController(API_ENDPOINT)
+ .createController(ENDPOINT)
.setDescription("Tracking of activities");
search.define(controller);
diff --git a/server/sonar-server/src/main/java/org/sonar/server/computation/ws/ComputationWebService.java b/server/sonar-server/src/main/java/org/sonar/server/computation/ws/ComputationWs.java
index e048ff397c7..41507396418 100644
--- a/server/sonar-server/src/main/java/org/sonar/server/computation/ws/ComputationWebService.java
+++ b/server/sonar-server/src/main/java/org/sonar/server/computation/ws/ComputationWs.java
@@ -30,19 +30,19 @@ import org.sonar.api.server.ws.WebService;
* <li>persistence in datastores (database/elasticsearch)</li>
* </ul>
*/
-public class ComputationWebService implements WebService {
- public static final String API_ENDPOINT = "api/computation";
+public class ComputationWs implements WebService {
+ public static final String ENDPOINT = "api/computation";
private final ComputationWsAction[] actions;
- public ComputationWebService(ComputationWsAction... actions) {
+ public ComputationWs(ComputationWsAction... actions) {
this.actions = actions;
}
@Override
public void define(Context context) {
NewController controller = context
- .createController(API_ENDPOINT)
+ .createController(ENDPOINT)
.setDescription("Analysis reports processed");
for (ComputationWsAction action : actions) {
action.define(controller);
diff --git a/server/sonar-server/src/main/java/org/sonar/server/computation/ws/ComputationWsAction.java b/server/sonar-server/src/main/java/org/sonar/server/computation/ws/ComputationWsAction.java
index 4cf4afc3b67..a4a9dd772c1 100644
--- a/server/sonar-server/src/main/java/org/sonar/server/computation/ws/ComputationWsAction.java
+++ b/server/sonar-server/src/main/java/org/sonar/server/computation/ws/ComputationWsAction.java
@@ -22,7 +22,7 @@ package org.sonar.server.computation.ws;
import org.sonar.api.server.ws.WebService;
/**
- * Used by {@link ComputationWebService} to
+ * Used by {@link ComputationWs} to
* loop over all its actions
*/
interface ComputationWsAction {
diff --git a/server/sonar-server/src/main/java/org/sonar/server/computation/ws/IsQueueEmptyWebService.java b/server/sonar-server/src/main/java/org/sonar/server/computation/ws/IsQueueEmptyWs.java
index 611043076e6..d9c83b0fff1 100644
--- a/server/sonar-server/src/main/java/org/sonar/server/computation/ws/IsQueueEmptyWebService.java
+++ b/server/sonar-server/src/main/java/org/sonar/server/computation/ws/IsQueueEmptyWs.java
@@ -33,12 +33,12 @@ import java.util.List;
/**
* Internal WebService with one action
*/
-public class IsQueueEmptyWebService implements WebService {
+public class IsQueueEmptyWs implements WebService {
public static final String API_ENDPOINT = "api/analysis_reports";
private final IsQueueEmptyWsAction action;
- public IsQueueEmptyWebService(ReportQueue queue) {
+ public IsQueueEmptyWs(ReportQueue queue) {
this.action = new IsQueueEmptyWsAction(queue);
}
diff --git a/server/sonar-server/src/main/java/org/sonar/server/dashboard/ws/DashboardsWebService.java b/server/sonar-server/src/main/java/org/sonar/server/dashboard/ws/DashboardsWs.java
index 3c523a6ddce..b3c8c7d93fa 100644
--- a/server/sonar-server/src/main/java/org/sonar/server/dashboard/ws/DashboardsWebService.java
+++ b/server/sonar-server/src/main/java/org/sonar/server/dashboard/ws/DashboardsWs.java
@@ -21,11 +21,11 @@ package org.sonar.server.dashboard.ws;
import org.sonar.api.server.ws.WebService;
-public class DashboardsWebService implements WebService {
+public class DashboardsWs implements WebService {
private final DashboardsAction[] actions;
- public DashboardsWebService(DashboardsAction... actions) {
+ public DashboardsWs(DashboardsAction... actions) {
this.actions = actions;
}
diff --git a/server/sonar-server/src/main/java/org/sonar/server/platform/ServerComponents.java b/server/sonar-server/src/main/java/org/sonar/server/platform/ServerComponents.java
index 4f1c92c55a7..cfaa9efc252 100644
--- a/server/sonar-server/src/main/java/org/sonar/server/platform/ServerComponents.java
+++ b/server/sonar-server/src/main/java/org/sonar/server/platform/ServerComponents.java
@@ -87,7 +87,7 @@ import org.sonar.server.activity.db.ActivityDao;
import org.sonar.server.activity.index.ActivityIndex;
import org.sonar.server.activity.index.ActivityIndexDefinition;
import org.sonar.server.activity.index.ActivityIndexer;
-import org.sonar.server.activity.ws.ActivitiesWebService;
+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.BatchIndex;
@@ -116,9 +116,9 @@ import org.sonar.server.computation.ComputationThreadLauncher;
import org.sonar.server.computation.ReportQueue;
import org.sonar.server.computation.ReportQueueCleaner;
import org.sonar.server.computation.db.AnalysisReportDao;
-import org.sonar.server.computation.ws.ComputationWebService;
+import org.sonar.server.computation.ws.ComputationWs;
import org.sonar.server.computation.ws.HistoryWsAction;
-import org.sonar.server.computation.ws.IsQueueEmptyWebService;
+import org.sonar.server.computation.ws.IsQueueEmptyWs;
import org.sonar.server.computation.ws.QueueWsAction;
import org.sonar.server.computation.ws.SubmitReportWsAction;
import org.sonar.server.config.ws.PropertiesWs;
@@ -126,7 +126,7 @@ import org.sonar.server.dashboard.db.DashboardDao;
import org.sonar.server.dashboard.db.WidgetDao;
import org.sonar.server.dashboard.db.WidgetPropertyDao;
import org.sonar.server.dashboard.ws.DashboardsShowAction;
-import org.sonar.server.dashboard.ws.DashboardsWebService;
+import org.sonar.server.dashboard.ws.DashboardsWs;
import org.sonar.server.db.DatabaseChecker;
import org.sonar.server.db.DbClient;
import org.sonar.server.db.EmbeddedDatabaseFactory;
@@ -322,7 +322,7 @@ import org.sonar.server.rule.ws.AppAction;
import org.sonar.server.rule.ws.DeleteAction;
import org.sonar.server.rule.ws.RepositoriesAction;
import org.sonar.server.rule.ws.RuleMapping;
-import org.sonar.server.rule.ws.RulesWebService;
+import org.sonar.server.rule.ws.RulesWs;
import org.sonar.server.rule.ws.SearchAction;
import org.sonar.server.rule.ws.TagsAction;
import org.sonar.server.rule.ws.UpdateAction;
@@ -625,7 +625,7 @@ class ServerComponents {
pico.addSingleton(BatchWs.class);
// Dashboard
- pico.addSingleton(DashboardsWebService.class);
+ pico.addSingleton(DashboardsWs.class);
pico.addSingleton(DashboardsShowAction.class);
// update center
@@ -691,7 +691,7 @@ class ServerComponents {
pico.addSingleton(RuleCreator.class);
pico.addSingleton(RuleDeleter.class);
pico.addSingleton(UpdateAction.class);
- pico.addSingleton(RulesWebService.class);
+ pico.addSingleton(RulesWs.class);
pico.addSingleton(SearchAction.class);
pico.addSingleton(org.sonar.server.rule.ws.ShowAction.class);
pico.addSingleton(org.sonar.server.rule.ws.CreateAction.class);
@@ -708,7 +708,7 @@ class ServerComponents {
pico.addSingleton(ListAction.class);
// activity
- pico.addSingleton(ActivitiesWebService.class);
+ pico.addSingleton(ActivitiesWs.class);
pico.addSingleton(org.sonar.server.activity.ws.SearchAction.class);
pico.addSingleton(ActivityMapping.class);
@@ -970,8 +970,8 @@ class ServerComponents {
// Compute engine
pico.addSingleton(ReportQueue.class);
pico.addSingleton(ComputationThreadLauncher.class);
- pico.addSingleton(ComputationWebService.class);
- pico.addSingleton(IsQueueEmptyWebService.class);
+ pico.addSingleton(ComputationWs.class);
+ pico.addSingleton(IsQueueEmptyWs.class);
pico.addSingleton(QueueWsAction.class);
pico.addSingleton(HistoryWsAction.class);
pico.addSingleton(DefaultPeriodCleaner.class);
diff --git a/server/sonar-server/src/main/java/org/sonar/server/rule/ws/RulesWebService.java b/server/sonar-server/src/main/java/org/sonar/server/rule/ws/RulesWs.java
index 08b0374f84c..7b044dcbb4b 100644
--- a/server/sonar-server/src/main/java/org/sonar/server/rule/ws/RulesWebService.java
+++ b/server/sonar-server/src/main/java/org/sonar/server/rule/ws/RulesWs.java
@@ -21,11 +21,11 @@ package org.sonar.server.rule.ws;
import org.sonar.api.server.ws.WebService;
-public class RulesWebService implements WebService {
+public class RulesWs implements WebService {
private final RulesAction[] actions;
- public RulesWebService(RulesAction... actions) {
+ public RulesWs(RulesAction... actions) {
this.actions = actions;
}
diff --git a/server/sonar-server/src/test/java/org/sonar/server/activity/ws/ActivitiesWebServiceMediumTest.java b/server/sonar-server/src/test/java/org/sonar/server/activity/ws/ActivitiesWsMediumTest.java
index 0ddc742eca4..b38d7754079 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/activity/ws/ActivitiesWebServiceMediumTest.java
+++ b/server/sonar-server/src/test/java/org/sonar/server/activity/ws/ActivitiesWsMediumTest.java
@@ -32,20 +32,20 @@ import org.sonar.server.ws.WsTester;
import static org.assertj.core.api.Assertions.assertThat;
-public class ActivitiesWebServiceMediumTest {
+public class ActivitiesWsMediumTest {
@ClassRule
public static ServerTester tester = new ServerTester();
@Rule
public UserSessionRule userSessionRule = UserSessionRule.forServerTester(tester);
- ActivitiesWebService ws;
+ ActivitiesWs ws;
ActivityService service;
@Before
public void setUp() {
tester.clearDbAndIndexes();
- ws = tester.get(ActivitiesWebService.class);
+ ws = tester.get(ActivitiesWs.class);
service = tester.get(ActivityService.class);
}
@@ -54,7 +54,7 @@ public class ActivitiesWebServiceMediumTest {
WebService.Context context = new WebService.Context();
ws.define(context);
- WebService.Controller controller = context.controller(ActivitiesWebService.API_ENDPOINT);
+ WebService.Controller controller = context.controller(ActivitiesWs.ENDPOINT);
assertThat(controller).isNotNull();
assertThat(controller.actions()).hasSize(1);
diff --git a/server/sonar-server/src/test/java/org/sonar/server/computation/ws/ComputationWebServiceTest.java b/server/sonar-server/src/test/java/org/sonar/server/computation/ws/ComputationWsTest.java
index 309a3c1ddf3..8da36798f95 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/computation/ws/ComputationWebServiceTest.java
+++ b/server/sonar-server/src/test/java/org/sonar/server/computation/ws/ComputationWsTest.java
@@ -27,11 +27,11 @@ import org.sonar.api.server.ws.WebService;
import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.Mockito.mock;
-public class ComputationWebServiceTest {
+public class ComputationWsTest {
@Test
public void define() {
- ComputationWebService ws = new ComputationWebService(new ComputationWsAction() {
+ ComputationWs ws = new ComputationWs(new ComputationWsAction() {
@Override
public void define(WebService.NewController controller) {
WebService.NewAction upload = controller.createAction("upload");
diff --git a/server/sonar-server/src/test/java/org/sonar/server/computation/ws/IsQueueEmptyWebServiceTest.java b/server/sonar-server/src/test/java/org/sonar/server/computation/ws/IsQueueEmptyWsTest.java
index 1fe9fcce857..32c9e9432d9 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/computation/ws/IsQueueEmptyWebServiceTest.java
+++ b/server/sonar-server/src/test/java/org/sonar/server/computation/ws/IsQueueEmptyWsTest.java
@@ -36,16 +36,16 @@ import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
-public class IsQueueEmptyWebServiceTest {
+public class IsQueueEmptyWsTest {
- IsQueueEmptyWebService.IsQueueEmptyWsAction sut;
+ IsQueueEmptyWs.IsQueueEmptyWsAction sut;
ReportQueue queue;
Response response;
@Before
public void before() {
queue = mock(ReportQueue.class);
- sut = new IsQueueEmptyWebService.IsQueueEmptyWsAction(queue);
+ sut = new IsQueueEmptyWs.IsQueueEmptyWsAction(queue);
response = mock(Response.class);
when(response.stream()).thenReturn(new FakeStream());
diff --git a/server/sonar-server/src/test/java/org/sonar/server/computation/ws/QueueWsActionTest.java b/server/sonar-server/src/test/java/org/sonar/server/computation/ws/QueueWsActionTest.java
index 4183ce8e525..42f6f11a075 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/computation/ws/QueueWsActionTest.java
+++ b/server/sonar-server/src/test/java/org/sonar/server/computation/ws/QueueWsActionTest.java
@@ -43,7 +43,7 @@ public class QueueWsActionTest {
@Before
public void setup() {
queue = mock(ReportQueue.class);
- tester = new WsTester(new ComputationWebService(new QueueWsAction(queue)));
+ tester = new WsTester(new ComputationWs(new QueueWsAction(queue)));
}
@Test
@@ -59,12 +59,12 @@ public class QueueWsActionTest {
List<AnalysisReportDto> reports = Lists.newArrayList(report);
when(queue.all()).thenReturn(reports);
- WsTester.TestRequest request = tester.newGetRequest(ComputationWebService.API_ENDPOINT, "queue");
+ WsTester.TestRequest request = tester.newGetRequest(ComputationWs.ENDPOINT, "queue");
request.execute().assertJson(getClass(), "list_queue_reports.json");
}
@Test
public void define() {
- assertThat(tester.controller(ComputationWebService.API_ENDPOINT).action("queue")).isNotNull();
+ assertThat(tester.controller(ComputationWs.ENDPOINT).action("queue")).isNotNull();
}
}
diff --git a/server/sonar-server/src/test/java/org/sonar/server/computation/ws/SubmitReportWsActionTest.java b/server/sonar-server/src/test/java/org/sonar/server/computation/ws/SubmitReportWsActionTest.java
index 66434bc154c..95910bcfdc0 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/computation/ws/SubmitReportWsActionTest.java
+++ b/server/sonar-server/src/test/java/org/sonar/server/computation/ws/SubmitReportWsActionTest.java
@@ -52,7 +52,7 @@ public class SubmitReportWsActionTest {
@Before
public void before() {
sut = new SubmitReportWsAction(queue, workerLauncher, userSessionRule);
- wsTester = new WsTester(new ComputationWebService(sut));
+ wsTester = new WsTester(new ComputationWs(sut));
}
@Test
@@ -75,7 +75,7 @@ public class SubmitReportWsActionTest {
when(queue.add(any(String.class), any(InputStream.class))).thenReturn(new ReportQueue.Item(dto, null));
WsTester.TestRequest request = wsTester
- .newGetRequest(ComputationWebService.API_ENDPOINT, "submit_report")
+ .newGetRequest(ComputationWs.ENDPOINT, "submit_report")
.setParam(SubmitReportWsAction.PARAM_PROJECT_KEY, "P1")
.setParam(SubmitReportWsAction.PARAM_REPORT_DATA, null);
WsTester.Result response = request.execute();
@@ -90,7 +90,7 @@ public class SubmitReportWsActionTest {
userSessionRule.setGlobalPermissions(GlobalPermissions.DASHBOARD_SHARING);
WsTester.TestRequest request = wsTester
- .newGetRequest(ComputationWebService.API_ENDPOINT, "submit_report")
+ .newGetRequest(ComputationWs.ENDPOINT, "submit_report")
.setParam(SubmitReportWsAction.PARAM_PROJECT_KEY, "P1")
.setParam(SubmitReportWsAction.PARAM_REPORT_DATA, null);
request.execute();
diff --git a/server/sonar-server/src/test/java/org/sonar/server/rule/ws/AppActionTest.java b/server/sonar-server/src/test/java/org/sonar/server/rule/ws/AppActionTest.java
index 56ac8898272..9d53a92a191 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/rule/ws/AppActionTest.java
+++ b/server/sonar-server/src/test/java/org/sonar/server/rule/ws/AppActionTest.java
@@ -70,7 +70,7 @@ public class AppActionTest {
@Test
public void should_generate_app_init_info() throws Exception {
AppAction app = new AppAction(languages, ruleRepositories, i18n, debtModel, profileLoader, userSessionRule);
- WsTester tester = new WsTester(new RulesWebService(app));
+ WsTester tester = new WsTester(new RulesWs(app));
userSessionRule.setGlobalPermissions(GlobalPermissions.QUALITY_PROFILE_ADMIN);
diff --git a/server/sonar-server/src/test/java/org/sonar/server/rule/ws/DeleteActionTest.java b/server/sonar-server/src/test/java/org/sonar/server/rule/ws/DeleteActionTest.java
index b5d99e70294..16af4d3620b 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/rule/ws/DeleteActionTest.java
+++ b/server/sonar-server/src/test/java/org/sonar/server/rule/ws/DeleteActionTest.java
@@ -41,7 +41,7 @@ public class DeleteActionTest {
@Before
public void setUp() {
- tester = new WsTester(new RulesWebService(new DeleteAction(ruleService)));
+ tester = new WsTester(new RulesWs(new DeleteAction(ruleService)));
}
@Test
diff --git a/server/sonar-server/src/test/java/org/sonar/server/rule/ws/RepositoriesActionTest.java b/server/sonar-server/src/test/java/org/sonar/server/rule/ws/RepositoriesActionTest.java
index 8eec2710eea..cee8a5412e7 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/rule/ws/RepositoriesActionTest.java
+++ b/server/sonar-server/src/test/java/org/sonar/server/rule/ws/RepositoriesActionTest.java
@@ -42,7 +42,7 @@ public class RepositoriesActionTest {
@Before
public void setUp() {
- tester = new WsTester(new RulesWebService(new RepositoriesAction(repositories)));
+ tester = new WsTester(new RulesWs(new RepositoriesAction(repositories)));
RuleRepositories.Repository repo1 = mock(RuleRepositories.Repository.class);
when(repo1.key()).thenReturn("xoo");
@@ -67,7 +67,7 @@ public class RepositoriesActionTest {
@Test
public void should_list_repositories() throws Exception {
- tester = new WsTester(new RulesWebService(new RepositoriesAction(repositories)));
+ tester = new WsTester(new RulesWs(new RepositoriesAction(repositories)));
newRequest().execute().assertJson(this.getClass(), "repositories.json");
newRequest().setParam("language", "xoo").execute().assertJson(this.getClass(), "repositories_xoo.json");
diff --git a/server/sonar-server/src/test/java/org/sonar/server/rule/ws/RulesWebServiceMediumTest.java b/server/sonar-server/src/test/java/org/sonar/server/rule/ws/RulesWsMediumTest.java
index 31eb6a06a61..31e049b67fb 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/rule/ws/RulesWebServiceMediumTest.java
+++ b/server/sonar-server/src/test/java/org/sonar/server/rule/ws/RulesWsMediumTest.java
@@ -57,7 +57,7 @@ import org.sonar.server.ws.WsTester;
import static org.assertj.core.api.Assertions.assertThat;
-public class RulesWebServiceMediumTest {
+public class RulesWsMediumTest {
@ClassRule
public static ServerTester tester = new ServerTester();
@@ -70,7 +70,7 @@ public class RulesWebServiceMediumTest {
private static final String API_TAGS_METHOD = "tags";
DbClient db;
- RulesWebService ws;
+ RulesWs ws;
RuleDao ruleDao;
DbSession session;
int softReliabilityId, hardReliabilityId;
@@ -80,7 +80,7 @@ public class RulesWebServiceMediumTest {
tester.clearDbAndIndexes();
db = tester.get(DbClient.class);
ruleDao = tester.get(RuleDao.class);
- ws = tester.get(RulesWebService.class);
+ ws = tester.get(RulesWs.class);
session = tester.get(DbClient.class).openSession(false);
}
diff --git a/server/sonar-server/src/test/java/org/sonar/server/ws/ListingWsTest.java b/server/sonar-server/src/test/java/org/sonar/server/ws/ListingWsTest.java
index 04a290e4d2a..0243e8ed673 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/ws/ListingWsTest.java
+++ b/server/sonar-server/src/test/java/org/sonar/server/ws/ListingWsTest.java
@@ -55,13 +55,13 @@ public class ListingWsTest {
@Test
public void list() throws Exception {
- WsTester tester = new WsTester(ws, new MetricWebService());
+ WsTester tester = new WsTester(ws, new MetricWs());
tester.newGetRequest("api/webservices", "list").execute().assertJson(getClass(), "list.json");
}
@Test
public void list_including_internals() throws Exception {
- WsTester tester = new WsTester(ws, new MetricWebService());
+ WsTester tester = new WsTester(ws, new MetricWs());
tester.newGetRequest("api/webservices", "list")
.setParam("include_internals", "true")
.execute()
@@ -70,7 +70,7 @@ public class ListingWsTest {
@Test
public void response_example() throws Exception {
- WsTester tester = new WsTester(ws, new MetricWebService());
+ WsTester tester = new WsTester(ws, new MetricWs());
tester
.newGetRequest("api/webservices", "response_example")
.setParam("controller", "api/metric")
@@ -78,7 +78,7 @@ public class ListingWsTest {
.execute().assertJson(getClass(), "response_example.json");
}
- static class MetricWebService implements WebService {
+ static class MetricWs implements WebService {
@Override
public void define(Context context) {
NewController newController = context.createController("api/metric")
diff --git a/server/sonar-server/src/test/java/org/sonar/server/ws/WebServiceEngineTest.java b/server/sonar-server/src/test/java/org/sonar/server/ws/WebServiceEngineTest.java
index 19ea3af700a..186feed789d 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/ws/WebServiceEngineTest.java
+++ b/server/sonar-server/src/test/java/org/sonar/server/ws/WebServiceEngineTest.java
@@ -20,11 +20,6 @@
package org.sonar.server.ws;
import com.google.common.collect.Maps;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.Locale;
-import java.util.Map;
-import javax.annotation.Nullable;
import org.apache.commons.io.IOUtils;
import org.junit.After;
import org.junit.Before;
@@ -42,6 +37,12 @@ import org.sonar.server.exceptions.Message;
import org.sonar.server.plugins.MimeTypes;
import org.sonar.server.tester.UserSessionRule;
+import javax.annotation.Nullable;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Locale;
+import java.util.Map;
+
import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
@@ -95,7 +96,7 @@ public class WebServiceEngineTest {
@Rule
public UserSessionRule userSessionRule = UserSessionRule.standalone();
I18n i18n = mock(I18n.class);
- WebServiceEngine engine = new WebServiceEngine(new WebService[] {new SystemWebService()}, i18n, userSessionRule);
+ WebServiceEngine engine = new WebServiceEngine(new WebService[] {new SystemWs()}, i18n, userSessionRule);
@Before
public void start() {
@@ -290,7 +291,7 @@ public class WebServiceEngineTest {
assertThat(response.stream().mediaType()).isEqualTo(MimeTypes.JSON);
}
- static class SystemWebService implements WebService {
+ static class SystemWs implements WebService {
@Override
public void define(Context context) {
NewController newController = context.createController("api/system");
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/web/RubyRailsWebservice.java b/sonar-plugin-api/src/main/java/org/sonar/api/web/RubyRailsWebservice.java
index d61936f5d38..67be027294a 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/web/RubyRailsWebservice.java
+++ b/sonar-plugin-api/src/main/java/org/sonar/api/web/RubyRailsWebservice.java
@@ -29,7 +29,7 @@ package org.sonar.api.web;
* and will call the index controller method if not specified.
*
* @since 1.11
- * @deprecated in 4.2. Replaced by {@link org.sonar.api.web.ws.WebService}
+ * @deprecated in 4.2. Replaced by {@link org.sonar.api.server.ws.WebService}
*/
@Deprecated
public interface RubyRailsWebservice extends Webservice {
diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/server/ws/RequestTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/server/ws/RequestTest.java
index e0ba0f40ef3..24a0f2a69fb 100644
--- a/sonar-plugin-api/src/test/java/org/sonar/api/server/ws/RequestTest.java
+++ b/sonar-plugin-api/src/test/java/org/sonar/api/server/ws/RequestTest.java
@@ -73,7 +73,7 @@ public class RequestTest {
}
}
- private static class SimpleWebService implements WebService {
+ private static class SimpleWs implements WebService {
@Override
public void define(Context context) {
@@ -114,7 +114,7 @@ public class RequestTest {
@Before
public void before() {
WebService.Context context = new WebService.Context();
- new SimpleWebService().define(context);
+ new SimpleWs().define(context);
request.setAction(context.controller("my_controller").action("my_action"));
}
diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/server/ws/WebServiceTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/server/ws/WebServiceTest.java
index 9226ea1af60..006aae7c064 100644
--- a/sonar-plugin-api/src/test/java/org/sonar/api/server/ws/WebServiceTest.java
+++ b/sonar-plugin-api/src/test/java/org/sonar/api/server/ws/WebServiceTest.java
@@ -35,7 +35,7 @@ import static org.mockito.Mockito.mock;
public class WebServiceTest {
- static class MetricWebService implements WebService {
+ static class MetricWs implements WebService {
boolean showCalled = false, createCalled = false;
@Override
@@ -89,7 +89,7 @@ public class WebServiceTest {
@Test
public void define_web_service() {
- MetricWebService metricWs = new MetricWebService();
+ MetricWs metricWs = new MetricWs();
metricWs.define(context);
@@ -125,7 +125,7 @@ public class WebServiceTest {
@Test
public void fail_if_duplicated_ws_keys() {
- MetricWebService metricWs = new MetricWebService();
+ MetricWs metricWs = new MetricWs();
metricWs.define(context);
try {
new WebService() {
@@ -240,7 +240,7 @@ public class WebServiceTest {
@Test
public void handle_request() throws Exception {
- MetricWebService metricWs = new MetricWebService();
+ MetricWs metricWs = new MetricWs();
metricWs.define(context);
assertThat(metricWs.showCalled).isFalse();
@@ -416,7 +416,7 @@ public class WebServiceTest {
@Test
public void response_example() {
- MetricWebService metricWs = new MetricWebService();
+ MetricWs metricWs = new MetricWs();
metricWs.define(context);
WebService.Action action = context.controller("api/metric").action("create");