use of org.apache.cloudstack.api.command.admin.account.ListAccountsCmdByAdmin in project cloudstack by apache.
the class QueryManagerImpl method searchForAccounts.
@Override
public ListResponse<AccountResponse> searchForAccounts(ListAccountsCmd cmd) {
Pair<List<AccountJoinVO>, Integer> result = searchForAccountsInternal(cmd);
ListResponse<AccountResponse> response = new ListResponse<AccountResponse>();
ResponseView respView = ResponseView.Restricted;
if (cmd instanceof ListAccountsCmdByAdmin) {
respView = ResponseView.Full;
}
List<AccountResponse> accountResponses = ViewResponseHelper.createAccountResponse(respView, cmd.getDetails(), result.first().toArray(new AccountJoinVO[result.first().size()]));
response.setResponses(accountResponses, result.second());
return response;
}
Aggregations