]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-7472 Drop WS api/issues/create
authorTeryk Bellahsene <teryk.bellahsene@sonarsource.com>
Tue, 29 Mar 2016 16:50:35 +0000 (18:50 +0200)
committerTeryk Bellahsene <teryk.bellahsene@sonarsource.com>
Tue, 29 Mar 2016 17:10:53 +0000 (19:10 +0200)
server/sonar-server/src/main/java/org/sonar/server/issue/ws/CreateAction.java [deleted file]
server/sonar-server/src/main/java/org/sonar/server/issue/ws/IssueWsModule.java
server/sonar-server/src/test/java/org/sonar/server/issue/ws/CreateActionTest.java [deleted file]
server/sonar-server/src/test/java/org/sonar/server/issue/ws/IssueWsModuleTest.java

diff --git a/server/sonar-server/src/main/java/org/sonar/server/issue/ws/CreateAction.java b/server/sonar-server/src/main/java/org/sonar/server/issue/ws/CreateAction.java
deleted file mode 100644 (file)
index a54b262..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * SonarQube
- * Copyright (C) 2009-2016 SonarSource SA
- * mailto:contact 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.issue.ws;
-
-import org.sonar.api.rule.Severity;
-import org.sonar.api.server.ws.Request;
-import org.sonar.api.server.ws.Response;
-import org.sonar.api.server.ws.WebService;
-
-import static org.sonar.server.ws.KeyExamples.KEY_PROJECT_EXAMPLE_001;
-
-public class CreateAction implements IssuesWsAction {
-
-  public static final String ACTION = "create";
-
-  @Override
-  public void define(WebService.NewController controller) {
-    WebService.NewAction action = controller.createAction(ACTION)
-      .setDescription("Deprecated web service to do create a manual issue. Manual issue feature has been removed in 5.5. This web service has no effect.")
-      .setSince("3.6")
-      .setDeprecatedSince("5.5")
-      .setHandler(this)
-      .setPost(true);
-
-    action.createParam("component")
-      .setDescription("Key of the component on which to log the issue")
-      .setRequired(true)
-      .setExampleValue(KEY_PROJECT_EXAMPLE_001);
-    action.createParam("rule")
-      .setDescription("Manual rule key")
-      .setRequired(true)
-      .setExampleValue("manual:performance");
-    action.createParam("severity")
-      .setDescription("Severity of the issue")
-      .setExampleValue(Severity.BLOCKER + "," + Severity.CRITICAL)
-      .setPossibleValues(Severity.ALL);
-    action.createParam("line")
-      .setDescription("Line on which to log the issue. " +
-        "If no line is specified, the issue is attached to the component and not to a specific line")
-      .setExampleValue("15");
-    action.createParam("message")
-      .setDescription("Description of the issue")
-      .setExampleValue("blabla...");
-  }
-
-  @Override
-  public void handle(Request request, Response response) throws Exception {
-    response.noContent();
-  }
-}
index a2e7c0fcf2757642d79d48dbcf150b36cbe8ab1a..b6df29298d9afc9dfb0d38a05c2b192a55fb31c6 100644 (file)
@@ -30,7 +30,6 @@ public class IssueWsModule extends Module {
       SearchResponseFormat.class,
       OperationResponseWriter.class,
       AssignAction.class,
-      CreateAction.class,
       DoTransitionAction.class,
       SearchAction.class,
       SetSeverityAction.class,
diff --git a/server/sonar-server/src/test/java/org/sonar/server/issue/ws/CreateActionTest.java b/server/sonar-server/src/test/java/org/sonar/server/issue/ws/CreateActionTest.java
deleted file mode 100644 (file)
index cfccf1c..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * SonarQube
- * Copyright (C) 2009-2016 SonarSource SA
- * mailto:contact 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.issue.ws;
-
-import org.junit.Test;
-import org.sonar.server.ws.WsAction;
-import org.sonar.server.ws.WsActionTester;
-
-public class CreateActionTest {
-
-  WsAction underTest = new CreateAction();
-  WsActionTester tester = new WsActionTester(underTest);
-
-  @Test
-  public void does_nothing() throws Exception {
-    tester.newRequest()
-      .setParam("component", "FILE_KEY")
-      .setParam("rule", "ruleKey")
-      .execute();
-  }
-
-}
index 5ce2b6b6ffc7dbdcbefa4dfc5b9605958c008d16..5021d11e4ce6db03c363dc770a1058dfad88717a 100644 (file)
@@ -29,6 +29,6 @@ public class IssueWsModuleTest {
   public void verify_count_of_added_components() {
     ComponentContainer container = new ComponentContainer();
     new IssueWsModule().configure(container);
-    assertThat(container.size()).isEqualTo(2 + 14);
+    assertThat(container.size()).isEqualTo(2 + 13);
   }
 }