Search in sources :

Example 21 with CatalogServiceRestRep

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);
}
Also used : CatalogServiceRestRep(com.emc.vipr.model.catalog.CatalogServiceRestRep) CatalogCategoryRestRep(com.emc.vipr.model.catalog.CatalogCategoryRestRep)

Example 22 with CatalogServiceRestRep

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());
}
Also used : CatalogServiceRestRep(com.emc.vipr.model.catalog.CatalogServiceRestRep)

Example 23 with CatalogServiceRestRep

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);
}
Also used : CatalogServiceRestRep(com.emc.vipr.model.catalog.CatalogServiceRestRep)

Example 24 with CatalogServiceRestRep

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;
}
Also used : CategoryInfo(com.emc.vipr.model.catalog.CategoryInfo) CatalogServiceRestRep(com.emc.vipr.model.catalog.CatalogServiceRestRep) CatalogCategoryRestRep(com.emc.vipr.model.catalog.CatalogCategoryRestRep)

Example 25 with CatalogServiceRestRep

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));
}
Also used : CatalogServiceRestRep(com.emc.vipr.model.catalog.CatalogServiceRestRep)

Aggregations

CatalogServiceRestRep (com.emc.vipr.model.catalog.CatalogServiceRestRep)29 ServiceDescriptorRestRep (com.emc.vipr.model.catalog.ServiceDescriptorRestRep)7 CatalogCategoryRestRep (com.emc.vipr.model.catalog.CatalogCategoryRestRep)6 ViPRCatalogClient2 (com.emc.vipr.client.ViPRCatalogClient2)4 ApprovalRestRep (com.emc.vipr.model.catalog.ApprovalRestRep)3 CatalogServiceFieldRestRep (com.emc.vipr.model.catalog.CatalogServiceFieldRestRep)3 OrderRestRep (com.emc.vipr.model.catalog.OrderRestRep)3 ServiceFieldRestRep (com.emc.vipr.model.catalog.ServiceFieldRestRep)3 Util (play.mvc.Util)3 CatalogServiceField (com.emc.storageos.db.client.model.uimodels.CatalogServiceField)2 DataObjectRestRep (com.emc.storageos.model.DataObjectRestRep)2 TaskUtil (com.emc.vipr.client.core.impl.TaskUtil)2 Parameter (com.emc.vipr.model.catalog.Parameter)2 URI (java.net.URI)2 HashMap (java.util.HashMap)2 DateTime (org.joda.time.DateTime)2 BourneUtil (util.BourneUtil)2 WorkflowServiceDescriptor (com.emc.sa.catalog.WorkflowServiceDescriptor)1 ServiceDescriptor (com.emc.sa.descriptor.ServiceDescriptor)1 CatalogService (com.emc.storageos.db.client.model.uimodels.CatalogService)1