diff options
author | Sébastien Lesaint <sebastien.lesaint@sonarsource.com> | 2016-10-10 16:13:18 +0200 |
---|---|---|
committer | Sébastien Lesaint <sebastien.lesaint@sonarsource.com> | 2016-10-12 12:24:32 +0200 |
commit | 93b2b3e9029564ece6f9b1a520a6427ff1f5b645 (patch) | |
tree | d36ac05bdef8a5a8c8a529cb9f5fe9ee43697952 /sonar-plugin-api | |
parent | 5c3ef618f8da331b486a958714a4cf709e80a04d (diff) | |
download | sonarqube-93b2b3e9029564ece6f9b1a520a6427ff1f5b645.tar.gz sonarqube-93b2b3e9029564ece6f9b1a520a6427ff1f5b645.zip |
SONAR-8206 add WS api/root/search
Diffstat (limited to 'sonar-plugin-api')
-rw-r--r-- | sonar-plugin-api/src/main/java/org/sonar/api/user/UserQuery.java | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/user/UserQuery.java b/sonar-plugin-api/src/main/java/org/sonar/api/user/UserQuery.java index 76a3c0fef59..136e16a1f39 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/user/UserQuery.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/user/UserQuery.java @@ -36,6 +36,7 @@ public class UserQuery { private final Collection<String> logins; private final boolean includeDeactivated; private final String searchText; + private final Boolean mustBeRoot; // for internal use in MyBatis final String searchTextSql; @@ -44,6 +45,7 @@ public class UserQuery { this.logins = builder.logins; this.includeDeactivated = builder.includeDeactivated; this.searchText = builder.searchText; + this.mustBeRoot = builder.mustBeRoot; this.searchTextSql = searchTextToSql(searchText); } @@ -75,6 +77,11 @@ public class UserQuery { return searchText; } + @CheckForNull + public Boolean mustBeRoot() { + return mustBeRoot; + } + public static Builder builder() { return new Builder(); } @@ -83,6 +90,7 @@ public class UserQuery { private boolean includeDeactivated = false; private Collection<String> logins; private String searchText; + private Boolean mustBeRoot; private Builder() { } @@ -108,6 +116,16 @@ public class UserQuery { return this; } + public Builder mustBeRoot() { + this.mustBeRoot = true; + return this; + } + + public Builder mustNotBeRoot() { + this.mustBeRoot = false; + return this; + } + public UserQuery build() { if (logins != null && logins.size() >= 1000) { throw new IllegalArgumentException("Max number of logins is 1000. Got " + logins.size()); |