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;
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;
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;
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;
+++ /dev/null
-/*
- * 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 {
-}
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;
}
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();
--- /dev/null
+/*
+ * 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 {
+}
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";
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;
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;