diff options
author | Simon Brandhof <simon.brandhof@gmail.com> | 2011-07-28 10:14:43 +0200 |
---|---|---|
committer | Simon Brandhof <simon.brandhof@gmail.com> | 2011-07-28 10:14:51 +0200 |
commit | 5d4a6f543838403f26e9f18ee0ead44398ffec0f (patch) | |
tree | 5b45dd9d737a1a978f6975048d23283dbf59ad7b /sonar-ws-client | |
parent | 831f128056cdd575e54d1635943833cebf898fb4 (diff) | |
download | sonarqube-5d4a6f543838403f26e9f18ee0ead44398ffec0f.tar.gz sonarqube-5d4a6f543838403f26e9f18ee0ead44398ffec0f.zip |
Add convenient factory methods ResourceQuery#create(String resourceKey) and Rule#create(String repo, String key)
Diffstat (limited to 'sonar-ws-client')
-rw-r--r-- | sonar-ws-client/src/main/java/org/sonar/wsclient/services/ResourceQuery.java | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sonar-ws-client/src/main/java/org/sonar/wsclient/services/ResourceQuery.java b/sonar-ws-client/src/main/java/org/sonar/wsclient/services/ResourceQuery.java index 608542513f4..eb5482b5c12 100644 --- a/sonar-ws-client/src/main/java/org/sonar/wsclient/services/ResourceQuery.java +++ b/sonar-ws-client/src/main/java/org/sonar/wsclient/services/ResourceQuery.java @@ -294,4 +294,11 @@ public class ResourceQuery extends Query<Resource> { return new ResourceQuery(resource.getId().toString()) .setMetrics(metricKeys); } + + /** + * @since 2.10 + */ + public static ResourceQuery create(String resourceKey) { + return new ResourceQuery(resourceKey); + } } |