use of com.emc.vipr.model.catalog.CatalogServiceRestRep in project coprhd-controller by CoprHD.
the class EditCatalog method services.
public static void services(String id) {
List<CatalogServiceRestRep> catalogServices = null;
if (StringUtils.isNotBlank(id)) {
CatalogCategoryRestRep parent = CatalogCategoryUtils.getCatalogCategory(uri(id));
catalogServices = CatalogServiceUtils.getCatalogServices(parent);
}
render(catalogServices);
}
use of com.emc.vipr.model.catalog.CatalogServiceRestRep in project coprhd-controller by CoprHD.
the class EditCatalog method moveUpService.
public static void moveUpService(String id) {
CatalogServiceRestRep catalogService = CatalogServiceUtils.getCatalogService(uri(id));
CatalogServiceUtils.moveUpService(catalogService.getId());
services(catalogService.getCatalogCategory().getId().toString());
}
use of com.emc.vipr.model.catalog.CatalogServiceRestRep in project coprhd-controller by CoprHD.
the class EditCatalog method deleteService.
public static void deleteService(String serviceId) {
CatalogServiceRestRep catalogService = CatalogServiceUtils.getCatalogService(uri(serviceId));
deleteService(catalogService);
}
use of com.emc.vipr.model.catalog.CatalogServiceRestRep in project coprhd-controller by CoprHD.
the class ApiMapperUtils method newCategoryInfo.
public static CategoryInfo newCategoryInfo(CatalogCategoryRestRep category) {
CategoryInfo it = new CategoryInfo();
it.setId(category.getId().toString());
it.setLink(Link.newSelfLink(categoryUrl(category.getId().toString())));
it.setInactive(category.getInactive());
it.setName(category.getName());
it.setTitle(category.getTitle());
it.setDescription(category.getDescription());
it.setImage(category.getImage());
List<CatalogCategoryRestRep> subCatalogCategories = CatalogCategoryUtils.getCatalogCategories(category);
for (CatalogCategoryRestRep subCatalogCategory : subCatalogCategories) {
it.getSubCategories().add(newNamedReference(subCatalogCategory));
}
List<CatalogServiceRestRep> catalogServices = CatalogServiceUtils.getCatalogServices(category);
for (CatalogServiceRestRep catalogService : catalogServices) {
it.getServices().add(newServiceInfo(catalogService));
}
return it;
}
use of com.emc.vipr.model.catalog.CatalogServiceRestRep in project coprhd-controller by CoprHD.
the class CatalogApi method service.
public static void service(String serviceId) {
CatalogServiceRestRep service = CatalogServiceUtils.getCatalogService(uri(serviceId));
renderApi(newServiceInfo(service));
}
Aggregations