Package org.apache.airavata.xbaya.experiment.gui

Examples of org.apache.airavata.xbaya.experiment.gui.RegistryWorkflowPublisherWindow


                        buf.append("\n");
                    }
                    this.engine.getErrorWindow().warning(buf.toString());
                    return false;
                }
                RegistryWorkflowPublisherWindow registryPublishingWindow = new RegistryWorkflowPublisherWindow(
                        this.engine);
                registryPublishingWindow.show();

                String workflowId = workflow.getName();

                workflowId = StringUtil.convertToJavaIdentifier(workflowId);

                // FIXME::Commenting the workflow UUID. It is debatable if the
                // workflow template id should be unique or not.
                // workflowId = workflowId + UUID.randomUUID();

                QName workflowQName = new QName(XBayaConstants.OGCE_WORKFLOW_NS, workflowId);

                // first find whether this resource is already in xregistry
                // TODO: Add the check back
                // DocData[] resource =
                // client.findOGCEResource(workflowQName.toString(), "Workflow",
                // null);
                // if (resource != null && !"".equals(resource)) {
                // // if already there then remove
                //
                // int result =
                // JOptionPane.showConfirmDialog(this.engine.getGUI().getGraphCanvas().getSwingComponent(),
                // "Workflow Already Exist in Xregistry. Do you want to overwrite",
                // "Workflow already exist", JOptionPane.YES_NO_OPTION);
                // if(result != JOptionPane.YES_OPTION){
                // return;
                // }
                // client.removeResource(workflowQName);
                // }
                String workflowAsString = XMLUtil.xmlElementToString(workflow.toXML());
                String owner = this.engine.getConfiguration().getRegistryUserName();

                AiravataRegistry registry = this.connectToRegistry();
                boolean result = registry.saveWorkflow(workflowQName, workflow.getName(), workflow.getDescription(), workflowAsString,
                        owner, registryPublishingWindow.isMakePublic());
                registryPublishingWindow.hide();
                return result;
            } catch (Exception e) {
                this.engine.getErrorWindow().error(e.getMessage(), e);
            }
        }
View Full Code Here

TOP

Related Classes of org.apache.airavata.xbaya.experiment.gui.RegistryWorkflowPublisherWindow

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.