You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by sa...@apache.org on 2014/07/12 00:21:32 UTC
[19/20] git commit: updating xbaya gui to the new airavata
updating xbaya gui to the new airavata
Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/3e6c815a
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/3e6c815a
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/3e6c815a
Branch: refs/heads/master
Commit: 3e6c815a5f072db11fef133304c5557c9cc1181a
Parents: 8d116e9
Author: Saminda Wijeratne <sa...@gmail.com>
Authored: Fri Jul 11 18:19:42 2014 -0400
Committer: Saminda Wijeratne <sa...@gmail.com>
Committed: Fri Jul 11 18:19:42 2014 -0400
----------------------------------------------------------------------
modules/xbaya-gui/pom.xml | 20 +-
.../apache/airavata/xbaya/ThriftClientData.java | 70 +
.../airavata/xbaya/ThriftServiceType.java | 27 +
.../java/org/apache/airavata/xbaya/XBaya.java | 42 -
.../airavata/xbaya/XBayaConfiguration.java | 140 +-
.../org/apache/airavata/xbaya/XBayaEngine.java | 99 +-
.../registry/ComponentRegistryLoader.java | 15 +-
.../xbaya/core/generators/ScuflFiler.java | 89 +-
.../xbaya/interpretor/DoWhileHandler.java | 9 +-
.../xbaya/interpretor/ExperimentTemplate.java | 74 +-
.../GUIWorkflowInterpreterInteractorImpl.java | 418 +--
.../SSWorkflowInterpreterInteractorImpl.java | 232 +-
.../interpretor/WorkflowExecutionTemplate.java | 102 +-
.../xbaya/interpretor/WorkflowInterpreter.java | 3008 +++++++++---------
.../WorkflowInterpreterConfiguration.java | 464 +--
.../WorkflowInterpreterInteractor.java | 180 +-
.../WorkflowInterpretorEventListener.java | 772 ++---
...WorkflowInterpretorMessageReceiverInOut.java | 524 +--
.../WorkflowInterpretorSkeleton.java | 1135 ++++---
.../xbaya/invoker/EmbeddedGFacInvoker.java | 1364 ++++----
.../xbaya/jython/script/JythonScript.java | 1 -
.../xbaya/lead/LeadContextHeaderHelper.java | 1 -
.../registrybrowser/AiravataConfigurations.java | 54 -
.../ApplicationDeploymentDescriptionWrap.java | 98 -
.../ApplicationDeploymentDescriptions.java | 107 -
.../registrybrowser/EventingServiceURL.java | 54 -
.../registrybrowser/EventingServiceURLs.java | 54 -
.../xbaya/model/registrybrowser/GFacURL.java | 54 -
.../xbaya/model/registrybrowser/GFacURLs.java | 56 -
.../model/registrybrowser/HostDescriptions.java | 50 -
.../model/registrybrowser/InputParameters.java | 36 -
.../registrybrowser/InterpreterServiceURL.java | 54 -
.../registrybrowser/InterpreterServiceURLs.java | 56 -
.../model/registrybrowser/MessageBoxURL.java | 54 -
.../model/registrybrowser/MessageBoxURLs.java | 54 -
.../model/registrybrowser/NodeParameter.java | 60 -
.../model/registrybrowser/OutputParameters.java | 36 -
.../registrybrowser/ServiceDescriptions.java | 50 -
.../registrybrowser/ServiceParameters.java | 57 -
.../model/registrybrowser/XBayaWorkflow.java | 94 -
.../XBayaWorkflowExperiment.java | 81 -
.../XBayaWorkflowExperiments.java | 65 -
.../XBayaWorkflowNodeElement.java | 107 -
.../registrybrowser/XBayaWorkflowTemplate.java | 50 -
.../registrybrowser/XBayaWorkflowTemplates.java | 63 -
.../xbaya/provenance/ProvenanceReader.java | 64 -
.../xbaya/provenance/ProvenanceWrite.java | 217 --
.../provenance/WorkflowNodeStatusUpdater.java | 135 -
.../xbaya/provenance/WorkflowStatusUpdater.java | 103 -
.../xbaya/registry/RegistryAccesser.java | 212 --
.../nodes/AbstractAiravataTreeNode.java | 255 --
.../nodes/AiravataConfigurationsNode.java | 94 -
.../nodes/AiravataTreeNodeFactory.java | 112 -
.../ApplicationDeploymentDescriptionNode.java | 131 -
.../ApplicationDeploymentDescriptionsNode.java | 139 -
.../nodes/EventingServiceURLNode.java | 98 -
.../nodes/EventingServiceURLsNode.java | 91 -
.../registrybrowser/nodes/GFacURLNode.java | 98 -
.../registrybrowser/nodes/GFacURLsNode.java | 91 -
.../nodes/HostDescriptionNode.java | 127 -
.../nodes/HostDescriptionsNode.java | 131 -
.../nodes/InputParametersNode.java | 46 -
.../nodes/InterpreterServiceURLNode.java | 98 -
.../nodes/InterpreterServiceURLsNode.java | 90 -
.../registrybrowser/nodes/JCRBrowserIcons.java | 50 -
.../nodes/MessageBoxURLNode.java | 98 -
.../nodes/MessageBoxURLsNode.java | 90 -
.../nodes/OutputParametersNode.java | 46 -
.../registrybrowser/nodes/ParameterNode.java | 136 -
.../nodes/ParameterValueNode.java | 90 -
.../registrybrowser/nodes/ParametersNode.java | 90 -
.../registrybrowser/nodes/RegistryNode.java | 130 -
.../nodes/RegistryTreeCellRenderer.java | 43 -
.../nodes/ServiceDescriptionNode.java | 142 -
.../nodes/ServiceDescriptionsNode.java | 137 -
.../nodes/XBayaWorkflowExperimentNode.java | 141 -
.../nodes/XBayaWorkflowExperimentsNode.java | 89 -
.../nodes/XBayaWorkflowNode.java | 107 -
.../nodes/XBayaWorkflowNodeElementNode.java | 101 -
.../nodes/XBayaWorkflowTemplateNode.java | 130 -
.../nodes/XBayaWorkflowTemplatesNode.java | 99 -
.../xbaya/scufl/script/ScuflScript.java | 1078 +++----
.../airavata/xbaya/test/BPELScriptTestCase.java | 209 --
.../airavata/xbaya/test/BrowserTestCase.java | 38 -
.../apache/airavata/xbaya/test/DSCTestCase.java | 131 -
.../airavata/xbaya/test/DSCUtilTestCase.java | 79 -
.../xbaya/test/GFacServiceCreaterTestCase.java | 120 -
.../airavata/xbaya/test/GraphTestCase.java | 54 -
.../airavata/xbaya/test/MetadataTestCase.java | 221 --
.../airavata/xbaya/test/MonitorTestCase.java | 67 -
.../xbaya/test/ResourceNotifierTestCase.java | 59 -
.../airavata/xbaya/test/StringUtilTestCase.java | 55 -
.../airavata/xbaya/test/WSDLTestCase.java | 92 -
.../airavata/xbaya/test/WSDLUtilTestCase.java | 51 -
.../airavata/xbaya/test/WSIFTestCase.java | 53 -
.../airavata/xbaya/test/WaitDialogTestCase.java | 282 --
.../WebComponentRegistryClientTestCase.java | 173 -
.../test/WorkflowModificationTestCase.java | 373 ---
.../airavata/xbaya/test/WorkflowTestCase.java | 120 -
.../xbaya/test/XBayaSecurityTestCase.java | 68 -
.../airavata/xbaya/test/XBayaTestCase.java | 77 -
.../apache/airavata/xbaya/test/XppTestCase.java | 71 -
.../test/jython/JythonClassLoaderTestCase.java | 44 -
.../xbaya/test/jython/JythonLibraryTest.java | 115 -
.../jython/JythonOneTimeRunnerTestCase.java | 70 -
.../xbaya/test/jython/JythonRunnerTestCase.java | 74 -
.../xbaya/test/jython/JythonScriptTestCase.java | 131 -
.../xbaya/test/service/AllServices.java | 115 -
.../airavata/xbaya/test/service/Service.java | 44 -
.../test/service/ServiceNotificationSender.java | 161 -
.../xbaya/test/service/adder/Adder.java | 54 -
.../xbaya/test/service/adder/AdderClient.java | 114 -
.../xbaya/test/service/adder/AdderImpl.java | 79 -
.../xbaya/test/service/adder/AdderService.java | 131 -
.../xbaya/test/service/approver/Approver.java | 54 -
.../test/service/approver/ApproverClient.java | 113 -
.../test/service/approver/ApproverImpl.java | 74 -
.../test/service/approver/ApproverService.java | 131 -
.../test/service/arrayadder/ArrayAdder.java | 54 -
.../service/arrayadder/ArrayAdderClient.java | 121 -
.../test/service/arrayadder/ArrayAdderImpl.java | 83 -
.../service/arrayadder/ArrayAdderService.java | 131 -
.../test/service/arraygen/ArrayGenerator.java | 54 -
.../service/arraygen/ArrayGeneratorClient.java | 113 -
.../service/arraygen/ArrayGeneratorImpl.java | 77 -
.../service/arraygen/ArrayGeneratorService.java | 131 -
.../airavata/xbaya/test/service/echo/Echo.java | 54 -
.../xbaya/test/service/echo/EchoClient.java | 116 -
.../xbaya/test/service/echo/EchoImpl.java | 73 -
.../xbaya/test/service/echo/EchoService.java | 113 -
.../test/service/multiplier/Multiplier.java | 54 -
.../test/service/multiplier/MultiplierImpl.java | 80 -
.../service/multiplier/MultiplierService.java | 132 -
.../xbaya/test/util/WorkflowCreator.java | 1482 ++++-----
.../org/apache/airavata/xbaya/ui/XBayaGUI.java | 72 +-
...licationDescriptionAdvancedOptionDialog.java | 358 ---
.../ApplicationDescriptionDialog.java | 822 -----
...tionDescriptionHostAdvancedOptionDialog.java | 459 ---
.../DeploymentDescriptionDialog.java | 816 -----
.../descriptors/DescriptorEditorDialog.java | 424 ---
.../descriptors/DescriptorListDialog.java | 261 --
.../descriptors/HostDeploymentDialog.java | 617 ----
.../descriptors/HostDescriptionDialog.java | 592 ----
.../descriptors/ServiceDescriptionDialog.java | 727 -----
.../dynamic/DynamicWorkflowRunnerWindow.java | 774 ++---
.../xbaya/ui/dialogs/graph/ws/WSNodeWindow.java | 12 +-
.../ui/dialogs/registry/RegistryWindow.java | 268 +-
.../registry/browser/JCRBrowserDialog.java | 3 +-
.../xbaya/ui/experiment/ExperimentMenu.java | 45 +-
.../ui/experiment/RegistryLoaderWindow.java | 239 --
.../WorkflowInterpreterLaunchWindow.java | 69 +-
.../airavata/xbaya/ui/menues/EditMenuItem.java | 91 +-
.../airavata/xbaya/ui/menues/RunMenuItem.java | 56 +-
.../airavata/xbaya/ui/menues/ViewMenuItem.java | 22 +-
.../airavata/xbaya/ui/menues/XBayaMenuItem.java | 177 +-
.../xbaya/ui/views/JCRBrowserPanel.java | 574 ++--
.../airavata/xbaya/util/InterpreterUtil.java | 42 +-
.../apache/airavata/xbaya/util/XBayaUtil.java | 154 +-
.../interpreter/ComplexForEachWorkflowTest.java | 146 +-
.../interpreter/ComplexMathWorkflowTest.java | 142 +-
.../interpreter/CrossProductWorkflowTest.java | 142 +-
.../xbaya/interpreter/ForEachWorkflowTest.java | 146 +-
.../xbaya/interpreter/RegistryServiceTest.java | 210 +-
.../interpreter/SimpleForEachWorkflowTest.java | 144 +-
.../interpreter/SimpleMathWorkflowTest.java | 146 +-
.../xbaya/interpreter/WorkflowTest.java | 148 +-
.../xbaya/interpreter/WorkflowTrackingTest.java | 210 +-
.../interpreter/XBayaConsolidatedTestSuite.java | 134 +-
.../xbaya/interpreter/utils/TestUtilServer.java | 486 +--
.../interpreter/utils/WorkflowTestUtils.java | 194 +-
170 files changed, 7788 insertions(+), 24258 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/airavata/blob/3e6c815a/modules/xbaya-gui/pom.xml
----------------------------------------------------------------------
diff --git a/modules/xbaya-gui/pom.xml b/modules/xbaya-gui/pom.xml
index b62feff..f4e4030 100644
--- a/modules/xbaya-gui/pom.xml
+++ b/modules/xbaya-gui/pom.xml
@@ -13,7 +13,7 @@
<parent>
<groupId>org.apache.airavata</groupId>
<artifactId>airavata</artifactId>
- <version>0.12-SNAPSHOT</version>
+ <version>0.13-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
@@ -211,27 +211,17 @@
</dependency>
<dependency>
<groupId>org.apache.airavata</groupId>
- <artifactId>airavata-message-monitor</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.airavata</groupId>
- <artifactId>airavata-client-api</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.airavata</groupId>
- <artifactId>airavata-message-broker</artifactId>
+ <artifactId>airavata-common-utils</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.airavata</groupId>
- <artifactId>airavata-common-utils</artifactId>
+ <artifactId>airavata-workflow-tracking</artifactId>
<version>${project.version}</version>
</dependency>
- <dependency>
+ <dependency>
<groupId>org.apache.airavata</groupId>
- <artifactId>airavata-workflow-tracking</artifactId>
+ <artifactId>airavata-api-stubs</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
http://git-wip-us.apache.org/repos/asf/airavata/blob/3e6c815a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ThriftClientData.java
----------------------------------------------------------------------
diff --git a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ThriftClientData.java b/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ThriftClientData.java
new file mode 100644
index 0000000..77f71b9
--- /dev/null
+++ b/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ThriftClientData.java
@@ -0,0 +1,70 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+
+package org.apache.airavata.xbaya;
+
+public class ThriftClientData {
+ private String serverAddress;
+ private int serverPort;
+ private String gatewayId;
+ private String username;
+ private ThriftServiceType serviceType;
+
+ public ThriftClientData(ThriftServiceType serviceName, String serverAddress,
+ int serverPort, String gatewayId, String username) {
+ this.serviceType = serviceName;
+ this.serverAddress = serverAddress;
+ this.serverPort = serverPort;
+ this.gatewayId = gatewayId;
+ this.username = username;
+ }
+ public String getServerAddress() {
+ return serverAddress;
+ }
+ public void setServerAddress(String serverAddress) {
+ this.serverAddress = serverAddress;
+ }
+ public int getServerPort() {
+ return serverPort;
+ }
+ public void setServerPort(int serverPort) {
+ this.serverPort = serverPort;
+ }
+ public String getGatewayId() {
+ return gatewayId;
+ }
+ public void setGatewayId(String gatewayId) {
+ this.gatewayId = gatewayId;
+ }
+ public String getUsername() {
+ return username;
+ }
+ public void setUsername(String username) {
+ this.username = username;
+ }
+ public ThriftServiceType getServiceType() {
+ return serviceType;
+ }
+ public void setServiceType(ThriftServiceType serviceName) {
+ this.serviceType = serviceName;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/airavata/blob/3e6c815a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ThriftServiceType.java
----------------------------------------------------------------------
diff --git a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ThriftServiceType.java b/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ThriftServiceType.java
new file mode 100644
index 0000000..00875a5
--- /dev/null
+++ b/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ThriftServiceType.java
@@ -0,0 +1,27 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+
+package org.apache.airavata.xbaya;
+
+public enum ThriftServiceType {
+ API_SERVICE,
+ WORKFLOW_SERVICE
+}
http://git-wip-us.apache.org/repos/asf/airavata/blob/3e6c815a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/XBaya.java
----------------------------------------------------------------------
diff --git a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/XBaya.java b/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/XBaya.java
index 6f4d2db..5192a93 100644
--- a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/XBaya.java
+++ b/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/XBaya.java
@@ -123,26 +123,6 @@ public class XBaya {
} else if ("-workflow".equalsIgnoreCase(arg)) {
index++;
this.config.setWorkflow(args[index]);
- } else if ("-gfacURL".equalsIgnoreCase(arg)) {
- index++;
- String url = args[index];
- try {
- this.config.setGFacURL(parseURL(url));
- } catch (URISyntaxException e) {
- String message = "The GFac URL is in wrong format: " + url;
- logger.warn(message, e);
- this.config.addError(new WorkflowException(message, e));
- }
- } else if ("-dscURL".equalsIgnoreCase(arg)) {
- index++;
- String url = args[index];
- try {
- this.config.setDSCURL(parseURL(url));
- } catch (URISyntaxException e) {
- String message = "The DSC URL is in wrong format: " + url;
- logger.warn(message, e);
- this.config.addError(new WorkflowException(message, e));
- }
} else if ("-startMonitor".equalsIgnoreCase(arg)) {
this.config.setStartMonitor(true);
} else if ("-brokerURL".equalsIgnoreCase(arg)) {
@@ -197,27 +177,6 @@ public class XBaya {
logger.warn(message, e);
this.config.addError(new WorkflowException(message, e));
}
- } else if ("-registryURL".equalsIgnoreCase(arg)) {
- index++;
- String registryURL = args[index];
- try {
- this.config.setRegistryURL(parseURL(registryURL));
- // we need to give preference when a user set registry url from the
- // command line
- this.config.setRegURLSetByCMD(true);
- } catch (URISyntaxException e) {
- String message = "The message box URL is in wrong format: " + registryURL;
- logger.warn(message, e);
- this.config.addError(new WorkflowException(message, e));
- }
- } else if ("-registryUserName".equalsIgnoreCase(arg)) {
-
- index++;
- this.config.setRegigstryUserName(args[index]);
- } else if ("-registryPassphrase".equalsIgnoreCase(arg)) {
-
- index++;
- this.config.setRegistryPassphrase(args[index]);
} else if ("-width".equalsIgnoreCase(arg)) {
index++;
String width = args[index];
@@ -277,7 +236,6 @@ public class XBaya {
logger.error(message);
this.config.addError(new WorkflowException(message));
}
- this.config.setAiravataAPI(this.config.getAiravataAPI());
index++;
}
} catch (ArrayIndexOutOfBoundsException e) {
http://git-wip-us.apache.org/repos/asf/airavata/blob/3e6c815a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/XBayaConfiguration.java
----------------------------------------------------------------------
diff --git a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/XBayaConfiguration.java b/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/XBayaConfiguration.java
index 4aae6b4..6b94cc2 100644
--- a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/XBayaConfiguration.java
+++ b/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/XBayaConfiguration.java
@@ -24,16 +24,20 @@ package org.apache.airavata.xbaya;
import java.io.File;
import java.net.URI;
import java.util.ArrayList;
+import java.util.HashMap;
import java.util.List;
+import java.util.Map;
import java.util.Observable;
import java.util.Observer;
-import org.apache.airavata.client.api.AiravataAPI;
+import org.apache.airavata.api.Airavata.Client;
import org.apache.airavata.gfac.ec2.AmazonSecurityContext;
+import org.apache.airavata.model.error.AiravataClientConnectException;
import org.apache.airavata.schemas.wec.ContextHeaderDocument;
import org.apache.airavata.workflow.model.component.registry.JCRComponentRegistry;
import org.apache.airavata.xbaya.core.ide.XBayaExecutionModeListener;
import org.apache.airavata.xbaya.file.XBayaPathConstants;
+import org.apache.airavata.xbaya.util.XBayaUtil;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -59,7 +63,6 @@ public class XBayaConfiguration extends Observable implements Observer {
private URI gpelInstanceID = null;
- private AiravataAPI airavataAPI = null;
// ODE
private String odeURL = XBayaConstants.DEFAULT_ODE_URL;
@@ -70,16 +73,6 @@ public class XBayaConfiguration extends Observable implements Observer {
private URI proxyURI = XBayaConstants.DEFAULT_PROXY_URI;
- private URI gfacURL = XBayaConstants.DEFAULT_GFAC_URL;
-
- private URI registryURL = XBayaConstants.REGISTRY_URL;
-
- private String regigstryUserName = XBayaConstants.REGISTRY_USERNAME;
-
- private String registryPassphrase = XBayaConstants.REGISTRY_PASSPHRASE;
-
- private String defaultGateway = XBayaConstants.DEFAULT_GATEWAY;
-
private URI dscURL = XBayaConstants.DEFAULT_DSC_URL;
// Monitor related
@@ -152,6 +145,8 @@ public class XBayaConfiguration extends Observable implements Observer {
private ContextHeaderDocument.ContextHeader contextHeader;
+ private Map<ThriftServiceType, ThriftClientData> thriftClientDataList = new HashMap<ThriftServiceType, ThriftClientData>();
+
public enum XBayaExecutionMode{
IDE,
MONITOR
@@ -189,10 +184,6 @@ public class XBayaConfiguration extends Observable implements Observer {
if (gpel != null) {
this.gpelEngineURL = config.getGpelUrl();
}
- URI gfac = config.getGfacUrl();
- if (gfac != null) {
- this.gfacURL = gfac;
- }
URI dsc = config.getDscUrl();
if (dsc != null) {
this.dscURL = dsc;
@@ -355,20 +346,6 @@ public class XBayaConfiguration extends Observable implements Observer {
}
/**
- * @return The GFac URL
- */
- public URI getGFacURL() {
- return this.gfacURL;
- }
-
- /**
- * @param gfacURL
- */
- public void setGFacURL(URI gfacURL) {
- this.gfacURL = gfacURL;
- }
-
- /**
* @return The DSC URL
*/
public URI getDSCURL() {
@@ -785,48 +762,20 @@ public class XBayaConfiguration extends Observable implements Observer {
return this.closeOnExit;
}
- public AiravataAPI getAiravataAPI() {
- return airavataAPI;
- }
-
- public void setAiravataAPI(AiravataAPI airavataAPI) {
- if (this.airavataAPI != null && this.airavataAPI instanceof Observable) {
- ((Observable) this.airavataAPI).deleteObserver(this);
- }
- this.airavataAPI = airavataAPI;
- if (airavataAPI != null && airavataAPI instanceof Observable) {
- ((Observable) airavataAPI).addObserver(this);
- }
- if (getJcrComponentRegistry()==null){
- setJcrComponentRegistry(new JCRComponentRegistry(airavataAPI));
- }else{
- getJcrComponentRegistry().setAiravataAPI(airavataAPI);
- }
- triggerObservers(getJcrComponentRegistry());
- }
-
- public URI getRegistryURL() {
- return registryURL;
- }
-
- public void setRegistryURL(URI registryURL) {
- this.registryURL = registryURL;
- }
-
- public void setRegigstryUserName(String regigstryUserName) {
- this.regigstryUserName = regigstryUserName;
- }
-
- public void setRegistryPassphrase(String registryPassphrase) {
- this.registryPassphrase = registryPassphrase;
- }
-
- public String getRegistryUserName() {
- return regigstryUserName;
- }
-
- public String getRegistryPassphrase() {
- return registryPassphrase;
+ public void servicesChanged(ThriftServiceType type) {
+ if (type==ThriftServiceType.API_SERVICE) {
+ try {
+ Client airavataClient = XBayaUtil.getAiravataClient(getThriftClientData(ThriftServiceType.API_SERVICE));
+ if (getJcrComponentRegistry() == null) {
+ setJcrComponentRegistry(new JCRComponentRegistry(airavataClient));
+ } else {
+ getJcrComponentRegistry().setClient(airavataClient);
+ }
+ triggerObservers(getJcrComponentRegistry());
+ } catch (AiravataClientConnectException e) {
+ e.printStackTrace();
+ }
+ }
}
protected void triggerObservers(Object o) {
@@ -914,22 +863,6 @@ public class XBayaConfiguration extends Observable implements Observer {
this.y = y;
}
-// public AiravataAPI getAiravataAPI() {
-// return airavataAPI;
-// }
-//
-// public void setAiravataAPI(AiravataAPI airavataAPI) {
-// this.airavataAPI = airavataAPI;
-// }
-
- public String getDefaultGateway() {
- return defaultGateway;
- }
-
- public void setDefaultGateway(String defaultGateway) {
- this.defaultGateway = defaultGateway;
- }
-
public JCRComponentRegistry getJcrComponentRegistry() {
return jcrComponentRegistry;
}
@@ -946,24 +879,6 @@ public class XBayaConfiguration extends Observable implements Observer {
this.regURLSetByCMD = regURLSetByCMD;
}
- // public AiravataAPI setAiravataAPI() {
-// try{
-// URI baseUri = new URI(ResourcePathConstants.BASE_URL);
-// PasswordCallbackImpl passwordCallback = new PasswordCallbackImpl(getRegistryUserName(), getRegistryPassphrase());
-// airavataAPI = AiravataClientUtils.getAPI(baseUri,
-// getRegistryUserName(), passwordCallback);
-// } catch (RepositoryException e) {
-// e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.
-// } catch (MalformedURLException e) {
-// e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.
-// } catch (RegistryException e) {
-// e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.
-// } catch (URISyntaxException e) {
-// e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.
-// }
-// return airavataAPI;
-// }
-
public ContextHeaderDocument.ContextHeader getContextHeader() {
return contextHeader;
}
@@ -971,4 +886,17 @@ public class XBayaConfiguration extends Observable implements Observer {
public void setContextHeader(ContextHeaderDocument.ContextHeader contextHeader) {
this.contextHeader = contextHeader;
}
+
+ public Map<ThriftServiceType, ThriftClientData> getThriftClientDataList() {
+ return thriftClientDataList;
+ }
+
+ public void addThriftClientData(ThriftClientData data){
+ getThriftClientDataList().put(data.getServiceType(), data);
+ servicesChanged(data.getServiceType());
+ }
+
+ public ThriftClientData getThriftClientData(ThriftServiceType serviceType){
+ return (getThriftClientDataList().containsKey(serviceType)?getThriftClientDataList().get(serviceType):null);
+ }
}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata/blob/3e6c815a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/XBayaEngine.java
----------------------------------------------------------------------
diff --git a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/XBayaEngine.java b/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/XBayaEngine.java
index 1973172..52ab853 100644
--- a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/XBayaEngine.java
+++ b/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/XBayaEngine.java
@@ -21,24 +21,16 @@
package org.apache.airavata.xbaya;
-import java.net.URI;
import java.util.List;
-import org.apache.airavata.client.AiravataAPIFactory;
-import org.apache.airavata.client.api.AiravataAPI;
-import org.apache.airavata.client.api.AiravataManager;
-import org.apache.airavata.client.api.exception.AiravataAPIInvocationException;
import org.apache.airavata.workflow.model.component.ComponentRegistryException;
import org.apache.airavata.workflow.model.component.amazon.AmazonComponentRegistry;
import org.apache.airavata.workflow.model.component.local.LocalComponentRegistry;
import org.apache.airavata.workflow.model.component.system.SystemComponentRegistry;
import org.apache.airavata.workflow.model.exceptions.WorkflowException;
-import org.apache.airavata.workflow.model.exceptions.WorkflowRuntimeException;
import org.apache.airavata.ws.monitor.Monitor;
import org.apache.airavata.ws.monitor.MonitorConfiguration;
import org.apache.airavata.xbaya.component.registry.ComponentController;
-import org.apache.airavata.xbaya.interpretor.WorkflowInterpreter;
-import org.apache.airavata.xbaya.registry.PasswordCallbackImpl;
import org.apache.airavata.xbaya.ui.XBayaGUI;
import org.apache.airavata.xbaya.ui.monitor.MonitorStarter;
import org.apache.airavata.xbaya.ui.utils.ErrorMessages;
@@ -67,10 +59,6 @@ public class XBayaEngine {
private SystemComponentRegistry componentRegistry;
- private WorkflowInterpreter workflowInterpreter;
-
- private AiravataAPI airavataAPI;
-
private ComponentSelector componentTreeViewer;
/**
@@ -87,30 +75,7 @@ public class XBayaEngine {
configuration.getTopic(), configuration.isPullMode(), configuration.getMessageBoxURL());
this.monitor = new Monitor(monitorConfiguration);
- if (configuration.getAiravataAPI() == null && airavataAPI == null) {
- try {
- airavataAPI = AiravataAPIFactory.getAPI(configuration.getRegistryURL(),
- configuration.getDefaultGateway(), configuration.getRegistryUserName(),
- new PasswordCallbackImpl(configuration.getRegistryUserName(), configuration.getRegistryPassphrase()));
- configuration.setAiravataAPI(airavataAPI);
- } catch (AiravataAPIInvocationException e) {
- logger.error("Unable to instantiate airavata api instance", e);
- }
-
- }
-
- // MyProxy
- // this.myProxyClient = new MyProxyClient(this.configuration.getMyProxyServer(),
- // this.configuration.getMyProxyPort(), this.configuration.getMyProxyUsername(),
- // this.configuration.getMyProxyPassphrase(), this.configuration.getMyProxyLifetime());
- //
- // // These have to be before the GUI setup.
- // this.workflowClient = WorkflowEngineManager.getWorkflowClient();
- // this.workflowClient.setXBayaEngine(this);
-
-
// Set up the GUI.
- updateXBayaConfigurationServiceURLs();
XBayaEngine.this.gui = new XBayaGUI(XBayaEngine.this);
// Arguments errors.
@@ -180,6 +145,9 @@ public class XBayaEngine {
}
+ private void addApplicationRegistry(){
+
+ }
/**
* Initializes registris.
*/
@@ -234,67 +202,6 @@ public class XBayaEngine {
getGUI().getErrorWindow().error(ErrorMessages.UNEXPECTED_ERROR, e);
}
}
-
- public void resetWorkflowInterpreter() {
- this.workflowInterpreter = null;
- }
-
-
- public WorkflowInterpreter getWorkflowInterpreter() {
- return workflowInterpreter;
- }
-
- public void registerWorkflowInterpreter(WorkflowInterpreter workflowInterpreter) {
- if (getWorkflowInterpreter()!=null){
- throw new WorkflowRuntimeException("Critical Error!!! Workflow interpretter already running. Cleanup first");
- }
- this.workflowInterpreter = workflowInterpreter;
- }
-
-
- public void updateXBayaConfigurationServiceURLs() {
- try {
- if (this.getConfiguration().getAiravataAPI()!=null){
- airavataAPI = getConfiguration().getAiravataAPI();
- AiravataManager airavataManager = airavataAPI.getAiravataManager();
-// AiravataRegistry2 registry=this.getConfiguration().getJcrComponentRegistry().getRegistry();
- URI eventingServiceURL = airavataManager.getEventingServiceURL();
- if (eventingServiceURL!=null) {
- this.getConfiguration().setBrokerURL(eventingServiceURL);
- this.getMonitor()
- .getConfiguration()
- .setBrokerURL(eventingServiceURL);
- }
- URI messageBoxServiceURL = airavataManager.getMessageBoxServiceURL();
- if (messageBoxServiceURL!=null) {
- this.getConfiguration()
- .setMessageBoxURL(messageBoxServiceURL);
- this.getMonitor()
- .getConfiguration()
- .setMessageBoxURL(messageBoxServiceURL);
- }
- List<URI> interpreterServiceURLList = airavataManager.getWorkflowInterpreterServiceURLs();
- if (interpreterServiceURLList.size()>0) {
- this.getConfiguration()
- .setWorkflowInterpreterURL(interpreterServiceURLList.get(0));
- }
-// List<URI> gfacURLList = airavataManager.getGFaCURLs();
-// if (gfacURLList.size()>0) {
-// this.getConfiguration().setGFacURL(gfacURLList.get(0));
-// }
- }
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
-
- public AiravataAPI getAiravataAPI() {
- return airavataAPI;
- }
-
- public void setAiravataAPI(AiravataAPI airavataAPI) {
- this.airavataAPI = airavataAPI;
- }
public void reloadRegistry(){
componentTreeViewer.refresh();
http://git-wip-us.apache.org/repos/asf/airavata/blob/3e6c815a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/component/registry/ComponentRegistryLoader.java
----------------------------------------------------------------------
diff --git a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/component/registry/ComponentRegistryLoader.java b/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/component/registry/ComponentRegistryLoader.java
index b0f44e9..2c0493c 100644
--- a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/component/registry/ComponentRegistryLoader.java
+++ b/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/component/registry/ComponentRegistryLoader.java
@@ -26,11 +26,8 @@ import java.util.Map;
import java.util.Observable;
import java.util.Observer;
-//import org.apache.airavata.registry.api.AiravataRegistry2;
-import org.apache.airavata.client.api.AiravataAPI;
import org.apache.airavata.workflow.model.component.ComponentRegistry;
import org.apache.airavata.workflow.model.component.ComponentRegistryException;
-import org.apache.airavata.workflow.model.component.registry.JCRComponentRegistry;
import org.apache.airavata.xbaya.XBayaConfiguration;
import org.apache.airavata.xbaya.XBayaEngine;
import org.apache.airavata.xbaya.ui.dialogs.WaitDialog;
@@ -39,6 +36,7 @@ import org.apache.airavata.xbaya.ui.utils.ErrorMessages;
import org.apache.airavata.xbaya.ui.widgets.component.ComponentTreeNode;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+//import org.apache.airavata.registry.api.AiravataRegistry2;
public class ComponentRegistryLoader implements Cancelable, Observer {
@@ -149,18 +147,7 @@ public class ComponentRegistryLoader implements Cancelable, Observer {
public void update(Observable observable, Object o) {
if ((observable instanceof XBayaConfiguration) && (o instanceof ComponentRegistry)){
ComponentRegistry componentRegistry=(ComponentRegistry)o;
- if (observableRegistry!=null){
- observableRegistry.deleteObserver(this);
- }
- if (componentRegistry instanceof JCRComponentRegistry){
- AiravataAPI registry = ((JCRComponentRegistry)componentRegistry).getAiravataAPI();
- if (registry!=null && registry instanceof Observable){
- (observableRegistry=(Observable)registry).addObserver(this);
- }
- }
load(componentRegistry);
- }else if (observable instanceof AiravataAPI){
- load(getEngine().getConfiguration().getJcrComponentRegistry());
}
}
http://git-wip-us.apache.org/repos/asf/airavata/blob/3e6c815a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/core/generators/ScuflFiler.java
----------------------------------------------------------------------
diff --git a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/core/generators/ScuflFiler.java b/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/core/generators/ScuflFiler.java
index bed2bc4..88900af 100644
--- a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/core/generators/ScuflFiler.java
+++ b/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/core/generators/ScuflFiler.java
@@ -22,20 +22,13 @@
package org.apache.airavata.xbaya.core.generators;
import java.io.File;
-import java.io.IOException;
-import java.util.ArrayList;
import javax.swing.JFileChooser;
import javax.swing.filechooser.FileFilter;
-import org.apache.airavata.common.utils.IOUtil;
-import org.apache.airavata.workflow.model.graph.GraphException;
-import org.apache.airavata.workflow.model.wf.Workflow;
import org.apache.airavata.xbaya.XBayaConstants;
import org.apache.airavata.xbaya.XBayaEngine;
import org.apache.airavata.xbaya.file.XBayaPathConstants;
-import org.apache.airavata.xbaya.scufl.script.ScuflScript;
-import org.apache.airavata.xbaya.ui.utils.ErrorMessages;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -81,47 +74,47 @@ public class ScuflFiler {
* Exports a Scufl script to the local file
*/
public void exportScuflScript() {
- Workflow workflow = this.engine.getGUI().getWorkflow();
- ScuflScript script = new ScuflScript(workflow, this.engine.getConfiguration());
-
- // Check if there is any errors in the workflow first.
- ArrayList<String> warnings = new ArrayList<String>();
- if (!script.validate(warnings)) {
- StringBuilder buf = new StringBuilder();
- for (String warning : warnings) {
- buf.append("- ");
- buf.append(warning);
- buf.append("\n");
- }
- this.engine.getGUI().getErrorWindow().warning(buf.toString());
- return;
- }
- int returnVal = this.scuflFileChooser.showSaveDialog(this.engine.getGUI().getFrame());
- if (returnVal == JFileChooser.APPROVE_OPTION) {
- File file = this.scuflFileChooser.getSelectedFile();
- logger.debug(file.getPath());
-
- // Put ".py" at the end of the file name
- String path = file.getPath();
- if (!path.endsWith(XBayaConstants.SCUFL_SCRIPT_SUFFIX)) {
- file = new File(path + XBayaConstants.SCUFL_SCRIPT_SUFFIX);
- }
-
- try {
- // Create the script.
- script.create();
- // Write to a file
- IOUtil.writeToFile(script.getScript(), file);
- } catch (IOException e) {
- this.engine.getGUI().getErrorWindow().error(ErrorMessages.WRITE_FILE_ERROR, e);
- } catch (GraphException e) {
- this.engine.getGUI().getErrorWindow().error(ErrorMessages.GRAPH_FORMAT_ERROR, e);
- } catch (RuntimeException e) {
- this.engine.getGUI().getErrorWindow().error(ErrorMessages.UNEXPECTED_ERROR, e);
- } catch (Error e) {
- this.engine.getGUI().getErrorWindow().error(ErrorMessages.UNEXPECTED_ERROR, e);
- }
- }
+// Workflow workflow = this.engine.getGUI().getWorkflow();
+// ScuflScript script = new ScuflScript(workflow, this.engine.getConfiguration());
+//
+// // Check if there is any errors in the workflow first.
+// ArrayList<String> warnings = new ArrayList<String>();
+// if (!script.validate(warnings)) {
+// StringBuilder buf = new StringBuilder();
+// for (String warning : warnings) {
+// buf.append("- ");
+// buf.append(warning);
+// buf.append("\n");
+// }
+// this.engine.getGUI().getErrorWindow().warning(buf.toString());
+// return;
+// }
+// int returnVal = this.scuflFileChooser.showSaveDialog(this.engine.getGUI().getFrame());
+// if (returnVal == JFileChooser.APPROVE_OPTION) {
+// File file = this.scuflFileChooser.getSelectedFile();
+// logger.debug(file.getPath());
+//
+// // Put ".py" at the end of the file name
+// String path = file.getPath();
+// if (!path.endsWith(XBayaConstants.SCUFL_SCRIPT_SUFFIX)) {
+// file = new File(path + XBayaConstants.SCUFL_SCRIPT_SUFFIX);
+// }
+//
+// try {
+// // Create the script.
+// script.create();
+// // Write to a file
+// IOUtil.writeToFile(script.getScript(), file);
+// } catch (IOException e) {
+// this.engine.getGUI().getErrorWindow().error(ErrorMessages.WRITE_FILE_ERROR, e);
+// } catch (GraphException e) {
+// this.engine.getGUI().getErrorWindow().error(ErrorMessages.GRAPH_FORMAT_ERROR, e);
+// } catch (RuntimeException e) {
+// this.engine.getGUI().getErrorWindow().error(ErrorMessages.UNEXPECTED_ERROR, e);
+// } catch (Error e) {
+// this.engine.getGUI().getErrorWindow().error(ErrorMessages.UNEXPECTED_ERROR, e);
+// }
+// }
}
}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata/blob/3e6c815a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/interpretor/DoWhileHandler.java
----------------------------------------------------------------------
diff --git a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/interpretor/DoWhileHandler.java b/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/interpretor/DoWhileHandler.java
index a9b1027..a5c6366 100644
--- a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/interpretor/DoWhileHandler.java
+++ b/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/interpretor/DoWhileHandler.java
@@ -55,7 +55,6 @@ public class DoWhileHandler implements Callable<Boolean> {
private Map<Node, Invoker> invokerMap;
private ArrayList<Node> waitingNode;
private ArrayList<Node> finishedNodes;
- private WorkflowInterpreter interpreter;
private ExecutorService threadExecutor;
/**
@@ -69,13 +68,11 @@ public class DoWhileHandler implements Callable<Boolean> {
* @param interpreter
*/
- public DoWhileHandler(DoWhileNode node, Map<Node, Invoker> invokerMap, ArrayList<Node> waitingNode, ArrayList<Node> finishedNodes,
- WorkflowInterpreter interpreter, ExecutorService threadExecutor) {
+ public DoWhileHandler(DoWhileNode node, Map<Node, Invoker> invokerMap, ArrayList<Node> waitingNode, ArrayList<Node> finishedNodes, ExecutorService threadExecutor) {
this.dowhilenode = node;
this.invokerMap = invokerMap;
this.waitingNode = waitingNode;
this.finishedNodes = finishedNodes;
- this.interpreter = interpreter;
this.threadExecutor = threadExecutor;
}
@@ -175,7 +172,7 @@ public class DoWhileHandler implements Callable<Boolean> {
throw new WorkflowRuntimeException("More than one dowhile execution not supported");
}
Node donode = readyNodes.get(0);
- this.interpreter.handleWSComponent(donode);
+// this.interpreter.handleWSComponent(donode);
log.debug("Invoked service " + donode.getName());
List<DataPort> inputPorts = this.dowhilenode.getInputPorts();
@@ -222,7 +219,7 @@ public class DoWhileHandler implements Callable<Boolean> {
Node whileNode = readyNodes.get(0);
log.debug("Expression evaluation is true so invoking service again " + whileNode.getName());
- this.interpreter.handleWSComponent(whileNode);
+// this.interpreter.handleWSComponent(whileNode);
}
}
// WS node should be done
http://git-wip-us.apache.org/repos/asf/airavata/blob/3e6c815a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/interpretor/ExperimentTemplate.java
----------------------------------------------------------------------
diff --git a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/interpretor/ExperimentTemplate.java b/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/interpretor/ExperimentTemplate.java
index c08ee34..717628a 100644
--- a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/interpretor/ExperimentTemplate.java
+++ b/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/interpretor/ExperimentTemplate.java
@@ -1,37 +1,37 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-package org.apache.airavata.xbaya.interpretor;
-
-import java.util.List;
-
-public class ExperimentTemplate {
- private List<WorkflowExecutionTemplate> workflowExecutionTemplates;
-
- public List<WorkflowExecutionTemplate> getWorkflowExecutionTemplates() {
- return workflowExecutionTemplates;
- }
-
- public void setWorkflowExecutionTemplates(
- List<WorkflowExecutionTemplate> workflowExecutionTemplates) {
- this.workflowExecutionTemplates = workflowExecutionTemplates;
- }
-}
+///*
+// *
+// * Licensed to the Apache Software Foundation (ASF) under one
+// * or more contributor license agreements. See the NOTICE file
+// * distributed with this work for additional information
+// * regarding copyright ownership. The ASF licenses this file
+// * to you under the Apache License, Version 2.0 (the
+// * "License"); you may not use this file except in compliance
+// * with the License. You may obtain a copy of the License at
+// *
+// * http://www.apache.org/licenses/LICENSE-2.0
+// *
+// * Unless required by applicable law or agreed to in writing,
+// * software distributed under the License is distributed on an
+// * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// * KIND, either express or implied. See the License for the
+// * specific language governing permissions and limitations
+// * under the License.
+// *
+// */
+//
+//package org.apache.airavata.xbaya.interpretor;
+//
+//import java.util.List;
+//
+//public class ExperimentTemplate {
+// private List<WorkflowExecutionTemplate> workflowExecutionTemplates;
+//
+// public List<WorkflowExecutionTemplate> getWorkflowExecutionTemplates() {
+// return workflowExecutionTemplates;
+// }
+//
+// public void setWorkflowExecutionTemplates(
+// List<WorkflowExecutionTemplate> workflowExecutionTemplates) {
+// this.workflowExecutionTemplates = workflowExecutionTemplates;
+// }
+//}
http://git-wip-us.apache.org/repos/asf/airavata/blob/3e6c815a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/interpretor/GUIWorkflowInterpreterInteractorImpl.java
----------------------------------------------------------------------
diff --git a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/interpretor/GUIWorkflowInterpreterInteractorImpl.java b/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/interpretor/GUIWorkflowInterpreterInteractorImpl.java
index 526610d..3c3288e 100644
--- a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/interpretor/GUIWorkflowInterpreterInteractorImpl.java
+++ b/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/interpretor/GUIWorkflowInterpreterInteractorImpl.java
@@ -1,211 +1,211 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-package org.apache.airavata.xbaya.interpretor;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.apache.airavata.workflow.model.graph.Node;
-import org.apache.airavata.workflow.model.graph.ws.WSGraph;
-import org.apache.airavata.workflow.model.wf.Workflow;
-import org.apache.airavata.workflow.model.wf.WorkflowExecutionState;
-import org.apache.airavata.ws.monitor.MonitorException;
-import org.apache.airavata.xbaya.XBayaEngine;
-import org.apache.airavata.xbaya.graph.controller.NodeController;
-import org.apache.airavata.xbaya.ui.XBayaGUI;
-import org.apache.airavata.xbaya.ui.dialogs.WaitDialog;
-import org.apache.airavata.xbaya.ui.graph.subworkflow.SubWorkflowNodeGUI;
-import org.apache.airavata.xbaya.ui.graph.system.DifferedInputHandler;
-import org.apache.airavata.xbaya.ui.utils.Cancelable;
-import org.apache.airavata.xbaya.util.InterpreterUtil;
-
-public class GUIWorkflowInterpreterInteractorImpl implements
- WorkflowInterpreterInteractor {
- private XBayaGUI xbayaGUI;
- private Workflow workflow;
- private XBayaEngine engine;
-
- private Map<String, WaitDialog> taskDialogs = new HashMap<String, WaitDialog>();
-
- public GUIWorkflowInterpreterInteractorImpl(XBayaEngine engine,
- Workflow workflow) {
- this.engine = engine;
- this.xbayaGUI = engine.getGUI();
- this.setWorkflow(workflow);
- }
-
- @Override
- public boolean notify(WorkflowExecutionMessage messageType, WorkflowInterpreterConfiguration config, Object data) {
- switch (messageType) {
- case NODE_STATE_CHANGED:
- xbayaGUI.getGraphCanvas().repaint();
- break;
- case EXECUTION_STATE_CHANGED:
- WorkflowExecutionState state = (WorkflowExecutionState) data;
- // if (state==WorkflowExecutionState.PAUSED ||
- // state==WorkflowExecutionState.STOPPED) {
- // if (getWorkflow().getExecutionState() ==
- // WorkflowExecutionState.RUNNING
- // || getWorkflow().getExecutionState() ==
- // WorkflowExecutionState.STEP) {
- // } else {
- // throw new WorkflowRuntimeException(
- // "Cannot pause when not running");
- // }
- // }
- getWorkflow().setExecutionState(state);
- if (state==WorkflowExecutionState.PAUSED){
- if (config.getWorkflow().getExecutionState() == WorkflowExecutionState.RUNNING
- || config.getWorkflow().getExecutionState() == WorkflowExecutionState.STEP) {
- config.getGUI().getToolbar().getPlayAction()
- .actionPerformed(null);
- }
- }
- break;
- case EXECUTION_TASK_START:
- TaskNotification task = (TaskNotification) data;
- final WaitDialog waitDialog = new WaitDialog(new Cancelable() {
- @Override
- public void cancel() {
- // Do nothing
- }
- }, task.messageTitle, task.message, this.xbayaGUI);
- new Thread(new Runnable() {
- @Override
- public void run() {
- waitDialog.show();
- }
- }).start();
- taskDialogs.put(task.messageId, waitDialog);
- break;
- case EXECUTION_TASK_END:
- task = (TaskNotification) data;
- if (taskDialogs.containsKey(task.messageId)) {
- taskDialogs.get(task.messageId).hide();
- taskDialogs.remove(task.messageId);
- }
- break;
- case EXECUTION_ERROR:
- xbayaGUI.getErrorWindow().error((Exception) data);
- break;
- case OPEN_SUBWORKFLOW:
- ((SubWorkflowNodeGUI) NodeController.getGUI((Node) data))
- .openWorkflowTab(config.getGUI());
- break;
- case EXECUTION_CLEANUP:
- this.engine.resetWorkflowInterpreter();
- try {
- config.getMonitor().stop();
- } catch (MonitorException e) {
- e.printStackTrace();
- } finally {
- this.engine.getMonitor().resetEventData();
- }
- break;
- case HANDLE_DEPENDENT_NODES_DIFFERED_INPUTS:
- ArrayList<Node> waitingNodes = InterpreterUtil.getWaitingNodesDynamically((WSGraph)data);
- for (Node readyNode : waitingNodes) {
- DifferedInputHandler.handleDifferredInputsofDependentNodes(
- readyNode, config.getGUI());
- }
- break;
- default:
- return false;
- }
- return true;
- }
-
- @Override
- public Object retrieveData(WorkflowExecutionMessage messageType, WorkflowInterpreterConfiguration config, Object data)
- throws Exception {
- Object result = null;
- switch (messageType) {
- case INPUT_WORKFLOWINTERPRETER_FOR_WORKFLOW:
- Workflow subWorkflow= (Workflow) data;
- WorkflowInterpreterConfiguration workflowInterpreterConfiguration = new WorkflowInterpreterConfiguration(subWorkflow,config.getTopic(),config.getMessageBoxURL(), config.getMessageBrokerURL(), config.getRegistry(), config.getConfiguration(), config.getGUI(), this.engine.getMonitor());
- workflowInterpreterConfiguration.setActOnProvenance(config.isActOnProvenance());
- workflowInterpreterConfiguration.setSubWorkflow(true);
- if (config.isTestMode()){
- workflowInterpreterConfiguration.setNotifier(new StandaloneNotificationSender(workflowInterpreterConfiguration.getTopic(),workflowInterpreterConfiguration.getWorkflow()));
- }
- result = new WorkflowInterpreter(workflowInterpreterConfiguration,
- new GUIWorkflowInterpreterInteractorImpl(engine,
- config.getWorkflow()));
- this.engine.registerWorkflowInterpreter((WorkflowInterpreter)result);
- break;
-// case INPUT_GSS_CREDENTIAL:
-// MyProxyChecker myProxyChecker = new MyProxyChecker(this.engine);
-// myProxyChecker.loadIfNecessary();
-// MyProxyClient myProxyClient = this.engine.getMyProxyClient();
-// result = myProxyClient.getProxy();
+///*
+// *
+// * Licensed to the Apache Software Foundation (ASF) under one
+// * or more contributor license agreements. See the NOTICE file
+// * distributed with this work for additional information
+// * regarding copyright ownership. The ASF licenses this file
+// * to you under the Apache License, Version 2.0 (the
+// * "License"); you may not use this file except in compliance
+// * with the License. You may obtain a copy of the License at
+// *
+// * http://www.apache.org/licenses/LICENSE-2.0
+// *
+// * Unless required by applicable law or agreed to in writing,
+// * software distributed under the License is distributed on an
+// * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// * KIND, either express or implied. See the License for the
+// * specific language governing permissions and limitations
+// * under the License.
+// *
+// */
+//
+//package org.apache.airavata.xbaya.interpretor;
+//
+//import java.util.ArrayList;
+//import java.util.HashMap;
+//import java.util.Map;
+//
+//import org.apache.airavata.workflow.model.graph.Node;
+//import org.apache.airavata.workflow.model.graph.ws.WSGraph;
+//import org.apache.airavata.workflow.model.wf.Workflow;
+//import org.apache.airavata.workflow.model.wf.WorkflowExecutionState;
+//import org.apache.airavata.ws.monitor.MonitorException;
+//import org.apache.airavata.xbaya.XBayaEngine;
+//import org.apache.airavata.xbaya.graph.controller.NodeController;
+//import org.apache.airavata.xbaya.ui.XBayaGUI;
+//import org.apache.airavata.xbaya.ui.dialogs.WaitDialog;
+//import org.apache.airavata.xbaya.ui.graph.subworkflow.SubWorkflowNodeGUI;
+//import org.apache.airavata.xbaya.ui.graph.system.DifferedInputHandler;
+//import org.apache.airavata.xbaya.ui.utils.Cancelable;
+//import org.apache.airavata.xbaya.util.InterpreterUtil;
+//
+//public class GUIWorkflowInterpreterInteractorImpl implements
+// WorkflowInterpreterInteractor {
+// private XBayaGUI xbayaGUI;
+// private Workflow workflow;
+// private XBayaEngine engine;
+//
+// private Map<String, WaitDialog> taskDialogs = new HashMap<String, WaitDialog>();
+//
+// public GUIWorkflowInterpreterInteractorImpl(XBayaEngine engine,
+// Workflow workflow) {
+// this.engine = engine;
+// this.xbayaGUI = engine.getGUI();
+// this.setWorkflow(workflow);
+// }
+//
+// @Override
+// public boolean notify(WorkflowExecutionMessage messageType, WorkflowInterpreterConfiguration config, Object data) {
+// switch (messageType) {
+// case NODE_STATE_CHANGED:
+// xbayaGUI.getGraphCanvas().repaint();
// break;
-// case INPUT_LEAD_CONTEXT_HEADER:
-// Node node = (Node) data;
-// result = XBayaUtil.buildLeadContextHeader(this.getWorkflow(),
-// config.getConfiguration(),
-// new MonitorConfiguration(config.getMessageBrokerURL(),
-// config.getTopic(), true,
-// config
-// .getMessageBoxURL()), node.getID(),
-// null);
+// case EXECUTION_STATE_CHANGED:
+// WorkflowExecutionState state = (WorkflowExecutionState) data;
+// // if (state==WorkflowExecutionState.PAUSED ||
+// // state==WorkflowExecutionState.STOPPED) {
+// // if (getWorkflow().getExecutionState() ==
+// // WorkflowExecutionState.RUNNING
+// // || getWorkflow().getExecutionState() ==
+// // WorkflowExecutionState.STEP) {
+// // } else {
+// // throw new WorkflowRuntimeException(
+// // "Cannot pause when not running");
+// // }
+// // }
+// getWorkflow().setExecutionState(state);
+// if (state==WorkflowExecutionState.PAUSED){
+// if (config.getWorkflow().getExecutionState() == WorkflowExecutionState.RUNNING
+// || config.getWorkflow().getExecutionState() == WorkflowExecutionState.STEP) {
+// config.getGUI().getToolbar().getPlayAction()
+// .actionPerformed(null);
+// }
+// }
// break;
- default:
- break;
- }
- return result;
- }
-
- public Workflow getWorkflow() {
- return workflow;
- }
-
- public void setWorkflow(Workflow workflow) {
- this.workflow = workflow;
- }
-
- @Override
- public void pauseExecution(WorkflowInterpreterConfiguration config) {
- notify(WorkflowExecutionMessage.EXECUTION_STATE_CHANGED,config, WorkflowExecutionState.PAUSED);
- }
-
- @Override
- public void resumeExecution(WorkflowInterpreterConfiguration config) {
- notify(WorkflowExecutionMessage.EXECUTION_STATE_CHANGED,config, WorkflowExecutionState.RUNNING);
- }
-
- @Override
- public void terminateExecution(WorkflowInterpreterConfiguration config) {
- notify(WorkflowExecutionMessage.EXECUTION_STATE_CHANGED,config, WorkflowExecutionState.STOPPED);
- }
-
- @Override
- public boolean isExecutionPaused(WorkflowInterpreterConfiguration config) {
- return config.getWorkflow().getExecutionState()==WorkflowExecutionState.PAUSED;
- }
-
- @Override
- public boolean isExecutionTerminated(WorkflowInterpreterConfiguration config) {
- return config.getWorkflow().getExecutionState()==WorkflowExecutionState.STOPPED;
- }
-
-}
+// case EXECUTION_TASK_START:
+// TaskNotification task = (TaskNotification) data;
+// final WaitDialog waitDialog = new WaitDialog(new Cancelable() {
+// @Override
+// public void cancel() {
+// // Do nothing
+// }
+// }, task.messageTitle, task.message, this.xbayaGUI);
+// new Thread(new Runnable() {
+// @Override
+// public void run() {
+// waitDialog.show();
+// }
+// }).start();
+// taskDialogs.put(task.messageId, waitDialog);
+// break;
+// case EXECUTION_TASK_END:
+// task = (TaskNotification) data;
+// if (taskDialogs.containsKey(task.messageId)) {
+// taskDialogs.get(task.messageId).hide();
+// taskDialogs.remove(task.messageId);
+// }
+// break;
+// case EXECUTION_ERROR:
+// xbayaGUI.getErrorWindow().error((Exception) data);
+// break;
+// case OPEN_SUBWORKFLOW:
+// ((SubWorkflowNodeGUI) NodeController.getGUI((Node) data))
+// .openWorkflowTab(config.getGUI());
+// break;
+// case EXECUTION_CLEANUP:
+// this.engine.resetWorkflowInterpreter();
+// try {
+// config.getMonitor().stop();
+// } catch (MonitorException e) {
+// e.printStackTrace();
+// } finally {
+// this.engine.getMonitor().resetEventData();
+// }
+// break;
+// case HANDLE_DEPENDENT_NODES_DIFFERED_INPUTS:
+// ArrayList<Node> waitingNodes = InterpreterUtil.getWaitingNodesDynamically((WSGraph)data);
+// for (Node readyNode : waitingNodes) {
+// DifferedInputHandler.handleDifferredInputsofDependentNodes(
+// readyNode, config.getGUI());
+// }
+// break;
+// default:
+// return false;
+// }
+// return true;
+// }
+//
+// @Override
+// public Object retrieveData(WorkflowExecutionMessage messageType, WorkflowInterpreterConfiguration config, Object data)
+// throws Exception {
+// Object result = null;
+// switch (messageType) {
+// case INPUT_WORKFLOWINTERPRETER_FOR_WORKFLOW:
+// Workflow subWorkflow= (Workflow) data;
+// WorkflowInterpreterConfiguration workflowInterpreterConfiguration = new WorkflowInterpreterConfiguration(subWorkflow,config.getTopic(),config.getMessageBoxURL(), config.getMessageBrokerURL(), config.getRegistry(), config.getConfiguration(), config.getGUI(), this.engine.getMonitor());
+// workflowInterpreterConfiguration.setActOnProvenance(config.isActOnProvenance());
+// workflowInterpreterConfiguration.setSubWorkflow(true);
+// if (config.isTestMode()){
+// workflowInterpreterConfiguration.setNotifier(new StandaloneNotificationSender(workflowInterpreterConfiguration.getTopic(),workflowInterpreterConfiguration.getWorkflow()));
+// }
+// result = new WorkflowInterpreter(workflowInterpreterConfiguration,
+// new GUIWorkflowInterpreterInteractorImpl(engine,
+// config.getWorkflow()));
+// this.engine.registerWorkflowInterpreter((WorkflowInterpreter)result);
+// break;
+//// case INPUT_GSS_CREDENTIAL:
+//// MyProxyChecker myProxyChecker = new MyProxyChecker(this.engine);
+//// myProxyChecker.loadIfNecessary();
+//// MyProxyClient myProxyClient = this.engine.getMyProxyClient();
+//// result = myProxyClient.getProxy();
+//// break;
+//// case INPUT_LEAD_CONTEXT_HEADER:
+//// Node node = (Node) data;
+//// result = XBayaUtil.buildLeadContextHeader(this.getWorkflow(),
+//// config.getConfiguration(),
+//// new MonitorConfiguration(config.getMessageBrokerURL(),
+//// config.getTopic(), true,
+//// config
+//// .getMessageBoxURL()), node.getID(),
+//// null);
+//// break;
+// default:
+// break;
+// }
+// return result;
+// }
+//
+// public Workflow getWorkflow() {
+// return workflow;
+// }
+//
+// public void setWorkflow(Workflow workflow) {
+// this.workflow = workflow;
+// }
+//
+// @Override
+// public void pauseExecution(WorkflowInterpreterConfiguration config) {
+// notify(WorkflowExecutionMessage.EXECUTION_STATE_CHANGED,config, WorkflowExecutionState.PAUSED);
+// }
+//
+// @Override
+// public void resumeExecution(WorkflowInterpreterConfiguration config) {
+// notify(WorkflowExecutionMessage.EXECUTION_STATE_CHANGED,config, WorkflowExecutionState.RUNNING);
+// }
+//
+// @Override
+// public void terminateExecution(WorkflowInterpreterConfiguration config) {
+// notify(WorkflowExecutionMessage.EXECUTION_STATE_CHANGED,config, WorkflowExecutionState.STOPPED);
+// }
+//
+// @Override
+// public boolean isExecutionPaused(WorkflowInterpreterConfiguration config) {
+// return config.getWorkflow().getExecutionState()==WorkflowExecutionState.PAUSED;
+// }
+//
+// @Override
+// public boolean isExecutionTerminated(WorkflowInterpreterConfiguration config) {
+// return config.getWorkflow().getExecutionState()==WorkflowExecutionState.STOPPED;
+// }
+//
+//}
http://git-wip-us.apache.org/repos/asf/airavata/blob/3e6c815a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/interpretor/SSWorkflowInterpreterInteractorImpl.java
----------------------------------------------------------------------
diff --git a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/interpretor/SSWorkflowInterpreterInteractorImpl.java b/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/interpretor/SSWorkflowInterpreterInteractorImpl.java
index 32bd66b..207c2d0 100644
--- a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/interpretor/SSWorkflowInterpreterInteractorImpl.java
+++ b/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/interpretor/SSWorkflowInterpreterInteractorImpl.java
@@ -1,118 +1,118 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-package org.apache.airavata.xbaya.interpretor;
-
-import org.apache.airavata.workflow.model.wf.Workflow;
-import org.apache.airavata.workflow.model.wf.WorkflowExecutionState;
-
-public class SSWorkflowInterpreterInteractorImpl implements
- WorkflowInterpreterInteractor {
-
- @Override
- public boolean notify(WorkflowExecutionMessage messageType, WorkflowInterpreterConfiguration config, Object data) {
- switch (messageType) {
- case NODE_STATE_CHANGED:
- break;
- case EXECUTION_STATE_CHANGED:
- WorkflowExecutionState state = (WorkflowExecutionState) data;
- config.getWorkflow().setExecutionState(state);
-// if (state == WorkflowExecutionState.PAUSED
-// || state == WorkflowExecutionState.STOPPED) {
-// config.getWorkflow().setExecutionState(WorkflowExecutionState.STOPPED);
-// }else if (state == WorkflowExecutionState.RUNNING) {
-// config.getWorkflow().setExecutionState(WorkflowExecutionState.RUNNING);
-// }
- break;
- case EXECUTION_TASK_START:
- break;
- case EXECUTION_TASK_END:
- break;
- case OPEN_SUBWORKFLOW:
- break;
- case HANDLE_DEPENDENT_NODES_DIFFERED_INPUTS:
- break;
- default:
- return false;
- }
- return true;
- }
-
- @Override
- public Object retrieveData(WorkflowExecutionMessage messageType, WorkflowInterpreterConfiguration config, Object data)
- throws Exception {
- Object result = null;
- switch (messageType) {
- case INPUT_WORKFLOWINTERPRETER_FOR_WORKFLOW:
- Workflow subWorkflow= (Workflow) data;
- WorkflowInterpreterConfiguration workflowInterpreterConfiguration = new WorkflowInterpreterConfiguration(subWorkflow,config.getTopic(),config.getMessageBoxURL(), config.getMessageBrokerURL(), config.getRegistry(), config.getConfiguration(), config.getGUI(), config.getMonitor());
- if (config.isTestMode()){
- workflowInterpreterConfiguration.setNotifier(new StandaloneNotificationSender(workflowInterpreterConfiguration.getTopic(),workflowInterpreterConfiguration.getWorkflow()));
- }
- result = new WorkflowInterpreter(workflowInterpreterConfiguration
- ,
- new SSWorkflowInterpreterInteractorImpl());
- break;
-// case INPUT_GSS_CREDENTIAL:
-// WorkflowInterpreter w = (WorkflowInterpreter) data;
-// result = SecurityUtil.getGSSCredential(w.getUsername(),
-// w.getPassword(), w.getConfig().getConfiguration().getMyProxyServer());
+///*
+// *
+// * Licensed to the Apache Software Foundation (ASF) under one
+// * or more contributor license agreements. See the NOTICE file
+// * distributed with this work for additional information
+// * regarding copyright ownership. The ASF licenses this file
+// * to you under the Apache License, Version 2.0 (the
+// * "License"); you may not use this file except in compliance
+// * with the License. You may obtain a copy of the License at
+// *
+// * http://www.apache.org/licenses/LICENSE-2.0
+// *
+// * Unless required by applicable law or agreed to in writing,
+// * software distributed under the License is distributed on an
+// * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// * KIND, either express or implied. See the License for the
+// * specific language governing permissions and limitations
+// * under the License.
+// *
+// */
+//
+//package org.apache.airavata.xbaya.interpretor;
+//
+//import org.apache.airavata.workflow.model.wf.Workflow;
+//import org.apache.airavata.workflow.model.wf.WorkflowExecutionState;
+//
+//public class SSWorkflowInterpreterInteractorImpl implements
+// WorkflowInterpreterInteractor {
+//
+// @Override
+// public boolean notify(WorkflowExecutionMessage messageType, WorkflowInterpreterConfiguration config, Object data) {
+// switch (messageType) {
+// case NODE_STATE_CHANGED:
// break;
-// case INPUT_LEAD_CONTEXT_HEADER:
-// Node node = (Node) data;
-// result = XBayaUtil.buildLeadContextHeader(config.getWorkflow(), config.getConfiguration(),
-// new MonitorConfiguration(config.getMessageBrokerURL(),
-// config.getTopic(), true,
-// config.getMessageBoxURL()), node.getID(),
-// null);
+// case EXECUTION_STATE_CHANGED:
+// WorkflowExecutionState state = (WorkflowExecutionState) data;
+// config.getWorkflow().setExecutionState(state);
+//// if (state == WorkflowExecutionState.PAUSED
+//// || state == WorkflowExecutionState.STOPPED) {
+//// config.getWorkflow().setExecutionState(WorkflowExecutionState.STOPPED);
+//// }else if (state == WorkflowExecutionState.RUNNING) {
+//// config.getWorkflow().setExecutionState(WorkflowExecutionState.RUNNING);
+//// }
// break;
- default:
- break;
- }
- return result;
- }
-
- @Override
- public void pauseExecution(WorkflowInterpreterConfiguration config) {
- notify(WorkflowExecutionMessage.EXECUTION_STATE_CHANGED,config, WorkflowExecutionState.PAUSED);
- }
-
- @Override
- public void resumeExecution(WorkflowInterpreterConfiguration config) {
- notify(WorkflowExecutionMessage.EXECUTION_STATE_CHANGED,config, WorkflowExecutionState.RUNNING);
- }
-
- @Override
- public void terminateExecution(WorkflowInterpreterConfiguration config) {
- notify(WorkflowExecutionMessage.EXECUTION_STATE_CHANGED,config, WorkflowExecutionState.STOPPED);
- }
-
- @Override
- public boolean isExecutionPaused(WorkflowInterpreterConfiguration config) {
- return config.getWorkflow().getExecutionState()==WorkflowExecutionState.PAUSED;
- }
-
- @Override
- public boolean isExecutionTerminated(WorkflowInterpreterConfiguration config) {
- return config.getWorkflow().getExecutionState()==WorkflowExecutionState.STOPPED;
- }
-
-}
+// case EXECUTION_TASK_START:
+// break;
+// case EXECUTION_TASK_END:
+// break;
+// case OPEN_SUBWORKFLOW:
+// break;
+// case HANDLE_DEPENDENT_NODES_DIFFERED_INPUTS:
+// break;
+// default:
+// return false;
+// }
+// return true;
+// }
+//
+// @Override
+// public Object retrieveData(WorkflowExecutionMessage messageType, WorkflowInterpreterConfiguration config, Object data)
+// throws Exception {
+// Object result = null;
+// switch (messageType) {
+// case INPUT_WORKFLOWINTERPRETER_FOR_WORKFLOW:
+// Workflow subWorkflow= (Workflow) data;
+// WorkflowInterpreterConfiguration workflowInterpreterConfiguration = new WorkflowInterpreterConfiguration(subWorkflow,config.getTopic(),config.getMessageBoxURL(), config.getMessageBrokerURL(), config.getRegistry(), config.getConfiguration(), config.getGUI(), config.getMonitor());
+// if (config.isTestMode()){
+// workflowInterpreterConfiguration.setNotifier(new StandaloneNotificationSender(workflowInterpreterConfiguration.getTopic(),workflowInterpreterConfiguration.getWorkflow()));
+// }
+// result = new WorkflowInterpreter(workflowInterpreterConfiguration
+// ,
+// new SSWorkflowInterpreterInteractorImpl());
+// break;
+//// case INPUT_GSS_CREDENTIAL:
+//// WorkflowInterpreter w = (WorkflowInterpreter) data;
+//// result = SecurityUtil.getGSSCredential(w.getUsername(),
+//// w.getPassword(), w.getConfig().getConfiguration().getMyProxyServer());
+//// break;
+//// case INPUT_LEAD_CONTEXT_HEADER:
+//// Node node = (Node) data;
+//// result = XBayaUtil.buildLeadContextHeader(config.getWorkflow(), config.getConfiguration(),
+//// new MonitorConfiguration(config.getMessageBrokerURL(),
+//// config.getTopic(), true,
+//// config.getMessageBoxURL()), node.getID(),
+//// null);
+//// break;
+// default:
+// break;
+// }
+// return result;
+// }
+//
+// @Override
+// public void pauseExecution(WorkflowInterpreterConfiguration config) {
+// notify(WorkflowExecutionMessage.EXECUTION_STATE_CHANGED,config, WorkflowExecutionState.PAUSED);
+// }
+//
+// @Override
+// public void resumeExecution(WorkflowInterpreterConfiguration config) {
+// notify(WorkflowExecutionMessage.EXECUTION_STATE_CHANGED,config, WorkflowExecutionState.RUNNING);
+// }
+//
+// @Override
+// public void terminateExecution(WorkflowInterpreterConfiguration config) {
+// notify(WorkflowExecutionMessage.EXECUTION_STATE_CHANGED,config, WorkflowExecutionState.STOPPED);
+// }
+//
+// @Override
+// public boolean isExecutionPaused(WorkflowInterpreterConfiguration config) {
+// return config.getWorkflow().getExecutionState()==WorkflowExecutionState.PAUSED;
+// }
+//
+// @Override
+// public boolean isExecutionTerminated(WorkflowInterpreterConfiguration config) {
+// return config.getWorkflow().getExecutionState()==WorkflowExecutionState.STOPPED;
+// }
+//
+//}
http://git-wip-us.apache.org/repos/asf/airavata/blob/3e6c815a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/interpretor/WorkflowExecutionTemplate.java
----------------------------------------------------------------------
diff --git a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/interpretor/WorkflowExecutionTemplate.java b/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/interpretor/WorkflowExecutionTemplate.java
index 4c34032..fe9e2e3 100644
--- a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/interpretor/WorkflowExecutionTemplate.java
+++ b/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/interpretor/WorkflowExecutionTemplate.java
@@ -1,51 +1,51 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-package org.apache.airavata.xbaya.interpretor;
-
-import java.util.List;
-
-import org.apache.airavata.client.api.ExperimentAdvanceOptions;
-import org.apache.airavata.workflow.model.wf.WorkflowInput;
-
-public class WorkflowExecutionTemplate {
- private String workflowTemplateName;
- private List<WorkflowInput> input;
- private ExperimentAdvanceOptions advanceOptions;
- public String getWorkflowTemplateName() {
- return workflowTemplateName;
- }
- public void setWorkflowTemplateName(String workflowTemplateName) {
- this.workflowTemplateName = workflowTemplateName;
- }
- public List<WorkflowInput> getInput() {
- return input;
- }
- public void setInput(List<WorkflowInput> input) {
- this.input = input;
- }
- public ExperimentAdvanceOptions getAdvanceOptions() {
- return advanceOptions;
- }
- public void setAdvanceOptions(ExperimentAdvanceOptions advanceOptions) {
- this.advanceOptions = advanceOptions;
- }
-}
+///*
+// *
+// * Licensed to the Apache Software Foundation (ASF) under one
+// * or more contributor license agreements. See the NOTICE file
+// * distributed with this work for additional information
+// * regarding copyright ownership. The ASF licenses this file
+// * to you under the Apache License, Version 2.0 (the
+// * "License"); you may not use this file except in compliance
+// * with the License. You may obtain a copy of the License at
+// *
+// * http://www.apache.org/licenses/LICENSE-2.0
+// *
+// * Unless required by applicable law or agreed to in writing,
+// * software distributed under the License is distributed on an
+// * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// * KIND, either express or implied. See the License for the
+// * specific language governing permissions and limitations
+// * under the License.
+// *
+// */
+//
+//package org.apache.airavata.xbaya.interpretor;
+//
+//import java.util.List;
+//
+//import org.apache.airavata.client.api.ExperimentAdvanceOptions;
+//import org.apache.airavata.workflow.model.wf.WorkflowInput;
+//
+//public class WorkflowExecutionTemplate {
+// private String workflowTemplateName;
+// private List<WorkflowInput> input;
+// private ExperimentAdvanceOptions advanceOptions;
+// public String getWorkflowTemplateName() {
+// return workflowTemplateName;
+// }
+// public void setWorkflowTemplateName(String workflowTemplateName) {
+// this.workflowTemplateName = workflowTemplateName;
+// }
+// public List<WorkflowInput> getInput() {
+// return input;
+// }
+// public void setInput(List<WorkflowInput> input) {
+// this.input = input;
+// }
+// public ExperimentAdvanceOptions getAdvanceOptions() {
+// return advanceOptions;
+// }
+// public void setAdvanceOptions(ExperimentAdvanceOptions advanceOptions) {
+// this.advanceOptions = advanceOptions;
+// }
+//}