aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@sonarsource.com>2016-04-15 09:13:47 +0200
committerSimon Brandhof <simon.brandhof@sonarsource.com>2016-04-15 09:13:47 +0200
commita444f194d4352ccb6ef70d79161620311b1cda8f (patch)
treefc2013e06442e6c22ec71df0baa7f5b59fe0e21b
parentec0c9c265fed27964480ce51edc8a191b5234be7 (diff)
downloadsonarqube-a444f194d4352ccb6ef70d79161620311b1cda8f.tar.gz
sonarqube-a444f194d4352ccb6ef70d79161620311b1cda8f.zip
SONAR-6948 add javadoc for org.sonar.api.server.ws.LocalConnector
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/server/ws/LocalConnector.java10
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/server/ws/Request.java2
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/server/ws/WebService.java11
3 files changed, 18 insertions, 5 deletions
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/server/ws/LocalConnector.java b/sonar-plugin-api/src/main/java/org/sonar/api/server/ws/LocalConnector.java
index 468077674c8..d4a2fc4440e 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/server/ws/LocalConnector.java
+++ b/sonar-plugin-api/src/main/java/org/sonar/api/server/ws/LocalConnector.java
@@ -27,7 +27,7 @@ import javax.annotation.CheckForNull;
* This class allows a web service to call another web service through the sonar-ws library.
* The call is in-process, synchronous and does not involve the HTTP stack.
* <p>
- * Example of a web service that uses sonar-ws 5.5 to get some issues:
+ * Example of a web service that loads some issues:
* <pre>
* import org.sonar.api.server.ws.RequestHandler;
* import org.sonarqube.ws.client.WsClientFactories;
@@ -41,6 +41,14 @@ import javax.annotation.CheckForNull;
* }
* }
* </pre>
+ *
+ * It requires to use the sonar-ws library which Maven ids are:
+ * <pre>
+ * &lt;dependency&gt;
+ * &lt;groupId&gt;org.sonarsource.sonarqube&lt;/groupId&gt;
+ * &lt;artifactId&gt;sonar-ws&lt;/artifactId&gt;
+ * &lt;/dependency&gt;
+ * </pre>
*
* @since 5.5
*/
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/server/ws/Request.java b/sonar-plugin-api/src/main/java/org/sonar/api/server/ws/Request.java
index fdc54cee2b0..d30802cad2a 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/server/ws/Request.java
+++ b/sonar-plugin-api/src/main/java/org/sonar/api/server/ws/Request.java
@@ -237,7 +237,7 @@ public abstract class Request {
}
/**
- * Used by the sonar-ws library to allow a web service to call another web service.
+ * Allows a web service to call another web service.
* @see LocalConnector
* @since 5.5
*/
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 de2f60033b8..99c530f65b6 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
@@ -88,6 +88,9 @@ import static java.lang.String.format;
* }
* </pre>
*
+ * Since version 5.5, a web service can call another web service to get some data. See {@link Request#getLocalConnector()}
+ * provided by {@link RequestHandler#handle(Request, Response)}.
+ *
* @since 4.2
*/
@ServerSide
@@ -100,7 +103,7 @@ public interface WebService extends Definable<WebService.Context> {
/**
* Create a new controller.
* <br>
- * Structure of request URL is <code>http://&lt;server&gt;/&lt>controller path&gt;/&lt;action path&gt;?&lt;parameters&gt;</code>.
+ * Structure of request URL is <code>http://&lt;server&gt;/&lt;controller path&gt;/&lt;action path&gt;?&lt;parameters&gt;</code>.
*
* @param path the controller path must not start or end with "/". It is recommended to start with "api/"
* and to use lower-case format with underscores, for example "api/coding_rules". Usual actions
@@ -378,8 +381,10 @@ public interface WebService extends Definable<WebService.Context> {
/**$
*
* 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")
+ * used to search for a subset of fields containing the supplied string.
+ * <p>
+ * The fields must be in the <strong>plural</strong> form (ex: "names", "keys").
+ * </p>
*/
public NewAction addSearchQuery(String exampleValue, String... pluralFields) {
String actionDescription = format("Limit search to %s that contain the supplied string.", Joiner.on(" or ").join(pluralFields));