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");
}
}
Aggregations