aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-plugin-api
diff options
context:
space:
mode:
authorTeryk Bellahsene <teryk.bellahsene@sonarsource.com>2015-05-11 14:16:25 +0200
committerTeryk Bellahsene <teryk.bellahsene@sonarsource.com>2015-05-15 15:21:23 +0200
commite2a24d90b1cdf40d76228536cce3cd387dc9017e (patch)
tree760c6cc4708d42120aa854c20188de1831f5d032 /sonar-plugin-api
parent4b1e4e5a1e9192105158a4f309e731247ee040bb (diff)
downloadsonarqube-e2a24d90b1cdf40d76228536cce3cd387dc9017e.tar.gz
sonarqube-e2a24d90b1cdf40d76228536cce3cd387dc9017e.zip
WS api/projects/ghosts list ghost projects - SONAR-6527
Diffstat (limited to 'sonar-plugin-api')
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/server/ws/WebService.java15
1 files changed, 15 insertions, 0 deletions
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/server/ws/WebService.java b/sonar-plugin-api/src/main/java/org/sonar/api/server/ws/WebService.java
index 43e0d461c0a..22b83f19711 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/server/ws/WebService.java
+++ b/sonar-plugin-api/src/main/java/org/sonar/api/server/ws/WebService.java
@@ -19,6 +19,7 @@
*/
package org.sonar.api.server.ws;
+import com.google.common.base.Joiner;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.Maps;
@@ -356,6 +357,20 @@ public interface WebService extends Definable<WebService.Context> {
return this;
}
+ /**$
+ *
+ * Creates the parameter {@link org.sonar.api.server.ws.WebService.Param#TEXT_QUERY}, which is
+ * used to search for a subset of fields containing the supplied string.<br />
+ * The fields must be in the <strong>plural</strong> form (ex: "names", "keys")
+ */
+ public NewAction addSearchQuery(String exampleValue, String... pluralFields) {
+ String actionDescription = String.format("Searches for %s containing the supplied string.", Joiner.on(" and ").join(pluralFields));
+ createParam(Param.TEXT_QUERY)
+ .setDescription(actionDescription)
+ .setExampleValue(exampleValue);
+ return this;
+ }
+
/**
* Add predefined parameters related to sorting of results.
*/