]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-8892 Rename OrganizationsAction to OrganizationsWsAction
authorTeryk Bellahsene <teryk.bellahsene@sonarsource.com>
Thu, 9 Mar 2017 17:02:21 +0000 (18:02 +0100)
committerJulien Lancelot <julien.lancelot@sonarsource.com>
Tue, 21 Mar 2017 12:05:50 +0000 (13:05 +0100)
server/sonar-server/src/main/java/org/sonar/server/organization/ws/AddMemberAction.java
server/sonar-server/src/main/java/org/sonar/server/organization/ws/CreateAction.java
server/sonar-server/src/main/java/org/sonar/server/organization/ws/DeleteAction.java
server/sonar-server/src/main/java/org/sonar/server/organization/ws/EnableSupportAction.java
server/sonar-server/src/main/java/org/sonar/server/organization/ws/OrganizationsAction.java [deleted file]
server/sonar-server/src/main/java/org/sonar/server/organization/ws/OrganizationsWs.java
server/sonar-server/src/main/java/org/sonar/server/organization/ws/OrganizationsWsAction.java [new file with mode: 0644]
server/sonar-server/src/main/java/org/sonar/server/organization/ws/SearchAction.java
server/sonar-server/src/main/java/org/sonar/server/organization/ws/SearchMyOrganizationsAction.java
server/sonar-server/src/main/java/org/sonar/server/organization/ws/UpdateAction.java

index daf610d508ad66f244c015682d201c2a7f3058a7..8de6650a589ba11d51e30267e6f6c0f59536a478 100644 (file)
@@ -40,7 +40,7 @@ import static org.sonar.server.ws.KeyExamples.KEY_ORG_EXAMPLE_001;
 import static org.sonar.server.ws.WsUtils.checkFound;
 import static org.sonar.server.ws.WsUtils.checkFoundWithOptional;
 
-public class AddMemberAction implements OrganizationsAction {
+public class AddMemberAction implements OrganizationsWsAction {
   private final DbClient dbClient;
   private final UserSession userSession;
 
index 58fe96f8865cdf1953d6e6f6fe0890fb9afed4eb..bc628ee1fa52d8a52860b467cf8a6644fc25b848 100644 (file)
@@ -40,7 +40,7 @@ import static org.sonar.server.organization.OrganizationCreation.NewOrganization
 import static org.sonar.server.organization.ws.OrganizationsWsSupport.PARAM_KEY;
 import static org.sonar.server.ws.WsUtils.writeProtobuf;
 
-public class CreateAction implements OrganizationsAction {
+public class CreateAction implements OrganizationsWsAction {
   private static final String ACTION = "create";
 
   private final Settings settings;
index c81c196977645c52bda6231bac8cf094eb16e83e..53053d9a06be018d3f44421fe485a3e6b8976bb1 100644 (file)
@@ -38,7 +38,7 @@ import static org.sonar.server.organization.ws.OrganizationsWsSupport.PARAM_KEY;
 import static org.sonar.db.permission.OrganizationPermission.ADMINISTER;
 import static org.sonar.server.ws.WsUtils.checkFoundWithOptional;
 
-public class DeleteAction implements OrganizationsAction {
+public class DeleteAction implements OrganizationsWsAction {
   private static final String ACTION = "delete";
 
   private final UserSession userSession;
index e35f154b9fdfe07f5e7e7db0eb6527e2cb1b02c4..7e32a6f0655856859d51f3d152a9e6ebb18dbaec 100644 (file)
@@ -31,7 +31,7 @@ import org.sonar.server.user.UserSession;
 
 import static java.util.Objects.requireNonNull;
 
-public class EnableSupportAction implements OrganizationsAction {
+public class EnableSupportAction implements OrganizationsWsAction {
   private static final String ACTION = "enable_support";
 
   private final UserSession userSession;
diff --git a/server/sonar-server/src/main/java/org/sonar/server/organization/ws/OrganizationsAction.java b/server/sonar-server/src/main/java/org/sonar/server/organization/ws/OrganizationsAction.java
deleted file mode 100644 (file)
index 75e1bc6..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * SonarQube
- * Copyright (C) 2009-2017 SonarSource SA
- * mailto:info AT sonarsource DOT com
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 3 of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- */
-package org.sonar.server.organization.ws;
-
-import org.sonar.server.ws.WsAction;
-
-public interface OrganizationsAction extends WsAction {
-}
index e5f9ec37c85e7e411b0b5faed7f00a4e05e8cc11..5af260e4fd65ff1231d17f1ef9d5082516854db8 100644 (file)
@@ -22,9 +22,9 @@ package org.sonar.server.organization.ws;
 import org.sonar.api.server.ws.WebService;
 
 public class OrganizationsWs implements WebService {
-  private final OrganizationsAction[] actions;
+  private final OrganizationsWsAction[] actions;
 
-  public OrganizationsWs(OrganizationsAction... actions) {
+  public OrganizationsWs(OrganizationsWsAction... actions) {
     this.actions = actions;
   }
 
@@ -33,7 +33,7 @@ public class OrganizationsWs implements WebService {
     NewController controller = context.createController("api/organizations")
       .setSince("6.2")
       .setDescription("Manage organizations.");
-    for (OrganizationsAction action : actions) {
+    for (OrganizationsWsAction action : actions) {
       action.define(controller);
     }
     controller.done();
diff --git a/server/sonar-server/src/main/java/org/sonar/server/organization/ws/OrganizationsWsAction.java b/server/sonar-server/src/main/java/org/sonar/server/organization/ws/OrganizationsWsAction.java
new file mode 100644 (file)
index 0000000..5014029
--- /dev/null
@@ -0,0 +1,25 @@
+/*
+ * SonarQube
+ * Copyright (C) 2009-2017 SonarSource SA
+ * mailto:info AT sonarsource DOT com
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+package org.sonar.server.organization.ws;
+
+import org.sonar.server.ws.WsAction;
+
+public interface OrganizationsWsAction extends WsAction {
+}
index 2068df1a2fe9f5e8fab78b0e9c35b2f7db721f9f..83313c89bec7326011253f37b681286a96d503e2 100644 (file)
@@ -35,7 +35,7 @@ import org.sonarqube.ws.Organizations.Organization;
 import static org.sonar.db.organization.OrganizationQuery.newOrganizationQueryBuilder;
 import static org.sonar.server.ws.WsUtils.writeProtobuf;
 
-public class SearchAction implements OrganizationsAction {
+public class SearchAction implements OrganizationsWsAction {
   private static final String PARAM_ORGANIZATIONS = "organizations";
   private static final String ACTION = "search";
 
index 738ca36fe0a0fd2fda735871e9de297b278cfb03..c65e86220b3548362d0de4bf81d227f25c7c4922 100644 (file)
@@ -28,7 +28,7 @@ import org.sonar.db.DbSession;
 import org.sonar.db.permission.OrganizationPermission;
 import org.sonar.server.user.UserSession;
 
-public class SearchMyOrganizationsAction implements OrganizationsAction {
+public class SearchMyOrganizationsAction implements OrganizationsWsAction {
   private static final String ACTION = "search_my_organizations";
 
   private final UserSession userSession;
index 6d4f415153690ee3b5b1e76e1de01ee342a7b246..899b7efbb96788567035208ae7102cfc88154cbb 100644 (file)
@@ -42,7 +42,7 @@ import static org.sonar.server.organization.ws.OrganizationsWsSupport.PARAM_URL;
 import static org.sonar.db.permission.OrganizationPermission.ADMINISTER;
 import static org.sonar.server.ws.WsUtils.writeProtobuf;
 
-public class UpdateAction implements OrganizationsAction {
+public class UpdateAction implements OrganizationsWsAction {
   private static final String ACTION = "update";
 
   private final UserSession userSession;