From: Teryk Bellahsene Date: Wed, 2 Dec 2015 17:10:44 +0000 (+0100) Subject: SONAR-6900 WS api/ce/task improve description X-Git-Tag: 5.3-RC1~67 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=2a95bdb1fe32d66ebb71f7d5e506c94fb87a0551;p=sonarqube.git SONAR-6900 WS api/ce/task improve description --- diff --git a/server/sonar-server/src/main/java/org/sonar/server/computation/ws/TaskAction.java b/server/sonar-server/src/main/java/org/sonar/server/computation/ws/TaskAction.java index 18ebb59aaa5..d3c3eb68974 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/computation/ws/TaskAction.java +++ b/server/sonar-server/src/main/java/org/sonar/server/computation/ws/TaskAction.java @@ -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.
" + + "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);