use of com.google.gerrit.server.account.QueryAccounts in project gerrit by GerritCodeReview.
the class AccountsImpl method query.
private List<AccountInfo> query(QueryRequest r) throws RestApiException {
try {
QueryAccounts myQueryAccounts = queryAccountsProvider.get();
myQueryAccounts.setQuery(r.getQuery());
myQueryAccounts.setLimit(r.getLimit());
myQueryAccounts.setStart(r.getStart());
for (ListAccountsOption option : r.getOptions()) {
myQueryAccounts.addOption(option);
}
return myQueryAccounts.apply(TopLevelResource.INSTANCE);
} catch (Exception e) {
throw asRestApiException("Cannot retrieve suggested accounts", e);
}
}
use of com.google.gerrit.server.account.QueryAccounts in project gerrit by GerritCodeReview.
the class AccountsImpl method suggestAccounts.
private List<AccountInfo> suggestAccounts(SuggestAccountsRequest r) throws RestApiException {
try {
QueryAccounts myQueryAccounts = queryAccountsProvider.get();
myQueryAccounts.setSuggest(true);
myQueryAccounts.setQuery(r.getQuery());
myQueryAccounts.setLimit(r.getLimit());
return myQueryAccounts.apply(TopLevelResource.INSTANCE);
} catch (Exception e) {
throw asRestApiException("Cannot retrieve suggested accounts", e);
}
}
Aggregations