Search in sources :

Example 1 with CatalogServiceList

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;
}
Also used : CatalogService(com.emc.storageos.db.client.model.uimodels.CatalogService) CatalogServiceList(com.emc.vipr.model.catalog.CatalogServiceList) NamedRelatedResourceRep(com.emc.storageos.model.NamedRelatedResourceRep)

Example 2 with CatalogServiceList

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());
}
Also used : UriBuilder(javax.ws.rs.core.UriBuilder) CatalogServiceList(com.emc.vipr.model.catalog.CatalogServiceList)

Aggregations

CatalogServiceList (com.emc.vipr.model.catalog.CatalogServiceList)2 CatalogService (com.emc.storageos.db.client.model.uimodels.CatalogService)1 NamedRelatedResourceRep (com.emc.storageos.model.NamedRelatedResourceRep)1 UriBuilder (javax.ws.rs.core.UriBuilder)1