]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-6900 WS api/ce/task improve description
authorTeryk Bellahsene <teryk.bellahsene@sonarsource.com>
Wed, 2 Dec 2015 17:10:44 +0000 (18:10 +0100)
committerTeryk Bellahsene <teryk.bellahsene@sonarsource.com>
Fri, 4 Dec 2015 08:57:37 +0000 (09:57 +0100)
server/sonar-server/src/main/java/org/sonar/server/computation/ws/TaskAction.java

index 18ebb59aaa57144c2e931bc9e0dd1f10eb441d1e..d3c3eb68974f5babb7280ef25e130a29d8f3500c 100644 (file)
@@ -31,9 +31,10 @@ import org.sonar.db.ce.CeActivityDto;
 import org.sonar.db.ce.CeQueueDto;
 import org.sonar.server.exceptions.NotFoundException;
 import org.sonar.server.user.UserSession;
-import org.sonar.server.ws.WsUtils;
 import org.sonarqube.ws.WsCe;
 
+import static org.sonar.server.ws.WsUtils.writeProtobuf;
+
 public class TaskAction implements CeWsAction {
 
   public static final String ACTION = "task";
@@ -52,7 +53,8 @@ public class TaskAction implements CeWsAction {
   @Override
   public void define(WebService.NewController controller) {
     WebService.NewAction action = controller.createAction(ACTION)
-      .setDescription("Task information")
+      .setDescription("Give Compute Engine task details such as type, status, duration and associated component.<br />" +
+        "Requires 'Administer System' or 'Execute Analysis' permission.")
       .setInternal(true)
       .setResponseExample(getClass().getResource("task-example.json"))
       .setSince("5.2")
@@ -88,7 +90,7 @@ public class TaskAction implements CeWsAction {
           throw new NotFoundException();
         }
       }
-      WsUtils.writeProtobuf(wsTaskResponse.build(), wsRequest, wsResponse);
+      writeProtobuf(wsTaskResponse.build(), wsRequest, wsResponse);
 
     } finally {
       dbClient.closeSession(dbSession);