From e2a24d90b1cdf40d76228536cce3cd387dc9017e Mon Sep 17 00:00:00 2001 From: Teryk Bellahsene Date: Mon, 11 May 2015 14:16:25 +0200 Subject: WS api/projects/ghosts list ghost projects - SONAR-6527 --- .../src/main/java/org/sonar/api/server/ws/WebService.java | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'sonar-plugin-api') 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 { 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.
+ * The fields must be in the plural 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. */ -- cgit v1.2.3