diff options
author | Godin <mandrikov@gmail.com> | 2010-12-14 00:56:54 +0000 |
---|---|---|
committer | Godin <mandrikov@gmail.com> | 2010-12-14 00:56:54 +0000 |
commit | c7c69b5dc02c35401e9ade1a7293e8199fbead77 (patch) | |
tree | c6def0ca8c1eda433ce5583860cf97b968bcd1f3 /sonar-ws-client | |
parent | a8ec3720bba2b343d1f9046f4c93a2262e1b1a41 (diff) | |
download | sonarqube-c7c69b5dc02c35401e9ade1a7293e8199fbead77.tar.gz sonarqube-c7c69b5dc02c35401e9ade1a7293e8199fbead77.zip |
SONAR-833: New Web Service to get history of measures (time machine)
Diffstat (limited to 'sonar-ws-client')
-rw-r--r-- | sonar-ws-client/src/main/java/org/sonar/wsclient/services/TimeMachineQuery.java | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/sonar-ws-client/src/main/java/org/sonar/wsclient/services/TimeMachineQuery.java b/sonar-ws-client/src/main/java/org/sonar/wsclient/services/TimeMachineQuery.java index 04f2019d490..b92722c2708 100644 --- a/sonar-ws-client/src/main/java/org/sonar/wsclient/services/TimeMachineQuery.java +++ b/sonar-ws-client/src/main/java/org/sonar/wsclient/services/TimeMachineQuery.java @@ -72,8 +72,14 @@ public class TimeMachineQuery extends Query<TimeMachineData> { return TimeMachineData.class; } - public static TimeMachineQuery create(String resourceKeyOrId) { - return new TimeMachineQuery(resourceKeyOrId); + public static TimeMachineQuery createForMetrics(String resourceKeyOrId, String... metricKeys) { + return new TimeMachineQuery(resourceKeyOrId) + .setMetrics(metricKeys); + } + + public static TimeMachineQuery createForResource(Resource resource, String... metricKeys) { + return new TimeMachineQuery(resource.getId().toString()) + .setMetrics(metricKeys); } } |