diff options
author | simonbrandhof <simon.brandhof@gmail.com> | 2010-11-02 18:15:15 +0000 |
---|---|---|
committer | simonbrandhof <simon.brandhof@gmail.com> | 2010-11-02 18:15:15 +0000 |
commit | 2aa3df37b9c857da35590e048c49ab5c6050b00d (patch) | |
tree | a30dd743d0846b73b82a7755c2589d0c07d86f4c /sonar-gwt-api | |
parent | d97d0f40e1b7e4390dc6c637e1ae63f3ce533369 (diff) | |
download | sonarqube-2aa3df37b9c857da35590e048c49ab5c6050b00d.tar.gz sonarqube-2aa3df37b9c857da35590e048c49ab5c6050b00d.zip |
SONAR-1911 New web service to get server status
Diffstat (limited to 'sonar-gwt-api')
-rw-r--r-- | sonar-gwt-api/src/main/java/org/sonar/wsclient/gwt/unmarshallers/ServerUnmarshaller.java | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sonar-gwt-api/src/main/java/org/sonar/wsclient/gwt/unmarshallers/ServerUnmarshaller.java b/sonar-gwt-api/src/main/java/org/sonar/wsclient/gwt/unmarshallers/ServerUnmarshaller.java index 87646fb0305..ad87a8133e6 100644 --- a/sonar-gwt-api/src/main/java/org/sonar/wsclient/gwt/unmarshallers/ServerUnmarshaller.java +++ b/sonar-gwt-api/src/main/java/org/sonar/wsclient/gwt/unmarshallers/ServerUnmarshaller.java @@ -31,9 +31,15 @@ public class ServerUnmarshaller implements Unmarshaller<Server> { public Server toModel(JavaScriptObject json) { JSONObject map = new JSONObject(json); - return new Server() + Server server = new Server() .setId(JsonUtils.getString(map, "id")) .setVersion(JsonUtils.getString(map, "version")); + server.setStatusMessage(JsonUtils.getString(map, "status_msg")); + String status = JsonUtils.getString(map, "status"); + if (status != null) { + server.setStatus(Server.Status.valueOf(status)); + } + return server; } public List<Server> toModels(JavaScriptObject json) { |