use of com.emc.vipr.model.catalog.CatalogCategoryRestRep in project coprhd-controller by CoprHD.
the class CatalogApi method browseCatalog.
public static void browseCatalog(String sp1, String sp2, String sp3, String sp4, String sp5) {
CatalogCategoryRestRep catalogCategory = CatalogCategoryUtils.getRootCategory();
DataObjectRestRep result = findCategoryOrService(catalogCategory, sp1, sp2, sp3, sp4, sp5);
if (result instanceof CatalogCategoryRestRep) {
renderApi(newCategoryInfo((CatalogCategoryRestRep) result));
} else if (result instanceof CatalogServiceRestRep) {
renderApi(newServiceInfo((CatalogServiceRestRep) result));
}
}
use of com.emc.vipr.model.catalog.CatalogCategoryRestRep in project coprhd-controller by CoprHD.
the class CatalogApi method category.
public static void category(String categoryId) {
CatalogCategoryRestRep category = CatalogCategoryUtils.getCatalogCategory(uri(categoryId));
renderApi(newCategoryInfo(category));
}
use of com.emc.vipr.model.catalog.CatalogCategoryRestRep in project coprhd-controller by CoprHD.
the class EditCatalog method moveDownCategory.
public static void moveDownCategory(String id) {
CatalogCategoryRestRep catalogCategory = CatalogCategoryUtils.getCatalogCategory(uri(id));
CatalogCategoryUtils.moveDownCategory(catalogCategory.getId());
categories(catalogCategory.getCatalogCategory().getId().toString());
}
use of com.emc.vipr.model.catalog.CatalogCategoryRestRep in project coprhd-controller by CoprHD.
the class EditCatalog method categories.
public static void categories(String id) {
List<CatalogCategoryRestRep> catalogCategories = null;
if (StringUtils.isNotBlank(id)) {
CatalogCategoryRestRep parent = CatalogCategoryUtils.getCatalogCategory(uri(id));
catalogCategories = CatalogCategoryUtils.getCatalogCategories(parent);
}
render(catalogCategories);
}
use of com.emc.vipr.model.catalog.CatalogCategoryRestRep in project coprhd-controller by CoprHD.
the class EditCatalog method createService.
public static void createService(String parentId, String fromId) {
CatalogCategoryRestRep parentCategory = CatalogCategoryUtils.getCatalogCategory(uri(parentId));
ServiceForm service = new ServiceForm();
service.owningCategoryId = getId(parentCategory);
service.fromId = StringUtils.defaultIfBlank(fromId, service.owningCategoryId);
edit(service);
}
Aggregations