use of com.emc.vipr.model.catalog.CatalogServiceBulkRep in project coprhd-controller by CoprHD.
the class CatalogServiceService method queryBulkResourceReps.
private CatalogServiceBulkRep queryBulkResourceReps(List<URI> ids, CatalogServiceFilter filter) {
List<CatalogServiceRestRep> catalogServiceRestReps = new ArrayList<CatalogServiceRestRep>();
List<CatalogServiceAndFields> catalogServicesWithFields = catalogServiceManager.getCatalogServicesWithFields(ids);
Map<String, ServiceDescriptor> descriptors = getServiceDescriptors();
for (CatalogServiceAndFields catalogServiceAndField : catalogServicesWithFields) {
if ((filter == null) || filter.isAccessible(catalogServiceAndField.getCatalogService())) {
CatalogService service = catalogServiceAndField.getCatalogService();
ServiceDescriptor descriptor = descriptors.get(service.getBaseService());
List<CatalogServiceField> serviceFields = catalogServiceAndField.getCatalogServiceFields();
catalogServiceRestReps.add(map(service, descriptor, serviceFields));
}
}
catalogServiceRestReps = SortedIndexUtils.createSortedList(catalogServiceRestReps.iterator());
return new CatalogServiceBulkRep(catalogServiceRestReps);
}
Aggregations