diff options
author | Jean-Baptiste Vilain <jean-baptiste.vilain@sonarsource.com> | 2013-06-27 18:47:43 +0200 |
---|---|---|
committer | Jean-Baptiste Vilain <jean-baptiste.vilain@sonarsource.com> | 2013-06-27 18:47:43 +0200 |
commit | 86e22d6cf88b78b738a0e0bd7fe84b217324eacc (patch) | |
tree | c36e23bb8280757be3569d15082d14e98956f377 /sonar-ws-client/src | |
parent | ffb52f72841dc6568f9ec93a68b847494ba1873e (diff) | |
download | sonarqube-86e22d6cf88b78b738a0e0bd7fe84b217324eacc.tar.gz sonarqube-86e22d6cf88b78b738a0e0bd7fe84b217324eacc.zip |
SONAR-4412 Added SonarClient access point to retrieve the permissions management services
Diffstat (limited to 'sonar-ws-client/src')
-rw-r--r-- | sonar-ws-client/src/main/java/org/sonar/wsclient/SonarClient.java | 11 | ||||
-rw-r--r-- | sonar-ws-client/src/test/java/org/sonar/wsclient/SonarClientTest.java | 2 |
2 files changed, 12 insertions, 1 deletions
diff --git a/sonar-ws-client/src/main/java/org/sonar/wsclient/SonarClient.java b/sonar-ws-client/src/main/java/org/sonar/wsclient/SonarClient.java index 767070141e1..f0bf2e077bf 100644 --- a/sonar-ws-client/src/main/java/org/sonar/wsclient/SonarClient.java +++ b/sonar-ws-client/src/main/java/org/sonar/wsclient/SonarClient.java @@ -21,9 +21,11 @@ package org.sonar.wsclient; import org.sonar.wsclient.internal.HttpRequestFactory; import org.sonar.wsclient.issue.ActionPlanClient; +import org.sonar.wsclient.issue.IssueClient; import org.sonar.wsclient.issue.internal.DefaultActionPlanClient; import org.sonar.wsclient.issue.internal.DefaultIssueClient; -import org.sonar.wsclient.issue.IssueClient; +import org.sonar.wsclient.permissions.DefaultPermissionClient; +import org.sonar.wsclient.permissions.PermissionClient; import org.sonar.wsclient.user.DefaultUserClient; import org.sonar.wsclient.user.UserClient; @@ -84,6 +86,13 @@ public class SonarClient { } /** + * New client to interact with web services related to users and groups permissions + */ + public PermissionClient permissionClient() { + return new DefaultPermissionClient(requestFactory); + } + + /** * Create a builder of {@link SonarClient}s. */ public static Builder builder() { diff --git a/sonar-ws-client/src/test/java/org/sonar/wsclient/SonarClientTest.java b/sonar-ws-client/src/test/java/org/sonar/wsclient/SonarClientTest.java index 74b601c3f3d..667b6b9a1db 100644 --- a/sonar-ws-client/src/test/java/org/sonar/wsclient/SonarClientTest.java +++ b/sonar-ws-client/src/test/java/org/sonar/wsclient/SonarClientTest.java @@ -22,6 +22,7 @@ package org.sonar.wsclient; import org.junit.Test; import org.sonar.wsclient.issue.internal.DefaultActionPlanClient; import org.sonar.wsclient.issue.internal.DefaultIssueClient; +import org.sonar.wsclient.permissions.DefaultPermissionClient; import org.sonar.wsclient.user.DefaultUserClient; import static org.fest.assertions.Assertions.assertThat; @@ -34,6 +35,7 @@ public class SonarClientTest { assertThat(client.issueClient()).isNotNull().isInstanceOf(DefaultIssueClient.class); assertThat(client.actionPlanClient()).isNotNull().isInstanceOf(DefaultActionPlanClient.class); assertThat(client.userClient()).isNotNull().isInstanceOf(DefaultUserClient.class); + assertThat(client.permissionClient()).isNotNull().isInstanceOf(DefaultPermissionClient.class); } @Test |