use of com.emc.vipr.model.catalog.CatalogServiceList in project coprhd-controller by CoprHD.
the class CatalogServiceMapper method toCatalogServiceList.
public static CatalogServiceList toCatalogServiceList(List<CatalogService> catalogServices) {
CatalogServiceList list = new CatalogServiceList();
for (CatalogService catalogService : catalogServices) {
NamedRelatedResourceRep resourceRep = toNamedRelatedResource(ResourceTypeEnum.CATALOG_SERVICE, catalogService.getId(), catalogService.getLabel());
list.getCatalogServices().add(resourceRep);
}
return list;
}
use of com.emc.vipr.model.catalog.CatalogServiceList in project coprhd-controller by CoprHD.
the class CatalogServices method listByTenant.
@Override
public List<NamedRelatedResourceRep> listByTenant(URI tenantId) {
UriBuilder uriBuilder = client.uriBuilder(PathConstants.CATALOG_SERVICE_URL);
if (tenantId != null) {
uriBuilder = uriBuilder.queryParam(SearchConstants.TENANT_ID_PARAM, tenantId);
}
CatalogServiceList response = client.getURI(CatalogServiceList.class, uriBuilder.build());
return ResourceUtils.defaultList(response.getCatalogServices());
}
Aggregations