Search in sources :

Example 11 with CustomServicesWorkflowRestRep

use of com.emc.storageos.model.customservices.CustomServicesWorkflowRestRep in project coprhd-controller by CoprHD.

the class WorkflowBuilder method editWorkflowName.

public static void editWorkflowName(final String id, final String newName) throws URISyntaxException {
    URI workflowURI = new URI(id);
    CustomServicesWorkflowRestRep customServicesWorkflowRestRep = getCatalogClient().customServicesPrimitives().getWorkflow(workflowURI);
    if (null != customServicesWorkflowRestRep) {
        final CustomServicesWorkflowUpdateParam param = new CustomServicesWorkflowUpdateParam();
        param.setDocument(customServicesWorkflowRestRep.getDocument());
        param.getDocument().setName(newName);
        getCatalogClient().customServicesPrimitives().editWorkflow(workflowURI, param);
    } else {
        flash.error("Workflow " + id + "not found");
    }
}
Also used : CustomServicesWorkflowRestRep(com.emc.storageos.model.customservices.CustomServicesWorkflowRestRep) URI(java.net.URI) CustomServicesWorkflowUpdateParam(com.emc.storageos.model.customservices.CustomServicesWorkflowUpdateParam)

Aggregations

CustomServicesWorkflowRestRep (com.emc.storageos.model.customservices.CustomServicesWorkflowRestRep)11 URI (java.net.URI)5 NamedURI (com.emc.storageos.db.client.model.NamedURI)3 CustomServicesWorkflowDocument (com.emc.storageos.model.customservices.CustomServicesWorkflowDocument)3 CustomServicesWorkflowUpdateParam (com.emc.storageos.model.customservices.CustomServicesWorkflowUpdateParam)3 ResourcePackage (com.emc.sa.workflow.CustomServicesWorkflowPackage.ResourcePackage)2 CustomServicesWorkflow (com.emc.storageos.db.client.model.uimodels.CustomServicesWorkflow)2 CustomServicesPrimitiveRestRep (com.emc.storageos.model.customservices.CustomServicesPrimitiveRestRep)2 NamedRelatedResourceRep (com.emc.storageos.model.NamedRelatedResourceRep)1 CustomServicesPrimitiveResourceRestRep (com.emc.storageos.model.customservices.CustomServicesPrimitiveResourceRestRep)1 CustomServicesWorkflowCreateParam (com.emc.storageos.model.customservices.CustomServicesWorkflowCreateParam)1 Step (com.emc.storageos.model.customservices.CustomServicesWorkflowDocument.Step)1 CustomServicesWorkflowList (com.emc.storageos.model.customservices.CustomServicesWorkflowList)1 CustomServicesViPRPrimitive (com.emc.storageos.primitives.java.vipr.CustomServicesViPRPrimitive)1 BufferedOutputStream (java.io.BufferedOutputStream)1 IOException (java.io.IOException)1 Date (java.util.Date)1 GZIPOutputStream (java.util.zip.GZIPOutputStream)1 TarArchiveOutputStream (org.apache.commons.compress.archivers.tar.TarArchiveOutputStream)1