use of org.apache.cloudstack.api.ResponseObject.ResponseView in project cloudstack by apache.
the class QueryManagerImpl method listIsos.
@Override
public ListResponse<TemplateResponse> listIsos(ListIsosCmd cmd) {
Pair<List<TemplateJoinVO>, Integer> result = searchForIsosInternal(cmd);
ListResponse<TemplateResponse> response = new ListResponse<TemplateResponse>();
ResponseView respView = ResponseView.Restricted;
if (cmd instanceof ListIsosCmdByAdmin) {
respView = ResponseView.Full;
}
List<TemplateResponse> templateResponses = ViewResponseHelper.createIsoResponse(respView, result.first().toArray(new TemplateJoinVO[result.first().size()]));
response.setResponses(templateResponses, result.second());
return response;
}
use of org.apache.cloudstack.api.ResponseObject.ResponseView in project cloudstack by apache.
the class QueryManagerImpl method searchForDomains.
@Override
public ListResponse<DomainResponse> searchForDomains(ListDomainsCmd cmd) {
Pair<List<DomainJoinVO>, Integer> result = searchForDomainsInternal(cmd);
ListResponse<DomainResponse> response = new ListResponse<DomainResponse>();
ResponseView respView = ResponseView.Restricted;
if (cmd instanceof ListDomainsCmdByAdmin) {
respView = ResponseView.Full;
}
List<DomainResponse> domainResponses = ViewResponseHelper.createDomainResponse(respView, result.first().toArray(new DomainJoinVO[result.first().size()]));
response.setResponses(domainResponses, result.second());
return response;
}
Aggregations