diff options
-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 |