summaryrefslogtreecommitdiffstats
path: root/sonar-ws-client
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@gmail.com>2011-07-28 10:14:43 +0200
committerSimon Brandhof <simon.brandhof@gmail.com>2011-07-28 10:14:51 +0200
commit5d4a6f543838403f26e9f18ee0ead44398ffec0f (patch)
tree5b45dd9d737a1a978f6975048d23283dbf59ad7b /sonar-ws-client
parent831f128056cdd575e54d1635943833cebf898fb4 (diff)
downloadsonarqube-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.java7
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);
+ }
}