use of com.cloud.api.command.admin.domain.ListDomainsCmdByAdmin in project cosmic by MissionCriticalCloud.
the class QueryManagerImpl method searchForDomains.
@Override
public ListResponse<DomainResponse> searchForDomains(final ListDomainsCmd cmd) {
final Pair<List<DomainJoinVO>, Integer> result = searchForDomainsInternal(cmd);
final ListResponse<DomainResponse> response = new ListResponse<>();
ResponseView respView = ResponseView.Restricted;
if (cmd instanceof ListDomainsCmdByAdmin) {
respView = ResponseView.Full;
}
final List<DomainResponse> domainResponses = ViewResponseHelper.createDomainResponse(respView, result.first().toArray(new DomainJoinVO[result.first().size()]));
response.setResponses(domainResponses, result.second());
return response;
}
Aggregations