You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by ch...@apache.org on 2015/01/21 19:46:41 UTC
[1/9] airavata git commit: removing previous airavata client API -
AIRAVATA-1371
Repository: airavata
Updated Branches:
refs/heads/master ea6de3712 -> 32fff9444
http://git-wip-us.apache.org/repos/asf/airavata/blob/32fff944/modules/airavata-client/src/main/resources/RegistryService.wsdl
----------------------------------------------------------------------
diff --git a/modules/airavata-client/src/main/resources/RegistryService.wsdl b/modules/airavata-client/src/main/resources/RegistryService.wsdl
deleted file mode 100644
index 86c85a2..0000000
--- a/modules/airavata-client/src/main/resources/RegistryService.wsdl
+++ /dev/null
@@ -1,92 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--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. -->
-
-<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:ns1="http://org.apache.axis2/xsd"
- xmlns:ns="http://services.registry.airavata.apache.org" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl"
- xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
- xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
- targetNamespace="http://services.registry.airavata.apache.org">
- <wsdl:documentation>
- Provide Simple Service for Testing Purpose including addition, subtraction, multiplication,
- array-generator
- </wsdl:documentation>
- <wsdl:types>
- <xs:schema attributeFormDefault="qualified" elementFormDefault="qualified"
- targetNamespace="http://services.registry.airavata.apache.org">
- <xs:element name="isRegistryServiceStartedResponse">
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="0" name="return" type="xs:boolean" />
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- </xs:schema>
- </wsdl:types>
- <wsdl:message name="isRegistryServiceStartedRequest" />
- <wsdl:message name="isRegistryServiceStartedResponse">
- <wsdl:part name="parameters" element="ns:isRegistryServiceStartedResponse" />
- </wsdl:message>
- <wsdl:portType name="RegistryServicePortType">
- <wsdl:operation name="isRegistryServiceStarted">
- <wsdl:input message="ns:isRegistryServiceStartedRequest" wsaw:Action="urn:isRegistryServiceStarted" />
- <wsdl:output message="ns:isRegistryServiceStartedResponse" wsaw:Action="urn:isRegistryServiceStartedResponse" />
- </wsdl:operation>
- </wsdl:portType>
- <wsdl:binding name="RegistryServiceSoap11Binding" type="ns:RegistryServicePortType">
- <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" />
- <wsdl:operation name="isRegistryServiceStarted">
- <soap:operation soapAction="urn:isRegistryServiceStarted" style="document" />
- <wsdl:input>
- <soap:body use="literal" />
- </wsdl:input>
- <wsdl:output>
- <soap:body use="literal" />
- </wsdl:output>
- </wsdl:operation>
- </wsdl:binding>
- <wsdl:binding name="RegistryServiceSoap12Binding" type="ns:RegistryServicePortType">
- <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" />
- <wsdl:operation name="isRegistryServiceStarted">
- <soap12:operation soapAction="urn:isRegistryServiceStarted" style="document" />
- <wsdl:input>
- <soap12:body use="literal" />
- </wsdl:input>
- <wsdl:output>
- <soap12:body use="literal" />
- </wsdl:output>
- </wsdl:operation>
- </wsdl:binding>
- <wsdl:binding name="RegistryServiceHttpBinding" type="ns:RegistryServicePortType">
- <http:binding verb="POST" />
- <wsdl:operation name="isRegistryServiceStarted">
- <http:operation location="RegistryService/isRegistryServiceStarted" />
- <wsdl:input>
- <mime:content type="text/xml" part="isRegistryServiceStarted" />
- </wsdl:input>
- <wsdl:output>
- <mime:content type="text/xml" part="isRegistryServiceStarted" />
- </wsdl:output>
- </wsdl:operation>
- </wsdl:binding>
- <wsdl:service name="RegistryService">
- <wsdl:port name="RegistryServiceHttpSoap11Endpoint" binding="ns:RegistryServiceSoap11Binding">
- <soap:address location="http://localhost:8080/axis2/services/RegistryService.RegistryServiceHttpSoap11Endpoint/" />
- </wsdl:port>
- <wsdl:port name="RegistryServiceHttpSoap12Endpoint" binding="ns:RegistryServiceSoap12Binding">
- <soap12:address location="http://localhost:8080/axis2/services/RegistryService.RegistryServiceHttpSoap12Endpoint/" />
- </wsdl:port>
- <wsdl:port name="RegistryServiceHttpEndpoint" binding="ns:RegistryServiceHttpBinding">
- <http:address location="http://localhost:8080/axis2/services/RegistryService.RegistryServiceHttpEndpoint/" />
- </wsdl:port>
- </wsdl:service>
-</wsdl:definitions>
http://git-wip-us.apache.org/repos/asf/airavata/blob/32fff944/modules/airavata-client/src/test/java/org/apache/airavata/client/airavata/AiravataClientTest.java
----------------------------------------------------------------------
diff --git a/modules/airavata-client/src/test/java/org/apache/airavata/client/airavata/AiravataClientTest.java b/modules/airavata-client/src/test/java/org/apache/airavata/client/airavata/AiravataClientTest.java
deleted file mode 100644
index 617cb8f..0000000
--- a/modules/airavata-client/src/test/java/org/apache/airavata/client/airavata/AiravataClientTest.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/*
- *
- * 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.client.airavata;
-
-import org.junit.Test;
-
-public class AiravataClientTest {
-
- @Test
- public void testInvokeWorkflowString() {
-// try {
-// AiravataClient airavataClient = new AiravataClient("airavata-client.properties");
-// List<String> workflowTemplateIds = airavataClient.getWorkflowTemplateIds();
-// for(String eachId:workflowTemplateIds){
-// List<WorkflowInput> workflowInputs = airavataClient.getWorkflowInputs(eachId);
-// for(WorkflowInput input:workflowInputs){
-// input.setValue("testing");
-// }
-// System.out.println(airavataClient.runWorkflow(eachId,workflowInputs));
-// }
-// } catch (RegistryException e1) {
-// e1.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.
-// } catch (IOException e1) {
-// e1.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.
-// } catch (Exception e) {
-// e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.
-// }
- }
-
- @Test
- public void testExperimentDeletion() {
-// URI uri1 = null,uri2 = null;
-// try {
-// uri1 = new URI("http://gw56.quarry.iu.teragrid.org:8090/jackrabbit-webapp-2.4.0/rmi");
-// uri2 = new URI("http://gf7.ucs.indiana.edu:8030/jackrabbit/rmi");
-// } catch (URISyntaxException e) {
-// e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.
-// }
-// HashMap<String, String> map = new HashMap<String, String>();
-// map.put("org.apache.jackrabbit.repository.uri", "http://gf7.ucs.indiana.edu:8030/jackrabbit/rmi");
-// try {
-// JCRRegistry jcrRegistry1 = new JCRRegistry(
-// uri1,
-// "org.apache.jackrabbit.rmi.repository.RmiRepositoryFactory",
-// "admin",
-// "admin", map);
-// Session session = jcrRegistry1.getSession();
-//// session.importXML("/SERVICE_HOST",export, ImportUUIDBehavior.IMPORT_UUID_COLLISION_REMOVE_EXISTING);
-// javax.jcr.Node serviceHost = jcrRegistry1.getOrAddNode(jcrRegistry1.getRootNode(session), "experiments");
-// serviceHost.remove();
-// session.save();
-//// javax.jcr.Node appHost = jcrRegistry1.getOrAddNode(jcrRegistry1.getRootNode(session), "APP_HOST");
-//// javax.jcr.Node workflows = jcrRegistry1.getOrAddNode(jcrRegistry1.getRootNode(session), "WORKFLOWS");
-////
-//// HashMap<String, String> map2 = new HashMap<String, String>();
-//// map2.put("org.apache.jackrabbit.repository.uri", "http://gf7.ucs.indiana.edu:8030/jackrabbit/rmi");
-//// JCRRegistry jcrRegistry2 = new JCRRegistry(
-//// uri2,
-//// "org.apache.jackrabbit.rmi.repository.RmiRepositoryFactory",
-//// "admin",
-//// "admin", map2);
-//// Session session2 = jcrRegistry2.getSession();
-////
-//// RepositoryCopier.copy(session.getRepository(),jcrRegistry2.getRepository());
-//// Node service_host = jcrRegistry2.getOrAddNode(jcrRegistry2.getRootNode(session2), "SERVICE_HOST");
-//// service_host = serviceHost;
-//// session2.save();
-////
-//
-// } catch (RepositoryException 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.
-// }
- }
-
- //@Test
-// public void testRegistryServiceInvocation() throws Exception {
-// org.apache.airavata.registry.stub.RegistryServiceStub stub =
-// new org.apache.airavata.registry.stub.RegistryServiceStub("http://localhost:8080/axis2/services/RegistryService?wsdl");
-// boolean registryServiceStarted = stub.isRegistryServiceStarted().getIsRegistryServiceStartedResponse().
-// getReturn();
-//
-// System.out.println(registryServiceStarted);
-// }
-
-
-
-}
http://git-wip-us.apache.org/repos/asf/airavata/blob/32fff944/modules/gfac/gfac-bes/pom.xml
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-bes/pom.xml b/modules/gfac/gfac-bes/pom.xml
index f14c9f5..8fdeb7c 100644
--- a/modules/gfac/gfac-bes/pom.xml
+++ b/modules/gfac/gfac-bes/pom.xml
@@ -16,7 +16,7 @@
<parent>
<groupId>org.apache.airavata</groupId>
<artifactId>gfac</artifactId>
- <version>0.14-SNAPSHOT</version>
+ <version>0.15-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
http://git-wip-us.apache.org/repos/asf/airavata/blob/32fff944/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 7351421..ebc35a1 100644
--- a/pom.xml
+++ b/pom.xml
@@ -509,7 +509,6 @@
<modules>
<module>modules/configuration</module>
<module>airavata-api</module>
- <module>modules/airavata-client</module>
<module>modules/commons</module>
<module>modules/gfac</module>
<module>modules/workflow-model</module>
@@ -601,7 +600,6 @@
<module>modules/ws-messenger</module>
<module>modules/workflow-model</module>
<module>modules/registry</module>
- <module>modules/airavata-client</module>
<module>modules/security</module>
<module>modules/credential-store-service</module>
<module>modules/orchestrator</module>
[9/9] airavata git commit: removing previous airavata client API -
AIRAVATA-1371
Posted by ch...@apache.org.
removing previous airavata client API - AIRAVATA-1371
Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/32fff944
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/32fff944
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/32fff944
Branch: refs/heads/master
Commit: 32fff944499a31a73ced4f74e297a2639e975401
Parents: ea6de37
Author: Chathuri Wimalasena <ka...@gmail.com>
Authored: Wed Jan 21 13:46:25 2015 -0500
Committer: Chathuri Wimalasena <ka...@gmail.com>
Committed: Wed Jan 21 13:46:25 2015 -0500
----------------------------------------------------------------------
modules/airavata-client/pom.xml | 88 -
.../airavata/client/AiravataAPIFactory.java | 60 -
.../airavata/client/AiravataAPIUtils.java | 86 -
.../apache/airavata/client/AiravataClient.java | 353 ---
.../client/AiravataClientConfiguration.java | 106 -
.../client/RegistryServiceCallbackHandler.java | 79 -
.../airavata/client/RegistryServiceStub.java | 975 --------
.../apache/airavata/client/api/AiravataAPI.java | 113 -
.../airavata/client/api/AiravataManager.java | 137 --
.../client/api/AmazonWebServicesSettings.java | 38 -
.../airavata/client/api/ApplicationManager.java | 284 ---
.../org/apache/airavata/client/api/BaseAPI.java | 46 -
.../client/api/CredentialStoreManager.java | 62 -
.../api/CredentialStoreSecuritySettings.java | 69 -
.../airavata/client/api/ExecutionManager.java | 207 --
.../client/api/ExperimentAdvanceOptions.java | 160 --
.../api/GridMyProxyRepositorySettings.java | 39 -
.../apache/airavata/client/api/HPCSettings.java | 111 -
.../client/api/HostSchedulingSettings.java | 71 -
.../airavata/client/api/NodeSettings.java | 90 -
.../airavata/client/api/OutputDataSettings.java | 90 -
.../airavata/client/api/ProvenanceManager.java | 461 ----
.../client/api/SSHAuthenticationSettings.java | 30 -
.../airavata/client/api/SecuritySettings.java | 31 -
.../apache/airavata/client/api/UserManager.java | 31 -
.../airavata/client/api/WorkflowManager.java | 477 ----
.../client/api/WorkflowOutputDataSettings.java | 65 -
.../client/api/WorkflowSchedulingSettings.java | 79 -
.../client/api/builder/DescriptorBuilder.java | 208 --
.../AiravataAPIInvocationException.java | 44 -
.../AiravataAPIUnimplementedException.java | 33 -
.../DescriptorAlreadyExistsException.java | 44 -
.../WorkflowAlreadyExistsException.java | 43 -
.../client/impl/AiravataManagerImpl.java | 310 ---
.../impl/AmazonWebServicesSettingsImpl.java | 93 -
.../client/impl/ApplicationManagerImpl.java | 497 ----
.../impl/ApplicationOutputDataSettingsImpl.java | 98 -
.../client/impl/CredentialStoreManagerImpl.java | 79 -
.../CredentialStoreSecuritySettingsImpl.java | 70 -
.../client/impl/ExecutionManagerImpl.java | 419 ----
.../client/impl/ExecutionManagerThriftImpl.java | 467 ----
.../airavata/client/impl/HPCSettingsImpl.java | 108 -
.../client/impl/HostSchedulingSettingsImpl.java | 71 -
.../airavata/client/impl/NodeSettingsImpl.java | 108 -
.../client/impl/PasswordCallBackImpl.java | 39 -
.../client/impl/ProvenanceManagerImpl.java | 638 ------
.../client/impl/SecuritySettingsImpl.java | 46 -
.../airavata/client/impl/UserManagerImpl.java | 45 -
.../client/impl/WorkflowManagerImpl.java | 535 -----
.../impl/WorkflowOutputDataSettingsImpl.java | 78 -
.../impl/WorkflowSchedulingSettingsImpl.java | 97 -
.../client/stub/interpretor/NameValue.java | 559 -----
.../WorkflowInterpretorCallbackHandler.java | 72 -
.../interpretor/WorkflowInterpretorStub.java | 2152 ------------------
.../airavata/client/tools/DocumentCreator.java | 898 --------
.../client/tools/DocumentCreatorNew.java | 823 -------
.../client/tools/DocumentCreatorUtils.java | 165 --
.../client/tools/NameValuePairType.java | 48 -
.../client/tools/PeriodicExecutorThread.java | 61 -
.../client/tools/UltrascanDocumentCreator.java | 444 ----
.../src/main/resources/RegistryService.wsdl | 92 -
.../client/airavata/AiravataClientTest.java | 107 -
modules/gfac/gfac-bes/pom.xml | 2 +-
pom.xml | 2 -
64 files changed, 1 insertion(+), 14032 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/airavata/blob/32fff944/modules/airavata-client/pom.xml
----------------------------------------------------------------------
diff --git a/modules/airavata-client/pom.xml b/modules/airavata-client/pom.xml
deleted file mode 100644
index 72e7997..0000000
--- a/modules/airavata-client/pom.xml
+++ /dev/null
@@ -1,88 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--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. -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <parent>
- <groupId>org.apache.airavata</groupId>
- <artifactId>airavata</artifactId>
- <version>0.15-SNAPSHOT</version>
- <relativePath>../../pom.xml</relativePath>
- </parent>
-
- <modelVersion>4.0.0</modelVersion>
- <artifactId>airavata-client-api</artifactId>
- <name>Airavata Client</name>
- <description>Client API for accessing Airavata Services</description>
- <url>http://airavata.apache.org/</url>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.airavata</groupId>
- <artifactId>airavata-api-stubs</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.airavata</groupId>
- <artifactId>app-catalog-cpi</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.axis2</groupId>
- <artifactId>axis2-codegen</artifactId>
- <version>${axis2.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.axis2</groupId>
- <artifactId>axis2-adb-codegen</artifactId>
- <version>${axis2.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.airavata</groupId>
- <artifactId>airavata-workflow-model-core</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.airavata</groupId>
- <artifactId>airavata-workflow-execution-context</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>javax.jcr</groupId>
- <artifactId>jcr</artifactId>
- <version>${jcr.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.airavata</groupId>
- <artifactId>airavata-client-configuration</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.airavata</groupId>
- <artifactId>airavata-jpa-registry</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.airavata</groupId>
- <artifactId>airavata-message-monitor</artifactId>
- <version>${project.version}</version>
- </dependency>
- </dependencies>
-
- <build>
- <resources>
- <resource>
- <directory>${pom.basedir}/target/generated/wsdl2code/resources</directory>
- <includes>
- <include>**/**</include>
- </includes>
- </resource>
- </resources>
- </build>
-
-</project>
http://git-wip-us.apache.org/repos/asf/airavata/blob/32fff944/modules/airavata-client/src/main/java/org/apache/airavata/client/AiravataAPIFactory.java
----------------------------------------------------------------------
diff --git a/modules/airavata-client/src/main/java/org/apache/airavata/client/AiravataAPIFactory.java b/modules/airavata-client/src/main/java/org/apache/airavata/client/AiravataAPIFactory.java
deleted file mode 100644
index d2f87c0..0000000
--- a/modules/airavata-client/src/main/java/org/apache/airavata/client/AiravataAPIFactory.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/**
- * 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.client;
-
-import org.apache.airavata.client.api.AiravataAPI;
-import org.apache.airavata.client.api.exception.AiravataAPIInvocationException;
-import org.apache.airavata.common.utils.SecurityUtil;
-
-import java.net.URI;
-
-public class AiravataAPIFactory {
-
- public static AiravataAPI getAPI(String gateway, String username) throws AiravataAPIInvocationException{
- return getAPI(null, gateway, username);
- }
-
- public static AiravataAPI getAPI(URI registryURL, String gateway, String username) throws AiravataAPIInvocationException{
- return getAPI(registryURL, gateway, username, username);
- }
-
- public static AiravataAPI getAPI(URI registryURL, String gateway, String username,
- String trustStoreFilePath, String trustStorePassword)
- throws AiravataAPIInvocationException{
-
- SecurityUtil.setTrustStoreParameters(trustStoreFilePath, trustStorePassword);
- return getAPI(registryURL, gateway, username, username);
- }
-
- public static AiravataAPI getAPI(URI registryURL, String gateway, String username, String alternateUsername) throws AiravataAPIInvocationException{
- try {
- AiravataAPI apiObj = new AiravataClient();
- apiObj.setCurrentUser(alternateUsername);
-// apiObj.setCallBack(callback);
- apiObj.setRegitryURI(registryURL);
- apiObj.setGateway(gateway);
- apiObj.initialize();
- return apiObj;
- } catch (Exception e) {
- throw new AiravataAPIInvocationException(e);
- }
- }
-
-}
http://git-wip-us.apache.org/repos/asf/airavata/blob/32fff944/modules/airavata-client/src/main/java/org/apache/airavata/client/AiravataAPIUtils.java
----------------------------------------------------------------------
diff --git a/modules/airavata-client/src/main/java/org/apache/airavata/client/AiravataAPIUtils.java b/modules/airavata-client/src/main/java/org/apache/airavata/client/AiravataAPIUtils.java
deleted file mode 100644
index 3889903..0000000
--- a/modules/airavata-client/src/main/java/org/apache/airavata/client/AiravataAPIUtils.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- *
- * 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.client;
-
-import java.util.List;
-
-import org.apache.airavata.client.api.ExperimentAdvanceOptions;
-import org.apache.airavata.client.api.NodeSettings;
-import org.apache.airavata.client.api.OutputDataSettings;
-import org.apache.airavata.client.api.exception.AiravataAPIInvocationException;
-import org.apache.airavata.client.tools.NameValuePairType;
-import org.apache.airavata.common.workflow.execution.context.WorkflowContextHeaderBuilder;
-
-public class AiravataAPIUtils {
-
- //------------------Deprecated Functions---------------------//
-
- public static WorkflowContextHeaderBuilder createWorkflowContextHeader()
- throws AiravataAPIInvocationException {
- try {
- return new WorkflowContextHeaderBuilder(null,
- null,null,null,null,null);
- } catch (Exception e) {
- throw new AiravataAPIInvocationException(e);
- }
- }
-
- //------------------End of Deprecated Functions---------------------//
-
- public static WorkflowContextHeaderBuilder createWorkflowContextHeaderBuilder(
- ExperimentAdvanceOptions options, String executionUser, String submissionUser)
- throws AiravataAPIInvocationException {
- WorkflowContextHeaderBuilder builder=createWorkflowContextHeader();
- builder.setUserIdentifier(executionUser);
- builder.setSubmissionUser(submissionUser);
- NodeSettings[] nodeSettingsList = options.getCustomWorkflowSchedulingSettings().getNodeSettingsList();
- for (NodeSettings nodeSettings : nodeSettingsList) {
- List<NameValuePairType> nameValuePairTypes = nodeSettings.getNameValuePair();
- for (NameValuePairType nameValuePairType : nameValuePairTypes) {
- builder.addApplicationSchedulingKeyPair(nodeSettings.getNodeId(),nameValuePairType.getName(), nameValuePairType.getValue(), nameValuePairType.getDescription());
- }
- builder.addApplicationSchedulingContext(nodeSettings.getNodeId(), nodeSettings.getServiceId(), nodeSettings.getHostSettings().getHostId(), nodeSettings.getHostSettings().isWSGRAMPreffered(), nodeSettings.getHostSettings().getGatekeeperEPR(), nodeSettings.getHPCSettings().getJobManager(), nodeSettings.getHPCSettings().getCPUCount(), nodeSettings.getHPCSettings().getNodeCount(), nodeSettings.getHPCSettings().getQueueName(), nodeSettings.getHPCSettings().getMaxWallTime());
-
- }
- OutputDataSettings[] outputDataSettingsList = options.getCustomWorkflowOutputDataSettings().getOutputDataSettingsList();
- for (OutputDataSettings outputDataSettings : outputDataSettingsList) {
- builder.addApplicationOutputDataHandling(outputDataSettings.getNodeId(),outputDataSettings.getOutputDataDirectory(), outputDataSettings.getDataRegistryUrl(), outputDataSettings.isDataPersistent());
- }
-
- if (options.getCustomSecuritySettings().getAmazonWSSettings().getAccessKeyId() != null) {
- builder.setAmazonWebServices(options.getCustomSecuritySettings().getAmazonWSSettings().getAccessKeyId(),
- options.getCustomSecuritySettings().getAmazonWSSettings().getSecretAccessKey());
- }
-
- if (options.getCustomSecuritySettings().getCredentialStoreSecuritySettings() != null) {
- builder.setCredentialManagementService(options.getCustomSecuritySettings().
- getCredentialStoreSecuritySettings().getTokenId(),
- options.getCustomSecuritySettings().
- getCredentialStoreSecuritySettings().getPortalUser(),
- options.getCustomSecuritySettings().
- getCredentialStoreSecuritySettings().getGatewayId());
- }
-
-
- return builder;
- }
-}
http://git-wip-us.apache.org/repos/asf/airavata/blob/32fff944/modules/airavata-client/src/main/java/org/apache/airavata/client/AiravataClient.java
----------------------------------------------------------------------
diff --git a/modules/airavata-client/src/main/java/org/apache/airavata/client/AiravataClient.java b/modules/airavata-client/src/main/java/org/apache/airavata/client/AiravataClient.java
deleted file mode 100644
index c5809cc..0000000
--- a/modules/airavata-client/src/main/java/org/apache/airavata/client/AiravataClient.java
+++ /dev/null
@@ -1,353 +0,0 @@
-/*
- *
- * 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.client;
-
-import org.apache.airavata.client.api.*;
-import org.apache.airavata.client.api.builder.DescriptorBuilder;
-import org.apache.airavata.client.api.exception.AiravataAPIInvocationException;
-import org.apache.airavata.client.impl.*;
-import org.apache.airavata.common.exception.AiravataConfigurationException;
-import org.apache.airavata.common.exception.ApplicationSettingsException;
-import org.apache.airavata.common.utils.ServerSettings;
-import org.apache.airavata.common.utils.Version;
-import org.apache.airavata.workflow.model.wf.WorkflowInput;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import javax.jcr.RepositoryException;
-import java.net.MalformedURLException;
-import java.net.URI;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Observable;
-
-public class AiravataClient extends Observable implements AiravataAPI {
-
- private static final Logger log = LoggerFactory
- .getLogger(AiravataClient.class);
- public static final String REGISTRY = "JCR";
- public static final String GFAC = "gfac";
- public static final String MSGBOX = "msgbox";
- public static final String BROKER = "broker";
- public static final String WITHLISTENER = "with.Listener";
- public static final String WORKFLOWSERVICEURL = "xbaya.service.url";
- private AiravataClientConfiguration clientConfiguration;
- private String currentUser;
- private URI regitryURI;
-
- private Map<String, String> configuration = new HashMap<String, String>();
- private AiravataManagerImpl airavataManagerImpl;
-// private ApplicationManagerImpl applicationManagerImpl;
- private WorkflowManagerImpl workflowManagerImpl;
- private UserManagerImpl userManagerImpl;
-// private ExecutionManagerThriftImpl executionManagerImpl;
- private ExecutionManager executionManager;
-
- private CredentialStoreManagerImpl credentialStoreManagerImpl;
- private String gateway;
- private boolean configCreated = false;
-
- private static volatile boolean registryServiceStarted = false;
-
- private static int WAIT_TIME_PERIOD = 4 * 1000;
- private static int WAIT_ITERATIONS = 15;
-
- private static final Version API_VERSION = new Version("Airavata", 0, 11,
- null, null, null);
-
- // FIXME: Need a constructor to set registry URL
- protected AiravataClient() {
- }
-
- private static HashMap<String, String> createConfig(URI registryUrl, String gateway,
- String username, String password) throws RepositoryException,
- AiravataConfigurationException {
- HashMap<String, String> config = new HashMap<String, String>();
- if (registryUrl != null) {
- config.put(AiravataClient.REGISTRY, registryUrl.toString());
- }
-// AiravataRegistry2 registryObject = getRegistry(registryUrl, gateway,
-// username, new PasswordCallBackImpl(username, password));
-// if (registryObject != null) {
-// URI uri = registryObject.getEventingServiceURI();
-// config.put(
-// AiravataClient.BROKER,
-// uri == null ? "http://localhost:8080/airavata-server/services/EventingService"
-// : uri.toString());
-// uri = registryObject.getMessageBoxURI();
-// config.put(
-// AiravataClient.MSGBOX,
-// uri == null ? "http://localhost:8080/airavata-server/services/MsgBoxService"
-// : uri.toString());
-// List<URI> URLList = registryObject.getWorkflowInterpreterURIs();
-// config.put(
-// AiravataClient.WORKFLOWSERVICEURL,
-// URLList == null || URLList.size() == 0 ? "http://localhost:8080/airavata-server/services/WorkflowInterpretor?wsdl"
-// : URLList.get(0).toString());
-// List<URI> urlList = registryObject.getGFacURIs();
-// config.put(
-// AiravataClient.GFAC,
-// urlList == null || urlList.size() == 0 ? "http://localhost:8080/airavata-server/services/GFacService"
-// : urlList.get(0).toString());
-// config.put(AiravataClient.WITHLISTENER, "true");
-// }
- return config;
- }
-
- @Override
- public void initialize() throws AiravataAPIInvocationException {
-
-// if (AiravataUtils.isServer()) {
-// waitTillRegistryServiceStarts();
-// }
- }
-
- private String getRegistryWebServiceWSDLUrl() throws AiravataAPIInvocationException {
- String registryUrl = null;
- try {
- registryUrl = ServerSettings.getSetting("registry.service.wsdl");
- } catch (ApplicationSettingsException e) {
- String msg = "Configuration registry.service.wsdl is not specified in the configuration file";
- log.warn(msg);
- log.debug(msg, e);
- }
-
- if (registryUrl == null) {
- String hostName = getRegitryURI().getHost();
- int port = getRegitryURI().getPort();
- String protocol = null;
- try {
- protocol = getRegitryURI().toURL().getProtocol();
- } catch (MalformedURLException e) {
- String msg = "Error retrieving protocol from registry URI - "
- + getRegitryURI().toString();
- log.error(msg, e);
- throw new AiravataAPIInvocationException(msg, e);
- }
-
- StringBuilder registryServiceUrlString = new StringBuilder(protocol);
- registryServiceUrlString.append("://").append(hostName).append(":").append(port);
- registryServiceUrlString.append("/axis2/services/RegistryService?wsdl");
-
- registryUrl = registryServiceUrlString.toString();
- }
-
- return registryUrl;
- }
-
- private void waitForRegistryServiceToStart(String url) throws AiravataAPIInvocationException {
-
- log.info("Registry service URL - " + url);
-
- int iterations = 0;
- Exception exception = null;
-
- while (!registryServiceStarted) {
- try {
- RegistryServiceStub stub =
- new RegistryServiceStub(url);
- registryServiceStarted = stub.isRegistryServiceStarted().get_return();
- } catch (Exception e) {
- exception = e;
- }
-
- if (!registryServiceStarted) {
- try {
- if (iterations == WAIT_ITERATIONS) {
- if (exception != null) {
- throw new AiravataAPIInvocationException("Unable to connect to RegistryService. " +
- "RegistryService may not have started", exception);
- } else {
- throw new AiravataAPIInvocationException("Unable to connect to RegistryService. " +
- "RegistryService may not have started");
- }
-
- } else {
- Thread.sleep(WAIT_TIME_PERIOD);
- }
- } catch (InterruptedException e1) {
- log.info("Received an interrupted exception.");
- }
-
- log.info("Attempting to contact registry service, iteration - " + iterations);
-
- ++iterations;
- }
-
- }
-
-
- }
-
-// private void updateClientConfiguration(Map<String, String> configuration)
-// throws MalformedURLException {
-// AiravataClientConfiguration clientConfiguration = getClientConfiguration();
-// if (configuration.get(GFAC) != null) {
-// clientConfiguration.setGfacURL(new URL(configuration.get(GFAC)));
-// }
-// if (configuration.get(MSGBOX) != null) {
-// clientConfiguration.setMessageboxURL(new URL(configuration
-// .get(MSGBOX)));
-// }
-// if (configuration.get(BROKER) != null) {
-// clientConfiguration.setMessagebrokerURL(new URL(configuration
-// .get(BROKER)));
-// }
-// if (configuration.get(WORKFLOWSERVICEURL) != null) {
-// clientConfiguration.setXbayaServiceURL(new URL(configuration
-// .get(WORKFLOWSERVICEURL)));
-// }
-// if (configuration.get(MSGBOX) != null) {
-// clientConfiguration.setMessageboxURL(new URL(configuration
-// .get(MSGBOX)));
-// }
-//
-// if (clientConfiguration.getRegistryURL() != null
-// && clientConfiguration.getGfacURL() == null) {
-// try {
-// clientConfiguration.setGfacURL(getRegistryClient()
-// .getGFacURIs().get(0).toURL());
-// configuration.put(GFAC, clientConfiguration.getGfacURL()
-// .toString());
-// } catch (Exception e) {
-// e.printStackTrace();
-// }
-// }
-// }
-
-// public AiravataRegistry2 getRegistryClient()
-// throws AiravataConfigurationException, RegException {
-// if (registry == null) {
-// registry = getRegistry(getRegitryURI(), getGateway(),
-// getCurrentUser(), getCallBack());
-// }
-// return registry;
-// }
-
-// public static AiravataRegistry2 getRegistry(URI registryURI,
-// String gateway, String username, PasswordCallback callback)
-// throws RegException, AiravataConfigurationException {
-// return AiravataRegistryFactory.getRegistry(registryURI, new Gateway(
-// gateway), new AiravataUser(username), callback);
-// }
-
- public AiravataClientConfiguration getClientConfiguration() {
- if (clientConfiguration == null) {
- clientConfiguration = new AiravataClientConfiguration();
- }
- return clientConfiguration;
- }
-
- public AiravataManager getAiravataManager() {
- if (airavataManagerImpl == null) {
- airavataManagerImpl = new AiravataManagerImpl(this);
- }
- return airavataManagerImpl;
- }
-
-// public ApplicationManager getApplicationManager() {
-// if (applicationManagerImpl == null) {
-// applicationManagerImpl = new ApplicationManagerImpl(this);
-// }
-// return applicationManagerImpl;
-// }
-
- public WorkflowManager getWorkflowManager() {
- if (workflowManagerImpl == null) {
- workflowManagerImpl = new WorkflowManagerImpl(this);
- }
- return workflowManagerImpl;
- }
-
- public UserManager getUserManager() {
- if (userManagerImpl == null) {
- userManagerImpl = new UserManagerImpl(this);
- }
- return userManagerImpl;
- }
-
- public ExecutionManager getExecutionManager() {
- if (executionManager == null){
- executionManager = new ExecutionManagerImpl(this);
- }
- return executionManager;
- }
-
- @Override
- public CredentialStoreManager getCredentialStoreManager() {
- if(credentialStoreManagerImpl == null)
- credentialStoreManagerImpl = new CredentialStoreManagerImpl(this);
- return credentialStoreManagerImpl;
- }
-
- private ExecutionManager getExecutionManagerObj(String className) throws ClassNotFoundException, IllegalAccessException, InstantiationException {
- Class<?> cls = Class.forName(className);
- if (!ExecutionManager.class.isAssignableFrom(cls)) {
- throw new IllegalArgumentException();
- }
- return (ExecutionManager) cls.newInstance();
- }
-
- public String getCurrentUser() {
- return currentUser;
- }
-
- public Version getVersion() {
- return API_VERSION;
- }
-
- @Override
- public DescriptorBuilder getDescriptorBuilder() {
- return new DescriptorBuilder();
- }
-
- public void setCurrentUser(String currentUser) {
- this.currentUser = currentUser;
- }
-
- public void setRegitryURI(URI regitryURI) {
- this.regitryURI = regitryURI;
- }
-
-
- public URI getRegitryURI() {
- return regitryURI;
- }
-
- public String getGateway() {
- return gateway;
- }
-
- public void setGateway(String gateway) {
- this.gateway = gateway;
- }
-
- public static void main(String[] args) throws Exception {
- AiravataAPI api = AiravataAPIFactory.getAPI(new URI("http://localhost:8080/airavata/services/registry"), "default", "admin");
- ExperimentAdvanceOptions options = api.getExecutionManager().createExperimentAdvanceOptions();
- options.getCustomWorkflowSchedulingSettings().addNewNodeSettings("data1", "comma_app", 1, 1);
- String workflow = "Workflow3";
- List<WorkflowInput> inputs = api.getWorkflowManager().getWorkflowInputs(workflow);
- System.out.println(api.getExecutionManager().runExperiment(workflow, inputs,options));
- }
-
-}
http://git-wip-us.apache.org/repos/asf/airavata/blob/32fff944/modules/airavata-client/src/main/java/org/apache/airavata/client/AiravataClientConfiguration.java
----------------------------------------------------------------------
diff --git a/modules/airavata-client/src/main/java/org/apache/airavata/client/AiravataClientConfiguration.java b/modules/airavata-client/src/main/java/org/apache/airavata/client/AiravataClientConfiguration.java
deleted file mode 100644
index c021c13..0000000
--- a/modules/airavata-client/src/main/java/org/apache/airavata/client/AiravataClientConfiguration.java
+++ /dev/null
@@ -1,106 +0,0 @@
-/*
- *
- * 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.client;
-
-import java.net.URL;
-
-public class AiravataClientConfiguration {
- private URL gfacURL;
- private String myproxyHost="myproxy.teragrid.org";
- private URL messageboxURL;
- private URL messagebrokerURL;
- private String myproxyUsername="ogce";
- private String myproxyPassword="testpassword";
- private URL xbayaServiceURL;
- private URL jcrURL;
- private String jcrUsername="admin";
- private String jcrPassword="admin";
- private String echoMessage="Hello World";
-
- public URL getGfacURL() {
- return gfacURL;
- }
- public void setGfacURL(URL gfacURL) {
- this.gfacURL = gfacURL;
- }
- public String getMyproxyHost() {
- return myproxyHost;
- }
- public void setMyproxyHost(String myproxyHost) {
- this.myproxyHost = myproxyHost;
- }
- public URL getMessageboxURL() {
- return messageboxURL;
- }
- public void setMessageboxURL(URL messageboxURL) {
- this.messageboxURL = messageboxURL;
- }
- public URL getMessagebrokerURL() {
- return messagebrokerURL;
- }
- public void setMessagebrokerURL(URL messagebrokerURL) {
- this.messagebrokerURL = messagebrokerURL;
- }
- public String getMyproxyUsername() {
- return myproxyUsername;
- }
- public void setMyproxyUsername(String myproxyUsername) {
- this.myproxyUsername = myproxyUsername;
- }
- public String getMyproxyPassword() {
- return myproxyPassword;
- }
- public void setMyproxyPassword(String myproxyPassword) {
- this.myproxyPassword = myproxyPassword;
- }
- public URL getXbayaServiceURL() {
- return xbayaServiceURL;
- }
- public void setXbayaServiceURL(URL xbayaServiceURL) {
- this.xbayaServiceURL = xbayaServiceURL;
- }
- public URL getRegistryURL() {
- return jcrURL;
- }
- public void setRegistryURL(URL jcrURL) {
- this.jcrURL = jcrURL;
- }
- public String getJcrUsername() {
- return jcrUsername;
- }
- public void setJcrUsername(String jcrUsername) {
- this.jcrUsername = jcrUsername;
- }
- public String getJcrPassword() {
- return jcrPassword;
- }
- public void setJcrPassword(String jcrPassword) {
- this.jcrPassword = jcrPassword;
- }
- public String getEchoMessage() {
- return echoMessage;
- }
- public void setEchoMessage(String echoMessage) {
- this.echoMessage = echoMessage;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/airavata/blob/32fff944/modules/airavata-client/src/main/java/org/apache/airavata/client/RegistryServiceCallbackHandler.java
----------------------------------------------------------------------
diff --git a/modules/airavata-client/src/main/java/org/apache/airavata/client/RegistryServiceCallbackHandler.java b/modules/airavata-client/src/main/java/org/apache/airavata/client/RegistryServiceCallbackHandler.java
deleted file mode 100644
index 7264ce8..0000000
--- a/modules/airavata-client/src/main/java/org/apache/airavata/client/RegistryServiceCallbackHandler.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- *
- * 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.client;
-
- /**
- * RegistryServiceCallbackHandler Callback class, Users can extend this class and implement
- * their own receiveResult and receiveError methods.
- */
- public abstract class RegistryServiceCallbackHandler{
-
-
-
- protected Object clientData;
-
- /**
- * User can pass in any object that needs to be accessed once the NonBlocking
- * Web service call is finished and appropriate method of this CallBack is called.
- * @param clientData Object mechanism by which the user can pass in user data
- * that will be avilable at the time this callback is called.
- */
- public RegistryServiceCallbackHandler(Object clientData){
- this.clientData = clientData;
- }
-
- /**
- * Please use this constructor if you don't want to set any clientData
- */
- public RegistryServiceCallbackHandler(){
- this.clientData = null;
- }
-
- /**
- * Get the client data
- */
-
- public Object getClientData() {
- return clientData;
- }
-
-
- /**
- * auto generated Axis2 call back method for isRegistryServiceStarted method
- * override this method for handling normal response from isRegistryServiceStarted operation
- */
- public void receiveResultisRegistryServiceStarted(
- org.apache.airavata.client.RegistryServiceStub.IsRegistryServiceStartedResponse result
- ) {
- }
-
- /**
- * auto generated Axis2 Error handler
- * override this method for handling error response from isRegistryServiceStarted operation
- */
- public void receiveErrorisRegistryServiceStarted(java.lang.Exception e) {
- }
-
-
-
- }
-
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata/blob/32fff944/modules/airavata-client/src/main/java/org/apache/airavata/client/RegistryServiceStub.java
----------------------------------------------------------------------
diff --git a/modules/airavata-client/src/main/java/org/apache/airavata/client/RegistryServiceStub.java b/modules/airavata-client/src/main/java/org/apache/airavata/client/RegistryServiceStub.java
deleted file mode 100644
index 41f569e..0000000
--- a/modules/airavata-client/src/main/java/org/apache/airavata/client/RegistryServiceStub.java
+++ /dev/null
@@ -1,975 +0,0 @@
-/*
- *
- * 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.
- *
-*/
-/**
- * RegistryServiceStub.java
- *
- * This file was auto-generated from WSDL
- * by the Apache Axis2 version: 1.5.1 Built on : Oct 19, 2009 (10:59:00 EDT)
- */
- package org.apache.airavata.client;
-
-
-
- /*
- * RegistryServiceStub java implementation
- */
-
-
- public class RegistryServiceStub extends org.apache.axis2.client.Stub
- {
- protected org.apache.axis2.description.AxisOperation[] _operations;
-
- //hashmaps to keep the fault mapping
- private java.util.HashMap faultExceptionNameMap = new java.util.HashMap();
- private java.util.HashMap faultExceptionClassNameMap = new java.util.HashMap();
- private java.util.HashMap faultMessageMap = new java.util.HashMap();
-
- private static int counter = 0;
-
- private static synchronized java.lang.String getUniqueSuffix(){
- // reset the counter if it is greater than 99999
- if (counter > 99999){
- counter = 0;
- }
- counter = counter + 1;
- return java.lang.Long.toString(System.currentTimeMillis()) + "_" + counter;
- }
-
-
- private void populateAxisService() throws org.apache.axis2.AxisFault {
-
- //creating the Service with a unique name
- _service = new org.apache.axis2.description.AxisService("RegistryService" + getUniqueSuffix());
- addAnonymousOperations();
-
- //creating the operations
- org.apache.axis2.description.AxisOperation __operation;
-
- _operations = new org.apache.axis2.description.AxisOperation[1];
-
- __operation = new org.apache.axis2.description.OutInAxisOperation();
-
-
- __operation.setName(new javax.xml.namespace.QName("http://services.registry.airavata.apache.org", "isRegistryServiceStarted"));
- _service.addOperation(__operation);
-
-
-
-
- _operations[0]=__operation;
-
-
- }
-
- //populates the faults
- private void populateFaults(){
-
-
-
- }
-
- /**
- *Constructor that takes in a configContext
- */
-
- public RegistryServiceStub(org.apache.axis2.context.ConfigurationContext configurationContext,
- java.lang.String targetEndpoint)
- throws org.apache.axis2.AxisFault {
- this(configurationContext,targetEndpoint,false);
- }
-
-
- /**
- * Constructor that takes in a configContext and useseperate listner
- */
- public RegistryServiceStub(org.apache.axis2.context.ConfigurationContext configurationContext,
- java.lang.String targetEndpoint, boolean useSeparateListener)
- throws org.apache.axis2.AxisFault {
- //To populate AxisService
- populateAxisService();
- populateFaults();
-
- _serviceClient = new org.apache.axis2.client.ServiceClient(configurationContext,_service);
-
-
- _serviceClient.getOptions().setTo(new org.apache.axis2.addressing.EndpointReference(
- targetEndpoint));
- _serviceClient.getOptions().setUseSeparateListener(useSeparateListener);
-
- //Set the soap version
- _serviceClient.getOptions().setSoapVersionURI(org.apache.axiom.soap.SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI);
-
-
- }
-
- /**
- * Default Constructor
- */
- public RegistryServiceStub(org.apache.axis2.context.ConfigurationContext configurationContext) throws org.apache.axis2.AxisFault {
-
- this(configurationContext,"http://localhost:8080/axis2/services/RegistryService.RegistryServiceHttpSoap12Endpoint/" );
-
- }
-
- /**
- * Default Constructor
- */
- public RegistryServiceStub() throws org.apache.axis2.AxisFault {
-
- this("http://localhost:8080/axis2/services/RegistryService.RegistryServiceHttpSoap12Endpoint/" );
-
- }
-
- /**
- * Constructor taking the target endpoint
- */
- public RegistryServiceStub(java.lang.String targetEndpoint) throws org.apache.axis2.AxisFault {
- this(null,targetEndpoint);
- }
-
-
-
-
- /**
- * Auto generated method signature
- *
- * @see org.apache.airavata.registry.services.RegistryService#isRegistryServiceStarted
- */
-
-
-
- public RegistryServiceStub.IsRegistryServiceStartedResponse isRegistryServiceStarted(
-
- )
-
-
- throws java.rmi.RemoteException
-
- {
- org.apache.axis2.context.MessageContext _messageContext = null;
- try{
- org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[0].getName());
- _operationClient.getOptions().setAction("urn:isRegistryServiceStarted");
- _operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(true);
-
-
-
- addPropertyToOperationClient(_operationClient,org.apache.axis2.description.WSDL2Constants.ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR,"&");
-
-
- // create a message context
- _messageContext = new org.apache.axis2.context.MessageContext();
-
-
-
- // create SOAP envelope with that payload
- org.apache.axiom.soap.SOAPEnvelope env = null;
-
- //Style is taken to be "document". No input parameters
- // according to the WS-Basic profile in this case we have to send an empty soap message
- org.apache.axiom.soap.SOAPFactory factory = getFactory(_operationClient.getOptions().getSoapVersionURI());
- env = factory.getDefaultEnvelope();
-
- //adding SOAP soap_headers
- _serviceClient.addHeadersToEnvelope(env);
- // set the message context with that soap envelope
- _messageContext.setEnvelope(env);
-
- // add the message contxt to the operation client
- _operationClient.addMessageContext(_messageContext);
-
- //execute the operation client
- _operationClient.execute(true);
-
-
- org.apache.axis2.context.MessageContext _returnMessageContext = _operationClient.getMessageContext(
- org.apache.axis2.wsdl.WSDLConstants.MESSAGE_LABEL_IN_VALUE);
- org.apache.axiom.soap.SOAPEnvelope _returnEnv = _returnMessageContext.getEnvelope();
-
-
- java.lang.Object object = fromOM(
- _returnEnv.getBody().getFirstElement() ,
- RegistryServiceStub.IsRegistryServiceStartedResponse.class,
- getEnvelopeNamespaces(_returnEnv));
-
-
- return (RegistryServiceStub.IsRegistryServiceStartedResponse)object;
-
- }catch(org.apache.axis2.AxisFault f){
-
- org.apache.axiom.om.OMElement faultElt = f.getDetail();
- if (faultElt!=null){
- if (faultExceptionNameMap.containsKey(faultElt.getQName())){
- //make the fault by reflection
- try{
- java.lang.String exceptionClassName = (java.lang.String)faultExceptionClassNameMap.get(faultElt.getQName());
- java.lang.Class exceptionClass = java.lang.Class.forName(exceptionClassName);
- java.lang.Exception ex=
- (java.lang.Exception) exceptionClass.newInstance();
- //message class
- java.lang.String messageClassName = (java.lang.String)faultMessageMap.get(faultElt.getQName());
- java.lang.Class messageClass = java.lang.Class.forName(messageClassName);
- java.lang.Object messageObject = fromOM(faultElt,messageClass,null);
- java.lang.reflect.Method m = exceptionClass.getMethod("setFaultMessage",
- new java.lang.Class[]{messageClass});
- m.invoke(ex,new java.lang.Object[]{messageObject});
-
-
- throw new java.rmi.RemoteException(ex.getMessage(), ex);
- }catch(java.lang.ClassCastException e){
- // we cannot intantiate the class - throw the original Axis fault
- throw f;
- } catch (java.lang.ClassNotFoundException e) {
- // we cannot intantiate the class - throw the original Axis fault
- throw f;
- }catch (java.lang.NoSuchMethodException e) {
- // we cannot intantiate the class - throw the original Axis fault
- throw f;
- } catch (java.lang.reflect.InvocationTargetException e) {
- // we cannot intantiate the class - throw the original Axis fault
- throw f;
- } catch (java.lang.IllegalAccessException e) {
- // we cannot intantiate the class - throw the original Axis fault
- throw f;
- } catch (java.lang.InstantiationException e) {
- // we cannot intantiate the class - throw the original Axis fault
- throw f;
- }
- }else{
- throw f;
- }
- }else{
- throw f;
- }
- } finally {
- _messageContext.getTransportOut().getSender().cleanup(_messageContext);
- }
- }
-
- /**
- * Auto generated method signature for Asynchronous Invocations
- *
- * @see org.apache.airavata.registry.services.RegistryService#startisRegistryServiceStarted
- */
- public void startisRegistryServiceStarted(
-
-
-
- final RegistryServiceCallbackHandler callback)
-
- throws java.rmi.RemoteException{
-
- org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[0].getName());
- _operationClient.getOptions().setAction("urn:isRegistryServiceStarted");
- _operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(true);
-
-
-
- addPropertyToOperationClient(_operationClient,org.apache.axis2.description.WSDL2Constants.ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR,"&");
-
-
-
- // create SOAP envelope with that payload
- org.apache.axiom.soap.SOAPEnvelope env=null;
- final org.apache.axis2.context.MessageContext _messageContext = new org.apache.axis2.context.MessageContext();
-
-
- //Style is taken to be "document". No input parameters
- // according to the WS-Basic profile in this case we have to send an empty soap message
- org.apache.axiom.soap.SOAPFactory factory = getFactory(_operationClient.getOptions().getSoapVersionURI());
- env = factory.getDefaultEnvelope();
-
- // adding SOAP soap_headers
- _serviceClient.addHeadersToEnvelope(env);
- // create message context with that soap envelope
- _messageContext.setEnvelope(env);
-
- // add the message context to the operation client
- _operationClient.addMessageContext(_messageContext);
-
-
-
- _operationClient.setCallback(new org.apache.axis2.client.async.AxisCallback() {
- public void onMessage(org.apache.axis2.context.MessageContext resultContext) {
- try {
- org.apache.axiom.soap.SOAPEnvelope resultEnv = resultContext.getEnvelope();
-
- java.lang.Object object = fromOM(resultEnv.getBody().getFirstElement(),
- RegistryServiceStub.IsRegistryServiceStartedResponse.class,
- getEnvelopeNamespaces(resultEnv));
- callback.receiveResultisRegistryServiceStarted(
- (RegistryServiceStub.IsRegistryServiceStartedResponse)object);
-
- } catch (org.apache.axis2.AxisFault e) {
- callback.receiveErrorisRegistryServiceStarted(e);
- }
- }
-
- public void onError(java.lang.Exception error) {
- if (error instanceof org.apache.axis2.AxisFault) {
- org.apache.axis2.AxisFault f = (org.apache.axis2.AxisFault) error;
- org.apache.axiom.om.OMElement faultElt = f.getDetail();
- if (faultElt!=null){
- if (faultExceptionNameMap.containsKey(faultElt.getQName())){
- //make the fault by reflection
- try{
- java.lang.String exceptionClassName = (java.lang.String)faultExceptionClassNameMap.get(faultElt.getQName());
- java.lang.Class exceptionClass = java.lang.Class.forName(exceptionClassName);
- java.lang.Exception ex=
- (java.lang.Exception) exceptionClass.newInstance();
- //message class
- java.lang.String messageClassName = (java.lang.String)faultMessageMap.get(faultElt.getQName());
- java.lang.Class messageClass = java.lang.Class.forName(messageClassName);
- java.lang.Object messageObject = fromOM(faultElt,messageClass,null);
- java.lang.reflect.Method m = exceptionClass.getMethod("setFaultMessage",
- new java.lang.Class[]{messageClass});
- m.invoke(ex,new java.lang.Object[]{messageObject});
-
-
- callback.receiveErrorisRegistryServiceStarted(new java.rmi.RemoteException(ex.getMessage(), ex));
- } catch(java.lang.ClassCastException e){
- // we cannot intantiate the class - throw the original Axis fault
- callback.receiveErrorisRegistryServiceStarted(f);
- } catch (java.lang.ClassNotFoundException e) {
- // we cannot intantiate the class - throw the original Axis fault
- callback.receiveErrorisRegistryServiceStarted(f);
- } catch (java.lang.NoSuchMethodException e) {
- // we cannot intantiate the class - throw the original Axis fault
- callback.receiveErrorisRegistryServiceStarted(f);
- } catch (java.lang.reflect.InvocationTargetException e) {
- // we cannot intantiate the class - throw the original Axis fault
- callback.receiveErrorisRegistryServiceStarted(f);
- } catch (java.lang.IllegalAccessException e) {
- // we cannot intantiate the class - throw the original Axis fault
- callback.receiveErrorisRegistryServiceStarted(f);
- } catch (java.lang.InstantiationException e) {
- // we cannot intantiate the class - throw the original Axis fault
- callback.receiveErrorisRegistryServiceStarted(f);
- } catch (org.apache.axis2.AxisFault e) {
- // we cannot intantiate the class - throw the original Axis fault
- callback.receiveErrorisRegistryServiceStarted(f);
- }
- } else {
- callback.receiveErrorisRegistryServiceStarted(f);
- }
- } else {
- callback.receiveErrorisRegistryServiceStarted(f);
- }
- } else {
- callback.receiveErrorisRegistryServiceStarted(error);
- }
- }
-
- public void onFault(org.apache.axis2.context.MessageContext faultContext) {
- org.apache.axis2.AxisFault fault = org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(faultContext);
- onError(fault);
- }
-
- public void onComplete() {
- try {
- _messageContext.getTransportOut().getSender().cleanup(_messageContext);
- } catch (org.apache.axis2.AxisFault axisFault) {
- callback.receiveErrorisRegistryServiceStarted(axisFault);
- }
- }
- });
-
-
- org.apache.axis2.util.CallbackReceiver _callbackReceiver = null;
- if ( _operations[0].getMessageReceiver()==null && _operationClient.getOptions().isUseSeparateListener()) {
- _callbackReceiver = new org.apache.axis2.util.CallbackReceiver();
- _operations[0].setMessageReceiver(
- _callbackReceiver);
- }
-
- //execute the operation client
- _operationClient.execute(false);
-
- }
-
-
-
- /**
- * A utility method that copies the namepaces from the SOAPEnvelope
- */
- private java.util.Map getEnvelopeNamespaces(org.apache.axiom.soap.SOAPEnvelope env){
- java.util.Map returnMap = new java.util.HashMap();
- java.util.Iterator namespaceIterator = env.getAllDeclaredNamespaces();
- while (namespaceIterator.hasNext()) {
- org.apache.axiom.om.OMNamespace ns = (org.apache.axiom.om.OMNamespace) namespaceIterator.next();
- returnMap.put(ns.getPrefix(),ns.getNamespaceURI());
- }
- return returnMap;
- }
-
-
-
- private javax.xml.namespace.QName[] opNameArray = null;
- private boolean optimizeContent(javax.xml.namespace.QName opName) {
-
-
- if (opNameArray == null) {
- return false;
- }
- for (int i = 0; i < opNameArray.length; i++) {
- if (opName.equals(opNameArray[i])) {
- return true;
- }
- }
- return false;
- }
- //http://localhost:8080/axis2/services/RegistryService.RegistryServiceHttpSoap12Endpoint/
- public static class ExtensionMapper{
-
- public static java.lang.Object getTypeObject(java.lang.String namespaceURI,
- java.lang.String typeName,
- javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{
-
-
- throw new org.apache.axis2.databinding.ADBException("Unsupported type " + namespaceURI + " " + typeName);
- }
-
- }
-
- public static class IsRegistryServiceStartedResponse
- implements org.apache.axis2.databinding.ADBBean{
-
- public static final javax.xml.namespace.QName MY_QNAME = new javax.xml.namespace.QName(
- "http://services.registry.airavata.apache.org",
- "isRegistryServiceStartedResponse",
- "ns1");
-
-
-
- private static java.lang.String generatePrefix(java.lang.String namespace) {
- if(namespace.equals("http://services.registry.airavata.apache.org")){
- return "ns1";
- }
- return org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();
- }
-
-
-
- /**
- * field for _return
- */
-
-
- protected boolean local_return ;
-
- /* This tracker boolean wil be used to detect whether the user called the set method
- * for this attribute. It will be used to determine whether to include this field
- * in the serialized XML
- */
- protected boolean local_returnTracker = false ;
-
-
- /**
- * Auto generated getter method
- * @return boolean
- */
- public boolean get_return(){
- return local_return;
- }
-
-
-
- /**
- * Auto generated setter method
- * @param param _return
- */
- public void set_return(boolean param){
-
- // setting primitive attribute tracker to true
-
- if (false) {
- local_returnTracker = false;
-
- } else {
- local_returnTracker = true;
- }
-
- this.local_return=param;
-
-
- }
-
-
- /**
- * isReaderMTOMAware
- * @return true if the reader supports MTOM
- */
- public static boolean isReaderMTOMAware(javax.xml.stream.XMLStreamReader reader) {
- boolean isReaderMTOMAware = false;
-
- try{
- isReaderMTOMAware = java.lang.Boolean.TRUE.equals(reader.getProperty(org.apache.axiom.om.OMConstants.IS_DATA_HANDLERS_AWARE));
- }catch(java.lang.IllegalArgumentException e){
- isReaderMTOMAware = false;
- }
- return isReaderMTOMAware;
- }
-
-
- /**
- *
- * @param parentQName
- * @param factory
- * @return org.apache.axiom.om.OMElement
- */
- public org.apache.axiom.om.OMElement getOMElement (
- final javax.xml.namespace.QName parentQName,
- final org.apache.axiom.om.OMFactory factory) throws org.apache.axis2.databinding.ADBException{
-
-
-
- org.apache.axiom.om.OMDataSource dataSource =
- new org.apache.axis2.databinding.ADBDataSource(this,MY_QNAME){
-
- public void serialize(org.apache.axis2.databinding.utils.writer.MTOMAwareXMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
- IsRegistryServiceStartedResponse.this.serialize(MY_QNAME,factory,xmlWriter);
- }
- };
- return new org.apache.axiom.om.impl.llom.OMSourcedElementImpl(
- MY_QNAME,factory,dataSource);
-
- }
-
- public void serialize(final javax.xml.namespace.QName parentQName,
- final org.apache.axiom.om.OMFactory factory,
- org.apache.axis2.databinding.utils.writer.MTOMAwareXMLStreamWriter xmlWriter)
- throws javax.xml.stream.XMLStreamException, org.apache.axis2.databinding.ADBException{
- serialize(parentQName,factory,xmlWriter,false);
- }
-
- public void serialize(final javax.xml.namespace.QName parentQName,
- final org.apache.axiom.om.OMFactory factory,
- org.apache.axis2.databinding.utils.writer.MTOMAwareXMLStreamWriter xmlWriter,
- boolean serializeType)
- throws javax.xml.stream.XMLStreamException, org.apache.axis2.databinding.ADBException{
-
-
-
-
- java.lang.String prefix = null;
- java.lang.String namespace = null;
-
-
- prefix = parentQName.getPrefix();
- namespace = parentQName.getNamespaceURI();
-
- if ((namespace != null) && (namespace.trim().length() > 0)) {
- java.lang.String writerPrefix = xmlWriter.getPrefix(namespace);
- if (writerPrefix != null) {
- xmlWriter.writeStartElement(namespace, parentQName.getLocalPart());
- } else {
- if (prefix == null) {
- prefix = generatePrefix(namespace);
- }
-
- xmlWriter.writeStartElement(prefix, parentQName.getLocalPart(), namespace);
- xmlWriter.writeNamespace(prefix, namespace);
- xmlWriter.setPrefix(prefix, namespace);
- }
- } else {
- xmlWriter.writeStartElement(parentQName.getLocalPart());
- }
-
- if (serializeType){
-
-
- java.lang.String namespacePrefix = registerPrefix(xmlWriter,"http://services.registry.airavata.apache.org");
- if ((namespacePrefix != null) && (namespacePrefix.trim().length() > 0)){
- writeAttribute("xsi","http://www.w3.org/2001/XMLSchema-instance","type",
- namespacePrefix+":isRegistryServiceStartedResponse",
- xmlWriter);
- } else {
- writeAttribute("xsi","http://www.w3.org/2001/XMLSchema-instance","type",
- "isRegistryServiceStartedResponse",
- xmlWriter);
- }
-
-
- }
- if (local_returnTracker){
- namespace = "http://services.registry.airavata.apache.org";
- if (! namespace.equals("")) {
- prefix = xmlWriter.getPrefix(namespace);
-
- if (prefix == null) {
- prefix = generatePrefix(namespace);
-
- xmlWriter.writeStartElement(prefix,"return", namespace);
- xmlWriter.writeNamespace(prefix, namespace);
- xmlWriter.setPrefix(prefix, namespace);
-
- } else {
- xmlWriter.writeStartElement(namespace,"return");
- }
-
- } else {
- xmlWriter.writeStartElement("return");
- }
-
- if (false) {
-
- throw new org.apache.axis2.databinding.ADBException("return cannot be null!!");
-
- } else {
- xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(local_return));
- }
-
- xmlWriter.writeEndElement();
- }
- xmlWriter.writeEndElement();
-
-
- }
-
- /**
- * Util method to write an attribute with the ns prefix
- */
- private void writeAttribute(java.lang.String prefix,java.lang.String namespace,java.lang.String attName,
- java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{
- if (xmlWriter.getPrefix(namespace) == null) {
- xmlWriter.writeNamespace(prefix, namespace);
- xmlWriter.setPrefix(prefix, namespace);
-
- }
-
- xmlWriter.writeAttribute(namespace,attName,attValue);
-
- }
-
- /**
- * Util method to write an attribute without the ns prefix
- */
- private void writeAttribute(java.lang.String namespace,java.lang.String attName,
- java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{
- if (namespace.equals(""))
- {
- xmlWriter.writeAttribute(attName,attValue);
- }
- else
- {
- registerPrefix(xmlWriter, namespace);
- xmlWriter.writeAttribute(namespace,attName,attValue);
- }
- }
-
-
- /**
- * Util method to write an attribute without the ns prefix
- */
- private void writeQNameAttribute(java.lang.String namespace, java.lang.String attName,
- javax.xml.namespace.QName qname, javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
-
- java.lang.String attributeNamespace = qname.getNamespaceURI();
- java.lang.String attributePrefix = xmlWriter.getPrefix(attributeNamespace);
- if (attributePrefix == null) {
- attributePrefix = registerPrefix(xmlWriter, attributeNamespace);
- }
- java.lang.String attributeValue;
- if (attributePrefix.trim().length() > 0) {
- attributeValue = attributePrefix + ":" + qname.getLocalPart();
- } else {
- attributeValue = qname.getLocalPart();
- }
-
- if (namespace.equals("")) {
- xmlWriter.writeAttribute(attName, attributeValue);
- } else {
- registerPrefix(xmlWriter, namespace);
- xmlWriter.writeAttribute(namespace, attName, attributeValue);
- }
- }
- /**
- * method to handle Qnames
- */
-
- private void writeQName(javax.xml.namespace.QName qname,
- javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
- java.lang.String namespaceURI = qname.getNamespaceURI();
- if (namespaceURI != null) {
- java.lang.String prefix = xmlWriter.getPrefix(namespaceURI);
- if (prefix == null) {
- prefix = generatePrefix(namespaceURI);
- xmlWriter.writeNamespace(prefix, namespaceURI);
- xmlWriter.setPrefix(prefix,namespaceURI);
- }
-
- if (prefix.trim().length() > 0){
- xmlWriter.writeCharacters(prefix + ":" + org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname));
- } else {
- // i.e this is the default namespace
- xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname));
- }
-
- } else {
- xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname));
- }
- }
-
- private void writeQNames(javax.xml.namespace.QName[] qnames,
- javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
-
- if (qnames != null) {
- // we have to store this data until last moment since it is not possible to write any
- // namespace data after writing the charactor data
- java.lang.StringBuffer stringToWrite = new java.lang.StringBuffer();
- java.lang.String namespaceURI = null;
- java.lang.String prefix = null;
-
- for (int i = 0; i < qnames.length; i++) {
- if (i > 0) {
- stringToWrite.append(" ");
- }
- namespaceURI = qnames[i].getNamespaceURI();
- if (namespaceURI != null) {
- prefix = xmlWriter.getPrefix(namespaceURI);
- if ((prefix == null) || (prefix.length() == 0)) {
- prefix = generatePrefix(namespaceURI);
- xmlWriter.writeNamespace(prefix, namespaceURI);
- xmlWriter.setPrefix(prefix,namespaceURI);
- }
-
- if (prefix.trim().length() > 0){
- stringToWrite.append(prefix).append(":").append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qnames[i]));
- } else {
- stringToWrite.append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qnames[i]));
- }
- } else {
- stringToWrite.append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qnames[i]));
- }
- }
- xmlWriter.writeCharacters(stringToWrite.toString());
- }
-
- }
-
-
- /**
- * Register a namespace prefix
- */
- private java.lang.String registerPrefix(javax.xml.stream.XMLStreamWriter xmlWriter, java.lang.String namespace) throws javax.xml.stream.XMLStreamException {
- java.lang.String prefix = xmlWriter.getPrefix(namespace);
-
- if (prefix == null) {
- prefix = generatePrefix(namespace);
-
- while (xmlWriter.getNamespaceContext().getNamespaceURI(prefix) != null) {
- prefix = org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();
- }
-
- xmlWriter.writeNamespace(prefix, namespace);
- xmlWriter.setPrefix(prefix, namespace);
- }
-
- return prefix;
- }
-
-
-
- /**
- * databinding method to get an XML representation of this object
- *
- */
- public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)
- throws org.apache.axis2.databinding.ADBException{
-
-
-
- java.util.ArrayList elementList = new java.util.ArrayList();
- java.util.ArrayList attribList = new java.util.ArrayList();
-
- if (local_returnTracker){
- elementList.add(new javax.xml.namespace.QName("http://services.registry.airavata.apache.org",
- "return"));
-
- elementList.add(
- org.apache.axis2.databinding.utils.ConverterUtil.convertToString(local_return));
- }
-
- return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());
-
-
-
- }
-
-
-
- /**
- * Factory class that keeps the parse method
- */
- public static class Factory{
-
-
-
-
- /**
- * static method to create the object
- * Precondition: If this object is an element, the current or next start element starts this object and any intervening reader events are ignorable
- * If this object is not an element, it is a complex type and the reader is at the event just after the outer start element
- * Postcondition: If this object is an element, the reader is positioned at its end element
- * If this object is a complex type, the reader is positioned at the end element of its outer element
- */
- public static IsRegistryServiceStartedResponse parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{
- IsRegistryServiceStartedResponse object =
- new IsRegistryServiceStartedResponse();
-
- int event;
- java.lang.String nillableValue = null;
- java.lang.String prefix ="";
- java.lang.String namespaceuri ="";
- try {
-
- while (!reader.isStartElement() && !reader.isEndElement())
- reader.next();
-
-
- if (reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance","type")!=null){
- java.lang.String fullTypeName = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance",
- "type");
- if (fullTypeName!=null){
- java.lang.String nsPrefix = null;
- if (fullTypeName.indexOf(":") > -1){
- nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(":"));
- }
- nsPrefix = nsPrefix==null?"":nsPrefix;
-
- java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(":")+1);
-
- if (!"isRegistryServiceStartedResponse".equals(type)){
- //find namespace for the prefix
- java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);
- return (IsRegistryServiceStartedResponse)ExtensionMapper.getTypeObject(
- nsUri,type,reader);
- }
-
-
- }
-
-
- }
-
-
-
-
- // Note all attributes that were handled. Used to differ normal attributes
- // from anyAttributes.
- java.util.Vector handledAttributes = new java.util.Vector();
-
-
-
-
- reader.next();
-
-
- while (!reader.isStartElement() && !reader.isEndElement()) reader.next();
-
- if (reader.isStartElement() && new javax.xml.namespace.QName("http://services.registry.airavata.apache.org","return").equals(reader.getName())){
-
- java.lang.String content = reader.getElementText();
-
- object.set_return(
- org.apache.axis2.databinding.utils.ConverterUtil.convertToBoolean(content));
-
- reader.next();
-
- } // End of if for expected property start element
-
- else {
-
- }
-
- while (!reader.isStartElement() && !reader.isEndElement())
- reader.next();
-
- if (reader.isStartElement())
- // A start element we are not expecting indicates a trailing invalid property
- throw new org.apache.axis2.databinding.ADBException("Unexpected subelement " + reader.getLocalName());
-
-
-
-
- } catch (javax.xml.stream.XMLStreamException e) {
- throw new java.lang.Exception(e);
- }
-
- return object;
- }
-
- }//end of factory class
-
-
-
- }
-
-
- private org.apache.axiom.om.OMElement toOM(RegistryServiceStub.IsRegistryServiceStartedResponse param, boolean optimizeContent)
- throws org.apache.axis2.AxisFault {
-
-
- try{
- return param.getOMElement(RegistryServiceStub.IsRegistryServiceStartedResponse.MY_QNAME,
- org.apache.axiom.om.OMAbstractFactory.getOMFactory());
- } catch(org.apache.axis2.databinding.ADBException e){
- throw org.apache.axis2.AxisFault.makeFault(e);
- }
-
-
- }
-
-
-
- /**
- * get the default envelope
- */
- private org.apache.axiom.soap.SOAPEnvelope toEnvelope(org.apache.axiom.soap.SOAPFactory factory){
- return factory.getDefaultEnvelope();
- }
-
-
- private java.lang.Object fromOM(
- org.apache.axiom.om.OMElement param,
- java.lang.Class type,
- java.util.Map extraNamespaces) throws org.apache.axis2.AxisFault{
-
- try {
-
- if (RegistryServiceStub.IsRegistryServiceStartedResponse.class.equals(type)){
-
- return RegistryServiceStub.IsRegistryServiceStartedResponse.Factory.parse(param.getXMLStreamReaderWithoutCaching());
-
-
- }
-
- } catch (java.lang.Exception e) {
- throw org.apache.axis2.AxisFault.makeFault(e);
- }
- return null;
- }
-
-
-
-
- }
-
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata/blob/32fff944/modules/airavata-client/src/main/java/org/apache/airavata/client/api/AiravataAPI.java
----------------------------------------------------------------------
diff --git a/modules/airavata-client/src/main/java/org/apache/airavata/client/api/AiravataAPI.java b/modules/airavata-client/src/main/java/org/apache/airavata/client/api/AiravataAPI.java
deleted file mode 100644
index f4d2300..0000000
--- a/modules/airavata-client/src/main/java/org/apache/airavata/client/api/AiravataAPI.java
+++ /dev/null
@@ -1,113 +0,0 @@
-/*
- *
- * 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.client.api;
-
-import java.net.URI;
-
-import org.apache.airavata.client.api.builder.DescriptorBuilder;
-import org.apache.airavata.client.api.exception.AiravataAPIInvocationException;
-import org.apache.airavata.common.utils.Version;
-
-
-/**
- * This is the base interface for AiravataAPI which contains all the base methods for Airavata API
- */
-public interface AiravataAPI {
-
- /**
- * Returns the AiravataManager - manage Airavata related configurations
- * @return
- */
- public AiravataManager getAiravataManager();
-
- /**
- * Returns the ApplicationManager
- * @return
- */
-// public ApplicationManager getApplicationManager();
-
- /**
- * Returns the WorkflowManager
- * @return
- */
- public WorkflowManager getWorkflowManager();
-
- /**
- * Returns the ProvenanceManager
- * @return
- */
-// public ProvenanceManager getProvenanceManager();
-
- /**
- * Returns the UserManager
- * @return
- */
- public UserManager getUserManager();
-
- /**
- * Returns the ExecutionManager
- * @return
- */
- public ExecutionManager getExecutionManager();
-
- /**
- * Returns the CredentialStoreManager
- * @return
- */
- public CredentialStoreManager getCredentialStoreManager();
-
- /**
- * Returns the Current User
- * @return
- */
- public String getCurrentUser();
-
- /**
- * Get Airavata API version
- * @return
- */
- public Version getVersion();
-
- /**
- * Gets the DescriptorBuilder. DescriptorBuilder is a helper class to create various descriptors.
- * E.g :- Build HostDescriptors, ServiceDescriptors etc ...
- * @return DescriptorBuilder.
- */
- public DescriptorBuilder getDescriptorBuilder();
-
- public void setCurrentUser(String alternateUsername);
-
-// public void setCallBack(PasswordCallback callback);
-
- public void setRegitryURI(URI registryURL);
-
- public void initialize() throws AiravataAPIInvocationException;
-
- public void setGateway(String gateway);
-
- /**
- * Gets the gateway id.
- * @return The gateway id.
- */
- public String getGateway();
-
-}
\ No newline at end of file
[7/9] airavata git commit: removing previous airavata client API -
AIRAVATA-1371
Posted by ch...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/32fff944/modules/airavata-client/src/main/java/org/apache/airavata/client/api/WorkflowManager.java
----------------------------------------------------------------------
diff --git a/modules/airavata-client/src/main/java/org/apache/airavata/client/api/WorkflowManager.java b/modules/airavata-client/src/main/java/org/apache/airavata/client/api/WorkflowManager.java
deleted file mode 100644
index 66120ec..0000000
--- a/modules/airavata-client/src/main/java/org/apache/airavata/client/api/WorkflowManager.java
+++ /dev/null
@@ -1,477 +0,0 @@
-/*
- *
- * 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.client.api;
-
-import java.net.URI;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.airavata.client.api.exception.AiravataAPIInvocationException;
-import org.apache.airavata.client.api.exception.WorkflowAlreadyExistsException;
-import org.apache.airavata.workflow.model.wf.Workflow;
-import org.apache.airavata.workflow.model.wf.WorkflowData;
-import org.apache.airavata.workflow.model.wf.WorkflowInput;
-
-public interface WorkflowManager {
-
- //privilledged API
-
- /**
- * Save the workflow under the given user
- * @param workflowAsString The workflow as a string.
- * @param owner Under which user workflow should be added. This is a privileged method and usually
- * only admin calls this.
- * @return <code>true</code> if successful else <code>false</code>.
- * @throws AiravataAPIInvocationException If an error occurred while saving the workflow.
- * @deprecated Use {@see #addOwnerWorkflow(String workflowAsString, String owner)} and
- * {@see #updateOwnerWorkflow(String workflowAsString, String owner)} methods.
- */
- @Deprecated
- public boolean saveWorkflow(String workflowAsString, String owner) throws AiravataAPIInvocationException;
-
- /**
- * Adds a new workflow. Workflow is added to users private space. i.e. only user who added the
- * workflow will be able to retrieve it.
- * @param workflowAsString The new workflow to add as a string.
- * @param owner Under which user workflow should be added. This is a privileged method and usually
- * only admin calls this.
- * @throws AiravataAPIInvocationException If an error occurred while adding a new workflow.
- * @throws WorkflowAlreadyExistsException If adding workflow already exists for the given owner.
- */
- public void addOwnerWorkflow (String workflowAsString, String owner) throws WorkflowAlreadyExistsException,
- AiravataAPIInvocationException;
-
- /**
- * Adds a new workflow. Workflow is added to users private space. i.e. only user who added the
- * workflow will be able to retrieve it.
- * @param workflowPath File path of the workflow.
- * @param owner Under which user workflow should be added. This is a privileged method and usually
- * only admin calls this.
- * @throws AiravataAPIInvocationException If an error occurred while adding a new workflow.
- * @throws WorkflowAlreadyExistsException If adding workflow already exists for the given owner.
- */
- public void addOwnerWorkflow (URI workflowPath, String owner) throws WorkflowAlreadyExistsException,
- AiravataAPIInvocationException;
-
- /**
- * Adds a new workflow. Workflow is added to users private space. i.e. only user who added the
- * workflow will be able to retrieve it.
- * @param workflow The new workflow to add.
- * @param owner Under which user workflow should be added. This is a privileged method and usually
- * only admin calls this.
- * @throws AiravataAPIInvocationException If an error occurred while adding a new workflow.
- * @throws WorkflowAlreadyExistsException If adding workflow already exists for the given owner.
- */
- public void addOwnerWorkflow (Workflow workflow, String owner) throws WorkflowAlreadyExistsException,
- AiravataAPIInvocationException;
-
- /**
- * Updates a given workflow. Only user who added the workflow will be able to update it.
- * @param workflowPath File path of the workflow.
- * @param owner Under which user workflow should be added. This is a privileged method and usually
- * only admin calls this.
- * @throws AiravataAPIInvocationException If an error occurred while updating the workflow.
- */
- public void updateOwnerWorkflow (URI workflowPath, String owner) throws AiravataAPIInvocationException;
-
- /**
- * Updates a given workflow. Only user who added the workflow will be able to update it.
- * @param workflowAsString The workflow to update as a string. Workflow is uniquely identified by <xgr:id> tag..
- * @param owner Under which user workflow should be added. This is a privileged method and usually
- * only admin calls this.
- * @throws AiravataAPIInvocationException If an error occurred while updating the workflow.
- */
- public void updateOwnerWorkflow (String workflowAsString, String owner) throws AiravataAPIInvocationException;
-
- /**
- * Save the workflow under the given user
- * @param workflow The workflow as a string.
- * @param owner Under which user workflow should be added. This is a privileged method and usually
- * only admin calls this.
- * @return <code>true</code> if successful else <code>false</code>.
- * @throws AiravataAPIInvocationException If an error occurred while saving the workflow.
- * @deprecated Use {@see #addOwnerWorkflow(Workflow workflow, String owner)} and
- * {@see #updateOwnerWorkflow(Workflow workflow, String owner)} methods.
- */
- @Deprecated
- public boolean saveWorkflow(Workflow workflow, String owner) throws AiravataAPIInvocationException;
-
-
-
- /**
- * Updates a given workflow. Only user who added the workflow will be able to update it.
- * @param workflow The workflow to update. Workflow is uniquely identified by <xgr:id> tag..
- * @param owner Under which user workflow should be added. This is a privileged method and usually
- * only admin calls this.
- * @throws AiravataAPIInvocationException If an error occurred while updating the workflow.
- */
- public void updateOwnerWorkflow (Workflow workflow, String owner) throws AiravataAPIInvocationException;
-
- /**
- * Retrieve workflows saved by the given user
- * @param owner
- * @return
- * @throws AiravataAPIInvocationException
- */
- public List<Workflow> getWorkflows(String owner) throws AiravataAPIInvocationException;
-
- /**
- * Retrieve workflow templace ids saved by the given user
- * @param owner
- * @return
- * @throws AiravataAPIInvocationException
- */
- public List<String> getWorkflowTemplateIds(String owner) throws AiravataAPIInvocationException;
-
- /**
- * Retrieve a given workflow saved by the given user
- * @param workflowName
- * @param owner
- * @return
- * @throws AiravataAPIInvocationException
- */
- public Workflow getWorkflow(String workflowName, String owner) throws AiravataAPIInvocationException;
-
- /**
- * Retrive the given workflow saved by the given user as a string
- * @param workflowName
- * @param owner
- * @return
- * @throws AiravataAPIInvocationException
- */
- public String getWorkflowAsString(String workflowName, String owner) throws AiravataAPIInvocationException;
-
- /**
- * Delete the workflow saved by the given user
- * @param workflowName
- * @param owner
- * @return
- * @throws AiravataAPIInvocationException
- */
- public boolean deleteWorkflow(String workflowName, String owner) throws AiravataAPIInvocationException;
-
- //user api
-
- /**
- * Save the workflow
- * @param workflowAsString Workflow as a string.
- * @deprecated Use {@see #addWorkflow(String workflowAsString)} and
- * {@see #updateWorkflow(String workflowAsString)} methods.
- * @throws AiravataAPIInvocationException
- */
- @Deprecated
- public boolean saveWorkflow(String workflowAsString) throws AiravataAPIInvocationException;
-
- /**
- * Save the workflow as public
- * @param workflowAsString Workflow as a string.
- * @deprecated Use {@see #addWorkflowAsPublic(String workflowAsString)} and
- * {@see #updateWorkflowAsPublic(String workflowAsString)} methods.
- * @throws AiravataAPIInvocationException
- */
- @Deprecated
- public boolean saveWorkflowAsPublic(String workflowAsString) throws AiravataAPIInvocationException;
-
- /**
- * Save the workflow
- * @param workflow {@see Workflow} object to save.
- * @deprecated Use {@see #addWorkflow(Workflow workflow)} and
- * {@see #updateWorkflow(Workflow workflow)} methods.
- * @throws AiravataAPIInvocationException
- */
- @Deprecated
- public boolean saveWorkflow(Workflow workflow) throws AiravataAPIInvocationException;
-
- /**
- * Adds a new workflow. Workflow is added to users private space. i.e. only user who added the
- * workflow will be able to retrieve it.
- * @param workflowAsString The new workflow to add and its content as a string.
- * @throws AiravataAPIInvocationException If an error occurred while adding a new workflow.
- */
- public void addWorkflowAsPublic (String workflowAsString) throws WorkflowAlreadyExistsException,
- AiravataAPIInvocationException;
-
- /**
- * Updates a given workflow. Only user who added the workflow will be able to update it.
- * @param workflowAsString The workflow to update. Workflow is uniquely identified by <xgr:id> tag.
- * @throws AiravataAPIInvocationException If an error occurred while updating the workflow.
- */
- public void updateWorkflowAsPublic (String workflowAsString) throws AiravataAPIInvocationException;
-
- /**
- * Adds a new workflow. Workflow is added to users private space. i.e. only user who added the
- * workflow will be able to retrieve it.
- * @param workflowUri Where the workflow file (xml file) exists.
- * @throws AiravataAPIInvocationException If an error occurred while adding a new workflow.
- */
- public void addWorkflowAsPublic (URI workflowUri) throws WorkflowAlreadyExistsException,
- AiravataAPIInvocationException;
-
- /**
- * Updates a given workflow. Only user who added the workflow will be able to update it.
- * @param workflowUri Where the workflow file resides. File location is given as a URI.
- * Workflow is uniquely identified by <xgr:id> tag.
- * @throws AiravataAPIInvocationException If an error occurred while updating the workflow.
- */
- public void updateWorkflowAsPublic (URI workflowUri) throws AiravataAPIInvocationException;
-
-
- /**
- * Adds a new workflow. Workflow is added to users private space. i.e. only user who added the
- * workflow will be able to retrieve it.
- * @param workflowAsString The new workflow to add and its content as a string.
- * @throws AiravataAPIInvocationException If an error occurred while adding a new workflow.
- */
- public void addWorkflow (String workflowAsString) throws WorkflowAlreadyExistsException,
- AiravataAPIInvocationException;
-
- /**
- * Updates a given workflow. Only user who added the workflow will be able to update it.
- * TODO : What exception should we throw if a different user tries to update the workflow ?
- * @param workflowAsString The workflow to update. Workflow is uniquely identified by <xgr:id> tag..
- * @throws AiravataAPIInvocationException If an error occurred while updating the workflow.
- */
- public void updateWorkflow (String workflowAsString) throws AiravataAPIInvocationException;
-
- /**
- * Adds a new workflow. Workflow is added to users private space. i.e. only user who added the
- * workflow will be able to retrieve it.
- * @param workflow The new workflow to add.
- * @throws AiravataAPIInvocationException If an error occurred while adding a new workflow.
- */
- public void addWorkflow (Workflow workflow) throws WorkflowAlreadyExistsException,
- AiravataAPIInvocationException;
-
- /**
- * Updates a given workflow. Only user who added the workflow will be able to update it.
- * TODO : What exception should we throw if a different user tries to update the workflow ?
- * @param workflow The workflow to update. Workflow is uniquely identified by <xgr:id> tag..
- * @throws AiravataAPIInvocationException If an error occurred while updating the workflow.
- */
- public void updateWorkflow (Workflow workflow) throws AiravataAPIInvocationException;
-
- /**
- * Adds a new workflow. Workflow is added to users private space. i.e. only user who added the
- * workflow will be able to retrieve it.
- * @param workflowUri New workflow file as a URI.
- * @throws AiravataAPIInvocationException If an error occurred while adding a new workflow.
- */
- public void addWorkflow (URI workflowUri) throws WorkflowAlreadyExistsException,
- AiravataAPIInvocationException;
-
- /**
- * Updates a given workflow. Only user who added the workflow will be able to update it.
- * TODO : What exception should we throw if a different user tries to update the workflow ?
- * @param workflowUri The workflow to update as a URI.
- * @throws AiravataAPIInvocationException If an error occurred while updating the workflow.
- */
- public void updateWorkflow (URI workflowUri) throws AiravataAPIInvocationException;
-
- /**
- * Save the workflow as public
- * @param workflow
- * @return
- * @throws AiravataAPIInvocationException
- */
- public boolean saveWorkflowAsPublic(Workflow workflow) throws AiravataAPIInvocationException;
-
- /**
- * Get all workflows of the current user
- * @return
- * @throws AiravataAPIInvocationException
- */
- public List<Workflow> getWorkflows() throws AiravataAPIInvocationException;
-
- /**
- * Get template id's of all workflows of the current user
- * @return
- * @throws AiravataAPIInvocationException
- */
- public List<String> getWorkflowTemplateIds() throws AiravataAPIInvocationException;
-
- /**
- * Retrieve the given workflow
- * @param workflowName
- * @return
- * @throws AiravataAPIInvocationException
- */
- public Workflow getWorkflow(String workflowName) throws AiravataAPIInvocationException;
-
- /**
- * Retrieve the given workflow as a string
- * @param workflowName
- * @return
- * @throws AiravataAPIInvocationException
- */
- public String getWorkflowAsString(String workflowName) throws AiravataAPIInvocationException;
-
- /**
- * Delete the given workflow
- * @param workflowName
- * @return
- * @throws AiravataAPIInvocationException
- */
- public boolean deleteWorkflow(String workflowName) throws AiravataAPIInvocationException;
-
- /**
- * Create workflow object from workflow string
- * @param workflowAsString
- * @return
- * @throws AiravataAPIInvocationException
- */
- public Workflow getWorkflowFromString(String workflowAsString) throws AiravataAPIInvocationException;
-
- /**
- * Creates a workflow from a given URI. When we want to create a workflow from a file path
- * we can use this method.
- * @param workflowPath The workflow file path as a URI.
- * @return A workflow object created using given workflow XML file.
- * @throws AiravataAPIInvocationException If an error occurred while parsing the XML file.
- */
- public Workflow getWorkflowFromURI(URI workflowPath) throws AiravataAPIInvocationException;
-
-
- /**
- * Convert workflow in to a string
- * @param workflow
- * @return
- * @throws AiravataAPIInvocationException
- */
- public String getWorkflowAsString(Workflow workflow) throws AiravataAPIInvocationException;
-
- /**
- * Gives the service Node IDs for the given template ID, this will be useful when you want to know the service ID to
- * Configure each node with different WorkflowContextHeaders
- * @param templateID
- * @return
- */
- public List<String> getWorkflowServiceNodeIDs(String templateID) throws AiravataAPIInvocationException;
-
- /**
- * Check if the workflow from the given name is published in the system
- * @param workflowName
- * @return
- * @throws AiravataAPIInvocationException
- */
- public boolean isPublishedWorkflowExists(String workflowName) throws AiravataAPIInvocationException;
-
- /**
- * Publish the workflow "workflowName" residing user space to the published space under name publishWorkflowName
- * @param workflowName
- * @param publishWorkflowName
- * @throws AiravataAPIInvocationException
- */
- public void publishWorkflow(String workflowName, String publishWorkflowName) throws AiravataAPIInvocationException;
-
- /**
- * Publish the workflow "workflowName" residing user space
- * @param workflowName
- * @throws AiravataAPIInvocationException
- */
- public void publishWorkflow(String workflowName) throws AiravataAPIInvocationException;
-
- /**
- * Retrive published workflow
- * @param workflowName
- * @return
- * @throws AiravataAPIInvocationException
- */
- public String getPublishedWorkflowGraphXML(String workflowName) throws AiravataAPIInvocationException;
-
- /**
- * Retrive published workflow
- * @param workflowName
- * @return
- * @throws AiravataAPIInvocationException
- */
- public Workflow getPublishedWorkflow(String workflowName) throws AiravataAPIInvocationException;
-
- /**
- * Retrive published workflow names
- * @return
- * @throws AiravataAPIInvocationException
- */
- public List<String> getPublishedWorkflowNames() throws AiravataAPIInvocationException;
-
- /**
- * Retrive published workflows
- * @return
- * @throws AiravataAPIInvocationException
- */
- public Map<String,Workflow> getPublishedWorkflows() throws AiravataAPIInvocationException;
-
- /**
- * Remove published workflow from the system
- * @param workflowName
- * @throws AiravataAPIInvocationException
- */
- public void removePublishedWorkflow(String workflowName)throws AiravataAPIInvocationException;
-
- /**
- * get workflow inputs of the workflow
- * @param workflowName
- * @return
- * @throws AiravataAPIInvocationException
- * @throws Exception
- */
- public List<WorkflowInput> getWorkflowInputs(String workflowName) throws AiravataAPIInvocationException;
-
- /**
- * Retrieve the workflow inputs for a workflow
- * @param workflowData
- * @return
- * @throws AiravataAPIInvocationException
- * @throws Exception
- */
- public List<WorkflowInput> getWorkflowInputs(WorkflowData workflowData) throws AiravataAPIInvocationException;
-
- /**
- * Retrieve all workflows in published space & user space accessible to the user.
- * @return
- * @throws AiravataAPIInvocationException
- */
- public List<WorkflowData> getAllWorkflows() throws AiravataAPIInvocationException;
-
- /**
- * Check to see if the workflow exists in user space
- * @param workflowName
- * @return
- * @throws AiravataAPIInvocationException
- */
- public boolean isWorkflowExists(String workflowName) throws AiravataAPIInvocationException;
-
- /**
- * Update an existing workflow with the given workflow graph string
- * @param workflowName
- * @param workflowGraphXml
- * @throws AiravataAPIInvocationException
- */
- public void updateWorkflow(String workflowName, String workflowGraphXml) throws AiravataAPIInvocationException;
-
- /**
- * Delete the workflow from the user space
- * @param workflowName
- * @throws AiravataAPIInvocationException
- */
- public void removeWorkflow(String workflowName) throws AiravataAPIInvocationException;
-
-}
http://git-wip-us.apache.org/repos/asf/airavata/blob/32fff944/modules/airavata-client/src/main/java/org/apache/airavata/client/api/WorkflowOutputDataSettings.java
----------------------------------------------------------------------
diff --git a/modules/airavata-client/src/main/java/org/apache/airavata/client/api/WorkflowOutputDataSettings.java b/modules/airavata-client/src/main/java/org/apache/airavata/client/api/WorkflowOutputDataSettings.java
deleted file mode 100644
index 40e533d..0000000
--- a/modules/airavata-client/src/main/java/org/apache/airavata/client/api/WorkflowOutputDataSettings.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- *
- * 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.client.api;
-
-public interface WorkflowOutputDataSettings {
-
- /**
- * Retrive the list of application output data settings
- * @return
- */
- public OutputDataSettings[] getOutputDataSettingsList();
-
- /**
- * Add a new appliation output data settings
- * @param nodeId - id of the node which the output data settings will be specified
- * @return
- */
- public OutputDataSettings addNewOutputDataSettings(String nodeId);
-
- /**
- * Add a new appliation output data settings
- * @param outputDataDirectory
- * @param dataRegistryURL
- * @param isDataPersistent
- * @return
- */
- public OutputDataSettings addNewOutputDataSettings(String nodeId, String outputDataDirectory, String dataRegistryURL, Boolean isDataPersistent);
-
- /**
- * Add new application putput data settings
- * @param outputDataSettings
- */
- public void addNewOutputDataSettings(OutputDataSettings...outputDataSettings);
-
- /**
- * Remove the application output data settings from the workflow output data settings
- * @param outputDataSettings
- */
- public void removeOutputDataSettings(OutputDataSettings outputDataSettings);
-
- /**
- * Remove all application output data settings
- */
- public void removeAllOutputDataSettings();
-
-}
http://git-wip-us.apache.org/repos/asf/airavata/blob/32fff944/modules/airavata-client/src/main/java/org/apache/airavata/client/api/WorkflowSchedulingSettings.java
----------------------------------------------------------------------
diff --git a/modules/airavata-client/src/main/java/org/apache/airavata/client/api/WorkflowSchedulingSettings.java b/modules/airavata-client/src/main/java/org/apache/airavata/client/api/WorkflowSchedulingSettings.java
deleted file mode 100644
index 6fa0146..0000000
--- a/modules/airavata-client/src/main/java/org/apache/airavata/client/api/WorkflowSchedulingSettings.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- *
- * 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.client.api;
-
-public interface WorkflowSchedulingSettings {
-
- /**
- * Get all currently defined scheduling settings for the workflow node
- * @return
- */
- public NodeSettings[] getNodeSettingsList();
-
- /**
- * Add and return a new Node scheduling settings
- * @param nodeId
- * @return
- */
- public NodeSettings addNewNodeSettings(String nodeId);
-
- /**
- * Add and return a new Node scheduling settings
- * @param nodeId
- * @param serviceId
- * @param cpuCount
- * @param nodeCount
- * @return
- */
- public NodeSettings addNewNodeSettings(String nodeId, String serviceId, int cpuCount, int nodeCount);
-
- /**
- * Add a list of Node scheduling settings
- * @param nodeSettings
- */
- public void addNewNodeSettings(NodeSettings...nodeSettings);
-
- /**
- * Is there a Node scheduling settings defined for the given node id
- * @param nodeId
- * @return
- */
- public boolean hasNodeSettings(String nodeId);
-
- /**
- * Return the Node scheduling settings for the given node Id
- * @param nodeId
- * @return
- */
- public NodeSettings getNodeSettings(String nodeId);
-
- /**
- * Remove the node scheduling settings given by the node Id
- * @param nodeId
- */
- public void removeNodeSettings(String nodeId);
-
- /**
- * Clear all node scheduling settings
- */
- public void removeAllNodeSettings();
-}
http://git-wip-us.apache.org/repos/asf/airavata/blob/32fff944/modules/airavata-client/src/main/java/org/apache/airavata/client/api/builder/DescriptorBuilder.java
----------------------------------------------------------------------
diff --git a/modules/airavata-client/src/main/java/org/apache/airavata/client/api/builder/DescriptorBuilder.java b/modules/airavata-client/src/main/java/org/apache/airavata/client/api/builder/DescriptorBuilder.java
deleted file mode 100644
index 51821b9..0000000
--- a/modules/airavata-client/src/main/java/org/apache/airavata/client/api/builder/DescriptorBuilder.java
+++ /dev/null
@@ -1,208 +0,0 @@
-/*
- *
- * 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.client.api.builder;
-
-import org.apache.airavata.client.api.exception.AiravataAPIInvocationException;
-
-
-/**
- * This class provides set of utility methods to create descriptors. Following descriptors are included.
- * <ol>
- * <li>HostDescription - org.apache.airavata.commons.gfac.type.HostDescription</li>
- * </ol>
- */
-public class DescriptorBuilder {
-
- private static final String IP_ADDRESS_VALIDATION_STRING = "^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$";
-
- private static final String HOST_NAME_VALIDATION_STRING = "^(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\\-]*[a-zA-Z0-9])\\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\\-]*[A-Za-z0-9])$";
-
- /**
- * Builds a host descriptor object. Host descriptor gives information about application hosted machine.
- *
- * @param type
- * The host type. Following types are available at the moment.
- * <ol>
- * <li>org.apache.airavata.schemas.gfac.GlobusHostType</li>
- * <li>org.apache.airavata.schemas.gfac.Ec2HostType</li>
- * <li>org.apache.airavata.schemas.gfac.GsisshHostType</li>
- * <li>org.apache.airavata.schemas.gfac.UnicoreHostType</li>
- * </ol>
- * @param hostName
- * An unique id given to hosted machine. This could be any name. But should be unique across the
- * workflow.
- * @param hostAddress
- * This is the IP address where application is running. This should be a valid IP address or valid host
- * name.
- * @return The org.apache.airavata.commons.gfac.type.HostDescription object.
- * @throws AiravataAPIInvocationException
- * If provided host address does not comply with IP address format or host name format.
- */
-// public HostDescription buildHostDescription(HostDescriptionType type, String hostName, String hostAddress)
-// throws AiravataAPIInvocationException {
-//
-// return buildHostDescription(type.schemaType(), hostName, hostAddress);
-//
-// }
-
- /**
- * Builds a host descriptor object. Host descriptor gives information about application hosted machine.
- *
- * @param schemaType
- * The host type as per the schema. All available schema types are listed in
- * org.apache.xmlbeans.SchemaType
- * @param hostName
- * An unique id given to hosted machine. This could be any name. But should be unique across the
- * workflow.
- * @param hostAddress
- * This is the IP address where application is running. This should be a valid IP address or valid host
- * name.
- * @return The org.apache.airavata.commons.gfac.type.HostDescription object.
- * @throws AiravataAPIInvocationException
- * If provided host address does not comply with IP address format or host name format.
- */
-// public HostDescription buildHostDescription(SchemaType schemaType, String hostName, String hostAddress)
-// throws AiravataAPIInvocationException {
-//
-// if (!validateHostAddress(hostAddress)) {
-// throw new AiravataAPIInvocationException("Invalid host address. Host address should be "
-// + "either an IP address or a valid host name.");
-// }
-//
-// HostDescription hostDescription = new HostDescription(schemaType);
-// hostDescription.getType().setHostName(hostName);
-// hostDescription.getType().setHostAddress(hostAddress);
-//
-// return hostDescription;
-//
-// }
-
- /**
- * Create an input parameter.
- *
- * @param parameterName
- * The input parameter name.
- * @param parameterDescription
- * A short description about the input parameter.
- * @param parameterDataType
- * Input parameter type. E.g :- String, Integer etc .. All possible types are define in DataType.Enum
- * class. E.g :- DataType.String
- * @see org.apache.airavata.schemas.gfac.DataType.Enum
- * @return Encapsulating InputParameterType object.
- */
-// public InputParameterType buildInputParameterType(String parameterName, String parameterDescription,
-// DataType.Enum parameterDataType) {
-//
-// InputParameterType parameter = InputParameterType.Factory.newInstance();
-// parameter.setParameterName(parameterName);
-// parameter.setParameterDescription(parameterDescription);
-//
-// ParameterType parameterType = parameter.addNewParameterType();
-// parameterType.setType(parameterDataType);
-// parameterType.setName(parameterDataType.toString());
-//
-// return parameter;
-//
-// }
-
- /**
- * Create an input parameter.
- *
- * @param parameterName
- * The input parameter name.
- * @param parameterDescription
- * A short description about the input parameter.
- * @param parameterDataType
- * Input parameter type. E.g :- String, Integer etc .. All possible types are define in DataType.Enum
- * class. E.g :- DataType.String
- * @see org.apache.airavata.schemas.gfac.DataType.Enum
- * @return Encapsulating InputParameterType object.
- */
-// public OutputParameterType buildOutputParameterType(String parameterName, String parameterDescription,
-// DataType.Enum parameterDataType) {
-//
-// OutputParameterType parameter = OutputParameterType.Factory.newInstance();
-// parameter.setParameterName(parameterName);
-// parameter.setParameterDescription(parameterDescription);
-//
-// ParameterType parameterType = parameter.addNewParameterType();
-// parameterType.setType(parameterDataType);
-// parameterType.setName(parameterDataType.toString());
-//
-// return parameter;
-//
-// }
-
- /**
- * Creates a ServiceDescription object. This includes information about the service. Mainly we are focusing on
- * following details about the service.
- * <ol>
- * <li>A name for service</li>
- * <li>A short description about the service</li>
- * <li>A what are input data types</li>
- * <li>A what are output data types</li>
- * </ol>
- *
- * @param serviceName
- * Name of the service.
- * @param description
- * A short description about the service.
- * @param inputParameterTypes
- * Input parameter types.
- * @param outputParameterTypes
- * Output parameter types.
- * @return A ServiceDescription object with above information encapsulated.
- */
-// public ServiceDescription buildServiceDescription(String serviceName, String description,
-// List<InputParameterType> inputParameterTypes, List<OutputParameterType> outputParameterTypes) {
-//
-// ServiceDescription serviceDescription = new ServiceDescription();
-// serviceDescription.getType().setName(serviceName);
-// serviceDescription.getType().setDescription(description);
-//
-// serviceDescription.getType().setInputParametersArray(
-// inputParameterTypes.toArray(new InputParameterType[inputParameterTypes.size()]));
-// serviceDescription.getType().setOutputParametersArray(
-// outputParameterTypes.toArray(new OutputParameterType[outputParameterTypes.size()]));
-//
-// return serviceDescription;
-//
-// }
-//
-// public ApplicationDescription buildApplicationDeploymentDescription(String applicationName, String executablePath,
-// String workingDirectory) {
-//
-// ApplicationDescription applicationDeploymentDescription = new ApplicationDescription();
-// ApplicationDeploymentDescriptionType applicationDeploymentDescriptionType = applicationDeploymentDescription
-// .getType();
-// applicationDeploymentDescriptionType.addNewApplicationName().setStringValue(applicationName);
-// applicationDeploymentDescriptionType.setExecutableLocation(executablePath);
-// applicationDeploymentDescriptionType.setScratchWorkingDirectory(workingDirectory);
-//
-// return applicationDeploymentDescription;
-//
-// }
-//
-// private boolean validateHostAddress(String hostAddress) {
-// return hostAddress.matches(IP_ADDRESS_VALIDATION_STRING) || hostAddress.matches(HOST_NAME_VALIDATION_STRING);
-// }
-}
http://git-wip-us.apache.org/repos/asf/airavata/blob/32fff944/modules/airavata-client/src/main/java/org/apache/airavata/client/api/exception/AiravataAPIInvocationException.java
----------------------------------------------------------------------
diff --git a/modules/airavata-client/src/main/java/org/apache/airavata/client/api/exception/AiravataAPIInvocationException.java b/modules/airavata-client/src/main/java/org/apache/airavata/client/api/exception/AiravataAPIInvocationException.java
deleted file mode 100644
index 899fe85..0000000
--- a/modules/airavata-client/src/main/java/org/apache/airavata/client/api/exception/AiravataAPIInvocationException.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- *
- * 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.client.api.exception;
-
-
-public class AiravataAPIInvocationException extends Exception {
- //private static final Logger log = LoggerFactory.getLogger(AiravataAPIInvocationException.class);
-
- private static final long serialVersionUID = 1L;
-
- public AiravataAPIInvocationException(Throwable e) {
- super(e.getLocalizedMessage(), e);
- //log.error(e.getLocalizedMessage(),e);
- }
- public AiravataAPIInvocationException(String message) {
- super(message, null);
- //log.error(message);
- }
-
- public AiravataAPIInvocationException(String message, Throwable e) {
- super(message, e);
- //log.error(message,e);
- }
-
-}
http://git-wip-us.apache.org/repos/asf/airavata/blob/32fff944/modules/airavata-client/src/main/java/org/apache/airavata/client/api/exception/AiravataAPIUnimplementedException.java
----------------------------------------------------------------------
diff --git a/modules/airavata-client/src/main/java/org/apache/airavata/client/api/exception/AiravataAPIUnimplementedException.java b/modules/airavata-client/src/main/java/org/apache/airavata/client/api/exception/AiravataAPIUnimplementedException.java
deleted file mode 100644
index f64e480..0000000
--- a/modules/airavata-client/src/main/java/org/apache/airavata/client/api/exception/AiravataAPIUnimplementedException.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- *
- * 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.client.api.exception;
-
-public class AiravataAPIUnimplementedException extends
- AiravataAPIInvocationException {
-
- private static final long serialVersionUID = -8233342290087971830L;
-
- public AiravataAPIUnimplementedException(String message) {
- super(message);
- }
-
-}
http://git-wip-us.apache.org/repos/asf/airavata/blob/32fff944/modules/airavata-client/src/main/java/org/apache/airavata/client/api/exception/DescriptorAlreadyExistsException.java
----------------------------------------------------------------------
diff --git a/modules/airavata-client/src/main/java/org/apache/airavata/client/api/exception/DescriptorAlreadyExistsException.java b/modules/airavata-client/src/main/java/org/apache/airavata/client/api/exception/DescriptorAlreadyExistsException.java
deleted file mode 100644
index cf3a95c..0000000
--- a/modules/airavata-client/src/main/java/org/apache/airavata/client/api/exception/DescriptorAlreadyExistsException.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- *
- * 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.client.api.exception;
-
-
-/**
- * If a saving descriptor already found in the system this exception will be thrown.
- */
-public class DescriptorAlreadyExistsException extends AiravataAPIInvocationException {
-
- private static final long serialVersionUID = 1231L;
-
- public DescriptorAlreadyExistsException(Throwable e) {
- super(e);
- }
-
- public DescriptorAlreadyExistsException(String message) {
- super(message, null);
- }
-
- public DescriptorAlreadyExistsException(String message, Throwable e) {
- super(message, e);
- }
-
-}
http://git-wip-us.apache.org/repos/asf/airavata/blob/32fff944/modules/airavata-client/src/main/java/org/apache/airavata/client/api/exception/WorkflowAlreadyExistsException.java
----------------------------------------------------------------------
diff --git a/modules/airavata-client/src/main/java/org/apache/airavata/client/api/exception/WorkflowAlreadyExistsException.java b/modules/airavata-client/src/main/java/org/apache/airavata/client/api/exception/WorkflowAlreadyExistsException.java
deleted file mode 100644
index 56c8220..0000000
--- a/modules/airavata-client/src/main/java/org/apache/airavata/client/api/exception/WorkflowAlreadyExistsException.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- *
- * 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.client.api.exception;
-
-/**
- * If a saving descriptor already found in the system this exception will be thrown.
- */
-public class WorkflowAlreadyExistsException extends AiravataAPIInvocationException {
-
- private static final long serialVersionUID = 1231L;
-
- public WorkflowAlreadyExistsException(Throwable e) {
- super(e);
- }
-
- public WorkflowAlreadyExistsException(String message) {
- super(message, null);
- }
-
- public WorkflowAlreadyExistsException(String message, Throwable e) {
- super(message, e);
- }
-
-}
http://git-wip-us.apache.org/repos/asf/airavata/blob/32fff944/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/AiravataManagerImpl.java
----------------------------------------------------------------------
diff --git a/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/AiravataManagerImpl.java b/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/AiravataManagerImpl.java
deleted file mode 100644
index 8e58148..0000000
--- a/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/AiravataManagerImpl.java
+++ /dev/null
@@ -1,310 +0,0 @@
-/*
- *
- * 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.client.impl;
-
-import org.apache.airavata.client.AiravataClient;
-import org.apache.airavata.client.api.AiravataManager;
-import org.apache.airavata.client.api.exception.AiravataAPIInvocationException;
-
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.Date;
-import java.util.List;
-
-public class AiravataManagerImpl implements AiravataManager {
- private AiravataClient client;
-
- public AiravataManagerImpl(AiravataClient client) {
- setClient(client);
- }
-
- @Override
- public List<URI> getWorkflowInterpreterServiceURLs() throws AiravataAPIInvocationException{
-// try {
-// return getClient().getRegistryClient().getWorkflowInterpreterURIs();
-// } catch (Exception e) {
-// throw new AiravataAPIInvocationException(e);
-// }
- return null;
- }
-
-
-
- public AiravataClient getClient() {
- return client;
- }
-
- public void setClient(AiravataClient client) {
- this.client = client;
- }
-
- @Override
- public URI getWorkflowInterpreterServiceURL()
- throws AiravataAPIInvocationException {
- try {
- return getClient().getClientConfiguration().getXbayaServiceURL().toURI();
- } catch (URISyntaxException e) {
- throw new AiravataAPIInvocationException(e);
- }
- }
-
- @Override
- public URI getWorkflowInterpreterServiceURL(URI defaultURL)
- throws AiravataAPIInvocationException {
- if (getWorkflowInterpreterServiceURL()==null){
- return defaultURL;
- }
- return getWorkflowInterpreterServiceURL();
-
- }
-
- @SuppressWarnings("serial")
- @Override
- public List<URI> getMessageBoxServiceURLs()
- throws AiravataAPIInvocationException {
-// try {
-// return new ArrayList<URI>(){{add(getClient().getRegistryClient().getMessageBoxURI());}};
-// } catch (Exception e) {
-// throw new AiravataAPIInvocationException(e);
-// }
- return null;
- }
-
- @Override
- public URI getMessageBoxServiceURL() throws AiravataAPIInvocationException {
-// try {
-// return getClient().getRegistryClient().getMessageBoxURI();
-// } catch (Exception e) {
-// throw new AiravataAPIInvocationException(e);
-// }
- return null;
- }
-
- @Override
- public URI getMessageBoxServiceURL(URI defaultURL)
- throws AiravataAPIInvocationException {
- if (getMessageBoxServiceURL()==null){
- return defaultURL;
- }
- return getMessageBoxServiceURL();
- }
-
- @SuppressWarnings("serial")
- @Override
- public List<URI> getEventingServiceURLs()
- throws AiravataAPIInvocationException {
-// try {
-// return new ArrayList<URI>(){{add(getClient().getRegistryClient().getEventingServiceURI());}};
-// } catch (Exception e) {
-// throw new AiravataAPIInvocationException(e);
-// }
- return null;
- }
-
- @Override
- public URI getEventingServiceURL() throws AiravataAPIInvocationException {
-// try {
-// return getClient().getRegistryClient().getEventingServiceURI();
-// } catch (Exception e) {
-// throw new AiravataAPIInvocationException(e);
-// }
- return null;
- }
-
- @Override
- public URI getEventingServiceURL(URI defaultURL)
- throws AiravataAPIInvocationException {
- if (getEventingServiceURL()==null){
- return defaultURL;
- }
- return getEventingServiceURL();
- }
-
- @Override
- public void setConfiguration(String key, String value, Date expire) throws AiravataAPIInvocationException {
-// try{
-// getClient().getRegistryClient().setConfiguration(key, value, expire);
-// }catch (Exception e){
-// throw new AiravataAPIInvocationException(e);
-// }
- }
-
- @Override
- public void addConfiguration(String key, String value, Date expire) throws AiravataAPIInvocationException {
-// try{
-// getClient().getRegistryClient().addConfiguration(key, value, expire);
-// }catch (Exception e){
-// throw new AiravataAPIInvocationException(e);
-// }
- }
-
- @Override
- public Object getConfiguration(String key)
- throws AiravataAPIInvocationException {
-// try{
-// return getClient().getRegistryClient().getConfiguration(key);
-// }catch (Exception e){
-// throw new AiravataAPIInvocationException(e);
-// }
- return null;
- }
-
- @Override
- public List<Object> getConfigurationList(String key)
- throws AiravataAPIInvocationException {
-// try{
-// return getClient().getRegistryClient().getConfigurationList(key);
-// }catch (Exception e){
-// throw new AiravataAPIInvocationException(e);
-// }
- return null;
- }
-
- @Override
- public void removeAllConfiguration(String key) throws AiravataAPIInvocationException {
-// try{
-// getClient().getRegistryClient().removeAllConfiguration(key);
-// }catch (Exception e){
-// throw new AiravataAPIInvocationException(e);
-// }
- }
-
- @Override
- public void removeConfiguration(String key, String value) throws AiravataAPIInvocationException {
-// try{
-// getClient().getRegistryClient().removeConfiguration(key, value);
-// }catch (Exception e){
-// throw new AiravataAPIInvocationException(e);
-// }
- }
-
- @Override
- public void addWorkflowInterpreterURI(URI uri) throws AiravataAPIInvocationException {
-// try{
-// getClient().getRegistryClient().addWorkflowInterpreterURI(uri);
-// }catch (Exception e){
-// throw new AiravataAPIInvocationException(e);
-// }
- }
-
- @Override
- public void setEventingURI(URI uri) throws AiravataAPIInvocationException {
-// try{
-// getClient().getRegistryClient().setEventingURI(uri);
-// }catch (Exception e){
-// throw new AiravataAPIInvocationException(e);
-// }
- }
-
- @Override
- public void setMessageBoxURI(URI uri) throws AiravataAPIInvocationException {
-// try{
-// getClient().getRegistryClient().setMessageBoxURI(uri);
-// }catch (Exception e){
-// throw new AiravataAPIInvocationException(e);
-// }
- }
-
- @Override
- public void addWorkflowInterpreterURI(URI uri, Date expire) throws AiravataAPIInvocationException {
-// try{
-// getClient().getRegistryClient().addWorkflowInterpreterURI(uri, expire);
-// }catch (Exception e){
-// throw new AiravataAPIInvocationException(e);
-// }
- }
-
- @Override
- public void setEventingURI(URI uri, Date expire) throws AiravataAPIInvocationException {
-// try{
-// getClient().getRegistryClient().setEventingURI(uri, expire);
-// }catch (Exception e){
-// throw new AiravataAPIInvocationException(e);
-// }
- }
-
- @Override
- public void setMessageBoxURI(URI uri, Date expire) throws AiravataAPIInvocationException {
-// try{
-// getClient().getRegistryClient().setMessageBoxURI(uri, expire);
-// }catch (Exception e){
-// throw new AiravataAPIInvocationException(e);
-// }
- }
-
- @Override
- public void removeWorkflowInterpreterURI(URI uri) throws AiravataAPIInvocationException {
-// try{
-// getClient().getRegistryClient().removeWorkflowInterpreterURI(uri);
-// }catch (Exception e){
-// throw new AiravataAPIInvocationException(e);
-// }
- }
-
- @Override
- public void removeAllWorkflowInterpreterURI() throws AiravataAPIInvocationException {
-// try{
-// getClient().getRegistryClient().removeAllWorkflowInterpreterURI();
-// }catch (Exception e){
-// throw new AiravataAPIInvocationException(e);
-// }
- }
-
- @Override
- public void unsetEventingURI() throws AiravataAPIInvocationException {
-// try{
-// getClient().getRegistryClient().unsetEventingURI();
-// }catch (Exception e){
-// throw new AiravataAPIInvocationException(e);
-// }
- }
-
- @Override
- public void unsetMessageBoxURI() throws AiravataAPIInvocationException {
-// try{
-// getClient().getRegistryClient().unsetMessageBoxURI();
-// }catch (Exception e){
-// throw new AiravataAPIInvocationException(e);
-// }
- }
-
-// @Override
-// public Gateway getGateway() throws AiravataAPIInvocationException {
-// try {
-// return getClient().getRegistryClient().getGateway();
-// } catch (Exception e) {
-// throw new AiravataAPIInvocationException(e);
-// }
-// return null;
-// }
-
-// @Override
-// public AiravataUser getUser() throws AiravataAPIInvocationException {
-// try{
-// return getClient().getRegistryClient().getUser();
-// } catch (Exception e) {
-// throw new AiravataAPIInvocationException(e);
-// }
-// return null;
-// }
-
-}
http://git-wip-us.apache.org/repos/asf/airavata/blob/32fff944/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/AmazonWebServicesSettingsImpl.java
----------------------------------------------------------------------
diff --git a/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/AmazonWebServicesSettingsImpl.java b/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/AmazonWebServicesSettingsImpl.java
deleted file mode 100644
index 27bbd16..0000000
--- a/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/AmazonWebServicesSettingsImpl.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/*
- *
- * 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.client.impl;
-
-import org.apache.airavata.client.api.AmazonWebServicesSettings;
-
-public class AmazonWebServicesSettingsImpl implements AmazonWebServicesSettings {
- private String awsAccessKey;
- private String awsSecretKey;
- private String amiId;
- private String instanceId;
- private String instanceType;
- private String username;
-
- @Override
- public String getAccessKeyId() {
- return awsAccessKey;
- }
-
- @Override
- public String getAMIId() {
- return amiId;
- }
-
- @Override
- public String getInstanceId() {
- return instanceId;
- }
-
- @Override
- public String getInstanceType() {
- return instanceType;
- }
-
- @Override
- public String getSecretAccessKey() {
- return awsSecretKey;
- }
-
- @Override
- public String getUsername() {
- return username;
- }
-
- @Override
- public void setAccessKeyId(String accessKeyId) {
- this.awsAccessKey = accessKeyId;
- }
-
- @Override
- public void setAMIId(String amiId) {
- this.amiId = amiId;
- }
-
- @Override
- public void setInstanceId(String instanceId) {
- this.instanceId = instanceId;
- }
-
- @Override
- public void setInstanceType(String instanceType) {
- this.instanceType = instanceType;
- }
-
- @Override
- public void setSecretAccessKey(String secretAccessKey) {
- this.awsSecretKey = secretAccessKey;
- }
-
- @Override
- public void setUsername(String username) {
- this.username = username;
- }
-}
http://git-wip-us.apache.org/repos/asf/airavata/blob/32fff944/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/ApplicationManagerImpl.java
----------------------------------------------------------------------
diff --git a/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/ApplicationManagerImpl.java b/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/ApplicationManagerImpl.java
deleted file mode 100644
index f943174..0000000
--- a/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/ApplicationManagerImpl.java
+++ /dev/null
@@ -1,497 +0,0 @@
-///*
-// *
-// * 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.client.impl;
-//
-//import org.apache.airavata.client.AiravataClient;
-//import org.apache.airavata.client.api.ApplicationManager;
-//import org.apache.airavata.client.api.exception.AiravataAPIInvocationException;
-//import org.apache.airavata.client.api.exception.DescriptorAlreadyExistsException;
-//import org.apache.airavata.commons.gfac.type.ApplicationDescription;
-//import org.apache.airavata.commons.gfac.type.HostDescription;
-//import org.apache.airavata.commons.gfac.type.ServiceDescription;
-//
-//import java.util.List;
-//import java.util.Map;
-//
-//public class ApplicationManagerImpl implements ApplicationManager {
-// private AiravataClient client;
-//
-// public ApplicationManagerImpl(AiravataClient client) {
-// setClient(client);
-// }
-//
-// @Override
-// public ServiceDescription getServiceDescription(String serviceId)
-// throws AiravataAPIInvocationException {
-//// try {
-//// ServiceDescription desc = getClient().getRegistryClient().getServiceDescriptor(serviceId);
-//// if(desc!=null){
-//// return desc;
-//// }
-////// throw new AiravataAPIInvocationException(new Exception("Service Description not found in registry."));
-//// } catch (Exception e) {
-//// throw new AiravataAPIInvocationException(e);
-//// }
-// return null;
-// }
-//
-// @Override
-// public List<ServiceDescription> getAllServiceDescriptions()
-// throws AiravataAPIInvocationException {
-//// try {
-//// return getClient().getRegistryClient().getServiceDescriptors();
-//// } catch (Exception e) {
-//// throw new AiravataAPIInvocationException(e);
-//// }
-// return null;
-// }
-//
-// @Override
-// public String saveServiceDescription(ServiceDescription service)
-// throws AiravataAPIInvocationException {
-//// try {
-//// if (getClient().getRegistryClient().isServiceDescriptorExists(service.getType().getName())) {
-//// getClient().getRegistryClient().updateServiceDescriptor(service);
-//// }else{
-//// getClient().getRegistryClient().addServiceDescriptor(service);
-//// }
-//// return service.getType().getName();
-//// } catch (Exception e) {
-//// throw new AiravataAPIInvocationException(e);
-//// }
-// return null;
-// }
-//
-// @Override
-// public void addServiceDescription(ServiceDescription serviceDescription) throws DescriptorAlreadyExistsException,
-// AiravataAPIInvocationException{
-//// try {
-//// getClient().getRegistryClient().addServiceDescriptor(serviceDescription);
-//// } catch (org.apache.airavata.registry.api.exception.gateway.DescriptorAlreadyExistsException e) {
-//// throw new DescriptorAlreadyExistsException("Service descriptor "
-//// + serviceDescription.getType().getName()
-//// + " already exists.", e);
-//// } catch (RegException e) {
-//// throw new AiravataAPIInvocationException("An internal error occurred while trying to add service descriptor"
-//// + serviceDescription.getType().getName(),
-//// e);
-//// } catch (AiravataConfigurationException e) {
-//// throw new AiravataAPIInvocationException("Error retrieving registry controller. " +
-//// "An error occurred while trying to " +
-//// "add service descriptor" + serviceDescription.getType().getName(), e);
-//// }
-// }
-//
-// @Override
-// public void updateServiceDescription(ServiceDescription serviceDescription) throws AiravataAPIInvocationException {
-//// try {
-//// getClient().getRegistryClient().updateServiceDescriptor(serviceDescription);
-//// } catch (RegException e) {
-//// throw new AiravataAPIInvocationException("An internal error occurred while trying to add service descriptor"
-//// + serviceDescription.getType().getName(),
-//// e);
-//// } catch (AiravataConfigurationException e) {
-//// throw new AiravataAPIInvocationException("Error retrieving registry controller. " +
-//// "An error occurred while trying to " +
-//// "add service descriptor" + serviceDescription.getType().getName(), e);
-//// }
-// }
-//
-//
-// @Override
-// public void deleteServiceDescription(String serviceId)
-// throws AiravataAPIInvocationException {
-//// try {
-//// getClient().getRegistryClient().removeServiceDescriptor(serviceId);
-//// } catch (Exception e) {
-//// throw new AiravataAPIInvocationException(e);
-//// }
-//
-// }
-//
-// @Override
-// public List<ServiceDescription> searchServiceDescription(String nameRegEx)
-// throws AiravataAPIInvocationException {
-//// throw new AiravataAPIInvocationException(new UnimplementedRegOperationException());
-// return null;
-// }
-//
-// @Override
-// public ApplicationDescription getApplicationDescription(
-// String serviceId, String hostId)
-// throws AiravataAPIInvocationException {
-//// try {
-//// return getClient().getRegistryClient().getApplicationDescriptors(serviceId, hostId);
-//// } catch (Exception e) {
-//// throw new AiravataAPIInvocationException(e);
-//// }
-// return null;
-// }
-//
-// @Override
-// public String saveApplicationDescription(String serviceId, String hostId,
-// ApplicationDescription app)
-// throws AiravataAPIInvocationException {
-//// try {
-//// if (getClient().getRegistryClient().isApplicationDescriptorExists(serviceId, hostId, app.getType().getApplicationName().getStringValue())) {
-//// getClient().getRegistryClient().updateApplicationDescriptor(serviceId, hostId, app);
-//// }else{
-//// getClient().getRegistryClient().addApplicationDescriptor(serviceId, hostId, app);
-//// }
-//// return app.getType().getApplicationName().getStringValue();
-//// } catch (Exception e) {
-//// throw new AiravataAPIInvocationException(e);
-//// }
-// return null;
-// }
-//
-//
-// @Override
-// public void addApplicationDescription(ServiceDescription serviceDescription, HostDescription hostDescription,
-// ApplicationDescription applicationDeploymentDescription)
-// throws DescriptorAlreadyExistsException, AiravataAPIInvocationException{
-//
-//// try {
-//// getClient().getRegistryClient().addApplicationDescriptor(serviceDescription.getType().getName(),
-//// hostDescription.getType().getHostName(), applicationDeploymentDescription);
-//// } catch (org.apache.airavata.registry.api.exception.gateway.DescriptorAlreadyExistsException e) {
-//// throw new DescriptorAlreadyExistsException("Application descriptor " +
-//// applicationDeploymentDescription.getType().getApplicationName().getStringValue()
-//// + " already associated to host " + hostDescription.getType().getHostName()
-//// + " and service " + serviceDescription.getType().getName(), e);
-//// } catch (RegException e) {
-////
-//// throw new AiravataAPIInvocationException("An internal error occurred while trying to add " +
-//// "application descriptor " +
-//// applicationDeploymentDescription.getType().getApplicationName().getStringValue()
-//// + " associated to host " + hostDescription.getType().getHostName()
-//// + " and service " + serviceDescription.getType().getName(), e);
-////
-//// } catch (AiravataConfigurationException e) {
-////
-//// throw new AiravataAPIInvocationException("Error retrieving registry controller. " +
-//// "An error occurred while trying to add application descriptor " +
-//// applicationDeploymentDescription.getType().getApplicationName().getStringValue()
-//// + " associated to host " + hostDescription.getType().getHostName()
-//// + " and service " + serviceDescription.getType().getName(), e);
-//// }
-//
-// }
-//
-// @Override
-// public void updateApplicationDescription(ServiceDescription serviceDescription, HostDescription hostDescription,
-// ApplicationDescription applicationDeploymentDescription)
-// throws AiravataAPIInvocationException {
-//// try {
-//// getClient().getRegistryClient().updateApplicationDescriptor(serviceDescription.getType().getName(),
-//// hostDescription.getType().getHostName(), applicationDeploymentDescription);
-//// } catch (RegException e) {
-////
-//// throw new AiravataAPIInvocationException("An internal error occurred while trying to add " +
-//// "application descriptor " +
-//// applicationDeploymentDescription.getType().getApplicationName().getStringValue()
-//// + " associated to host " + hostDescription.getType().getHostName()
-//// + " and service " + serviceDescription.getType().getName(), e);
-////
-//// } catch (AiravataConfigurationException e) {
-////
-//// throw new AiravataAPIInvocationException("Error retrieving registry controller. " +
-//// "An error occurred while trying to add application descriptor " +
-//// applicationDeploymentDescription.getType().getApplicationName().getStringValue()
-//// + " associated to host " + hostDescription.getType().getHostName()
-//// + " and service " + serviceDescription.getType().getName(), e);
-//// }
-// }
-//
-//
-// @Override
-// public List<ApplicationDescription> searchApplicationDescription(
-// String serviceName, String hostName)
-// throws AiravataAPIInvocationException {
-//// throw new AiravataAPIInvocationException(new UnimplementedRegOperationException());
-// return null;
-// }
-//
-// @Override
-// public Map<String[], ApplicationDescription> getAllApplicationDescriptions()
-// throws AiravataAPIInvocationException {
-//// try {
-//// return getClient().getRegistryClient().getApplicationDescriptors();
-//// } catch (Exception e) {
-//// throw new AiravataAPIInvocationException(e);
-//// }
-// return null;
-// }
-//
-// @Override
-// public List<ApplicationDescription> searchApplicationDescription(
-// String serviceName, String hostName, String applicationName)
-// throws AiravataAPIInvocationException {
-//// throw new AiravataAPIInvocationException(new UnimplementedRegOperationException());
-// return null;
-// }
-//
-// @Override
-// public Map<HostDescription, List<ApplicationDescription>> searchApplicationDescription(
-// String serviceName) throws AiravataAPIInvocationException {
-//// try {
-//// Map<HostDescription, List<ApplicationDescription>> map=new HashMap<HostDescription, List<ApplicationDescription>>();
-//// Map<String, ApplicationDescription> applicationDescriptors = getClient().getRegistryClient().getApplicationDescriptors(serviceName);
-//// for (String hostName : applicationDescriptors.keySet()) {
-//// ArrayList<ApplicationDescription> list = new ArrayList<ApplicationDescription>();
-//// list.add(applicationDescriptors.get(hostName));
-//// map.put(getClient().getRegistryClient().getHostDescriptor(hostName),list);
-//// }
-//// return map;
-//// } catch (Exception e) {
-//// throw new AiravataAPIInvocationException(e);
-//// }
-// return null;
-// }
-//
-// @Override
-// public void deleteApplicationDescription(String serviceName,
-// String hostName, String applicationName)
-// throws AiravataAPIInvocationException {
-//// try {
-//// getClient().getRegistryClient().removeApplicationDescriptor(serviceName, hostName, applicationName);
-//// } catch (Exception e) {
-//// throw new AiravataAPIInvocationException(e);
-//// }
-//
-// }
-//
-// @Override
-// public HostDescription getHostDescription(String hostId)
-// throws AiravataAPIInvocationException {
-//// try {
-//// return getClient().getRegistryClient().getHostDescriptor(hostId);
-//// } catch (Exception e) {
-//// throw new AiravataAPIInvocationException(e);
-//// }
-// return null;
-// }
-//
-// @Override
-// public List<HostDescription> getAllHostDescriptions()
-// throws AiravataAPIInvocationException {
-//// try {
-//// return getClient().getRegistryClient().getHostDescriptors();
-//// } catch (Exception e) {
-//// throw new AiravataAPIInvocationException(e);
-//// }
-// return null;
-// }
-//
-// @Override
-// public String saveHostDescription(HostDescription host)
-// throws AiravataAPIInvocationException {
-//// try {
-//// if (getClient().getRegistryClient().isHostDescriptorExists(host.getType().getHostName())) {
-//// getClient().getRegistryClient().updateHostDescriptor(host);
-//// }else{
-//// getClient().getRegistryClient().addHostDescriptor(host);
-//// }
-//// return host.getType().getHostName();
-//// } catch (Exception e) {
-//// throw new AiravataAPIInvocationException(e);
-//// }
-// return null;
-// }
-//
-// @Override
-// public void addHostDescription(HostDescription host) throws DescriptorAlreadyExistsException,
-// AiravataAPIInvocationException{
-//
-//// try {
-//// getClient().getRegistryClient().addHostDescriptor(host);
-//// } catch (org.apache.airavata.registry.api.exception.gateway.DescriptorAlreadyExistsException e) {
-//// throw new DescriptorAlreadyExistsException("Host descriptor " + host.getType().getHostName()
-//// + " already exists.", e);
-//// } catch (RegException e) {
-//// throw new AiravataAPIInvocationException("An internal error occurred while trying to add host descriptor"
-//// + host.getType().getHostName(),
-//// e);
-//// } catch (AiravataConfigurationException e) {
-//// throw new AiravataAPIInvocationException("Error retrieving registry controller. " +
-//// "An error occurred while trying to " +
-//// "add host descriptor" + host.getType().getHostName(), e);
-//// }
-//
-// }
-//
-// @Override
-// public void updateHostDescription(HostDescription host) throws AiravataAPIInvocationException {
-//// try {
-//// getClient().getRegistryClient().updateHostDescriptor(host);
-//// } catch (RegException e) {
-//// throw new AiravataAPIInvocationException("An internal error occurred while trying to add host descriptor"
-//// + host.getType().getHostName(),
-//// e);
-//// } catch (AiravataConfigurationException e) {
-//// throw new AiravataAPIInvocationException("Error retrieving registry controller. " +
-//// "An error occurred while trying to " +
-//// "add host descriptor" + host.getType().getHostName(), e);
-//// }
-// }
-//
-//
-// @Override
-// public List<HostDescription> searchHostDescription(String regExName)
-// throws AiravataAPIInvocationException {
-//// throw new AiravataAPIInvocationException(new UnimplementedRegOperationException());
-// return null;
-// }
-//
-// @Override
-// public void deleteHostDescription(String hostId)
-// throws AiravataAPIInvocationException {
-//// try {
-//// getClient().getRegistryClient().removeHostDescriptor(hostId);
-//// } catch (Exception e) {
-//// throw new AiravataAPIInvocationException(e);
-//// }
-// }
-//
-// @Override
-// public boolean deployServiceOnHost(String serviceName, String hostName)
-// throws AiravataAPIInvocationException {
-//// throw new AiravataAPIInvocationException(new UnimplementedRegOperationException());
-// return false;
-// }
-//
-// @Override
-// public Map<String, ApplicationDescription> getApplicationDescriptors(String serviceName) throws AiravataAPIInvocationException {
-//// try{
-//// Map<String, ApplicationDescription> applicationDescriptors = getClient().getRegistryClient().getApplicationDescriptors(serviceName);
-//// return applicationDescriptors;
-//// } catch (Exception e) {
-//// throw new AiravataAPIInvocationException(e);
-//// }
-// return null;
-// }
-//
-// @Override
-// public boolean isHostDescriptorExists(String descriptorName) throws AiravataAPIInvocationException {
-//// try {
-//// return getClient().getRegistryClient().isHostDescriptorExists(descriptorName);
-//// } catch (Exception e) {
-//// throw new AiravataAPIInvocationException(e);
-//// }
-// return false;
-// }
-//
-// @Override
-// public void removeHostDescriptor(String hostName) throws AiravataAPIInvocationException {
-//// try {
-//// getClient().getRegistryClient().removeHostDescriptor(hostName);
-//// } catch (Exception e) {
-//// throw new AiravataAPIInvocationException(e);
-//// }
-// }
-//
-// @Override
-// public boolean isServiceDescriptorExists(String descriptorName) throws AiravataAPIInvocationException {
-//// try {
-//// return getClient().getRegistryClient().isServiceDescriptorExists(descriptorName);
-//// } catch (Exception e) {
-//// throw new AiravataAPIInvocationException(e);
-//// }
-// return false;
-// }
-//
-// @Override
-// public void removeServiceDescriptor(String serviceName) throws AiravataAPIInvocationException {
-//// try {
-//// getClient().getRegistryClient().removeServiceDescriptor(serviceName);
-//// } catch (Exception e) {
-//// throw new AiravataAPIInvocationException(e);
-//// }
-// }
-//
-// @Override
-// public void removeApplicationDescriptor(String serviceName, String hostName, String applicationName) throws AiravataAPIInvocationException {
-//// try {
-//// getClient().getRegistryClient().removeApplicationDescriptor(serviceName, hostName, applicationName);
-//// } catch (Exception e) {
-//// throw new AiravataAPIInvocationException(e);
-//// }
-// }
-//
-// @Override
-// public void updateHostDescriptor(HostDescription descriptor) throws AiravataAPIInvocationException {
-//// try {
-//// getClient().getRegistryClient().updateHostDescriptor(descriptor);
-//// } catch (Exception e) {
-//// throw new AiravataAPIInvocationException(e);
-//// }
-// }
-//
-// @Override
-// public void updateServiceDescriptor(ServiceDescription descriptor) throws AiravataAPIInvocationException {
-//// try {
-//// getClient().getRegistryClient().updateServiceDescriptor(descriptor);
-//// } catch (Exception e) {
-//// throw new AiravataAPIInvocationException(e);
-//// }
-// }
-//
-// @Override
-// public void updateApplicationDescriptor(String serviceName, String hostName, ApplicationDescription descriptor) throws AiravataAPIInvocationException {
-//// try {
-//// getClient().getRegistryClient().updateApplicationDescriptor(serviceName, hostName, descriptor);
-//// } catch (Exception e) {
-//// throw new AiravataAPIInvocationException(e);
-//// }
-// }
-//
-// @Override
-// public ApplicationDescription getApplicationDescriptor(String serviceName, String hostname, String applicationName) throws AiravataAPIInvocationException {
-//// try {
-//// return getClient().getRegistryClient().getApplicationDescriptor(serviceName, hostname, applicationName);
-//// } catch (Exception e) {
-//// throw new AiravataAPIInvocationException(e);
-//// }
-// return null;
-// }
-//
-// public AiravataClient getClient() {
-// return client;
-// }
-//
-// public void setClient(AiravataClient client) {
-// this.client = client;
-// }
-//
-// @Override
-// public boolean isApplicationDescriptorExists(String serviceName,
-// String hostName, String descriptorName)
-// throws AiravataAPIInvocationException {
-//// try {
-//// return getClient().getRegistryClient().isApplicationDescriptorExists(serviceName, hostName, descriptorName);
-//// } catch (Exception e) {
-//// throw new AiravataAPIInvocationException(e);
-//// }
-// return false;
-// }
-//
-//}
http://git-wip-us.apache.org/repos/asf/airavata/blob/32fff944/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/ApplicationOutputDataSettingsImpl.java
----------------------------------------------------------------------
diff --git a/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/ApplicationOutputDataSettingsImpl.java b/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/ApplicationOutputDataSettingsImpl.java
deleted file mode 100644
index 5fc4e5b..0000000
--- a/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/ApplicationOutputDataSettingsImpl.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
- *
- * 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.client.impl;
-
-import org.apache.airavata.client.api.OutputDataSettings;
-
-public class ApplicationOutputDataSettingsImpl implements OutputDataSettings {
- private String nodeId;
- private String outputDataDirectory;
- private String dataRegistry;
- private Boolean dataPersistent;
-
- public ApplicationOutputDataSettingsImpl(String nodeId) {
- this(nodeId, null,null,null);
- }
-
- public ApplicationOutputDataSettingsImpl(String nodeId, String outputDataDirectory, String dataRegistryUrl, Boolean dataPersistent) {
- setNodeId(nodeId);
- setOutputDataDirectory(outputDataDirectory);
- setDataRegistryUrl(dataRegistryUrl);
- setDataPersistent(dataPersistent);
- }
-
- @Override
- public String getOutputDataDirectory() {
- return outputDataDirectory;
- }
-
- @Override
- public String getDataRegistryUrl() {
- return dataRegistry;
- }
-
- @Override
- public Boolean isDataPersistent() {
- return dataPersistent;
- }
-
- @Override
- public void setOutputDataDirectory(String outputDataDirectory) {
- this.outputDataDirectory=outputDataDirectory;
- }
-
- @Override
- public void setDataRegistryUrl(String dataRegistryUrl) {
- this.dataRegistry=dataRegistryUrl;
- }
-
- @Override
- public void setDataPersistent(Boolean isDataPersistance) {
- this.dataPersistent=isDataPersistance;
- }
-
- @Override
- public void resetOutputDataDirectory() {
- this.outputDataDirectory=null;
- }
-
- @Override
- public void resetDataRegistryUrl() {
- this.dataRegistry=null;
- }
-
- @Override
- public void resetDataPersistent() {
- this.dataPersistent=null;
- }
-
- @Override
- public String getNodeId() {
- return nodeId;
- }
-
- @Override
- public void setNodeId(String nodeId) {
- this.nodeId=nodeId;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/airavata/blob/32fff944/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/CredentialStoreManagerImpl.java
----------------------------------------------------------------------
diff --git a/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/CredentialStoreManagerImpl.java b/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/CredentialStoreManagerImpl.java
deleted file mode 100644
index d8d090b..0000000
--- a/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/CredentialStoreManagerImpl.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- *
- * 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.client.impl;
-
-import org.apache.airavata.client.AiravataClient;
-import org.apache.airavata.client.api.CredentialStoreManager;
-import org.apache.airavata.client.api.exception.AiravataAPIInvocationException;
-
-public class CredentialStoreManagerImpl implements CredentialStoreManager{
-
- private AiravataClient client;
-
- public CredentialStoreManagerImpl(AiravataClient client) {
- this.client = client;
- }
-
- @Override
- public boolean isCredentialExist(String gatewayId, String tokenId) throws AiravataAPIInvocationException {
-// if(gatewayId==null || gatewayId.isEmpty() || tokenId == null || tokenId.isEmpty()) {
-// return false;
-// }
-// try {
-// return client.getRegistryClient().isCredentialExist(gatewayId, tokenId);
-// } catch (Exception e) {
-// throw new AiravataAPIInvocationException(e);
-// }
- return false;
- }
-
- @Override
- public String getCredentialPublicKey(String gatewayId, String tokenId) throws AiravataAPIInvocationException {
-// try {
-// return client.getRegistryClient().getCredentialPublicKey(gatewayId, tokenId);
-// } catch (Exception e) {
-// throw new AiravataAPIInvocationException(e);
-// }
- return null;
- }
-
- @Override
- public String createCredential(String gatewayId, String tokenId) throws AiravataAPIInvocationException {
-// try {
-// return client.getRegistryClient().createCredential(gatewayId, tokenId);
-// } catch (Exception e) {
-// throw new AiravataAPIInvocationException(e);
-// }
- return null;
- }
-
- @Override
- public String createCredential(String gatewayId, String tokenId, String username) throws AiravataAPIInvocationException {
-// try {
-// return client.getRegistryClient().createCredential(gatewayId, tokenId, username);
-// } catch (Exception e) {
-// throw new AiravataAPIInvocationException(e);
-// }
- return null;
- }
-
-}
[6/9] airavata git commit: removing previous airavata client API -
AIRAVATA-1371
Posted by ch...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/32fff944/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/CredentialStoreSecuritySettingsImpl.java
----------------------------------------------------------------------
diff --git a/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/CredentialStoreSecuritySettingsImpl.java b/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/CredentialStoreSecuritySettingsImpl.java
deleted file mode 100644
index 9f2c8a8..0000000
--- a/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/CredentialStoreSecuritySettingsImpl.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- *
- * 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.client.impl;
-
-import org.apache.airavata.client.api.CredentialStoreSecuritySettings;
-
-/**
- * Implementation of credential store security settings class.
- */
-public class CredentialStoreSecuritySettingsImpl implements CredentialStoreSecuritySettings {
-
- private String tokenId;
- private String portalUserId;
- private String gatewayId;
-
- public CredentialStoreSecuritySettingsImpl(String tokenId) {
- this.tokenId = tokenId;
- }
-
- public CredentialStoreSecuritySettingsImpl() {
- }
-
- public void setTokenId(String tokenId) {
- this.tokenId = tokenId;
- }
-
- @Override
- public void setPortalUser(String portalUserName) {
- this.portalUserId = portalUserName;
- }
-
- @Override
- public String getPortalUser() {
- return this.portalUserId;
- }
-
- @Override
- public void setGatewayId(String gatewayId) {
- this.gatewayId = gatewayId;
- }
-
- @Override
- public String getGatewayId() {
- return this.gatewayId;
- }
-
- public String getTokenId() {
- return tokenId;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/airavata/blob/32fff944/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/ExecutionManagerImpl.java
----------------------------------------------------------------------
diff --git a/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/ExecutionManagerImpl.java b/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/ExecutionManagerImpl.java
deleted file mode 100644
index e220027..0000000
--- a/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/ExecutionManagerImpl.java
+++ /dev/null
@@ -1,419 +0,0 @@
-/*
- *
- * 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.client.impl;
-
-import org.apache.airavata.client.AiravataAPIUtils;
-import org.apache.airavata.client.AiravataClient;
-import org.apache.airavata.client.api.ExecutionManager;
-import org.apache.airavata.client.api.ExperimentAdvanceOptions;
-import org.apache.airavata.client.api.exception.AiravataAPIInvocationException;
-import org.apache.airavata.client.stub.interpretor.NameValue;
-import org.apache.airavata.client.stub.interpretor.WorkflowInterpretorStub;
-import org.apache.airavata.common.utils.XMLUtil;
-import org.apache.airavata.common.workflow.execution.context.WorkflowContextHeaderBuilder;
-import org.apache.airavata.workflow.model.wf.Workflow;
-import org.apache.airavata.workflow.model.wf.WorkflowInput;
-import org.apache.airavata.ws.monitor.*;
-import org.apache.airavata.ws.monitor.MonitorUtil.EventType;
-import org.apache.axiom.om.OMElement;
-import org.apache.axiom.om.impl.llom.util.AXIOMUtil;
-import org.apache.axis2.AxisFault;
-
-import javax.xml.stream.XMLStreamException;
-import java.net.URISyntaxException;
-import java.rmi.RemoteException;
-import java.util.Calendar;
-import java.util.List;
-
-public class ExecutionManagerImpl implements ExecutionManager {
- private AiravataClient client;
-
- public ExecutionManagerImpl() {
- }
-
- public ExecutionManagerImpl(AiravataClient client) {
- setClient(client);
- }
-
- @Override
- public String runExperiment(String workflowTemplateId,
- List<WorkflowInput> inputs) throws AiravataAPIInvocationException {
- ExperimentAdvanceOptions options = createExperimentAdvanceOptions(workflowTemplateId+"_"+Calendar.getInstance().getTime().toString(), getClient().getCurrentUser(), null);
- return runExperiment(workflowTemplateId, inputs ,options);
- }
-
- @Override
- public String runExperiment(String workflow,
- List<WorkflowInput> inputs, ExperimentAdvanceOptions options)
- throws AiravataAPIInvocationException {
- return runExperimentGeneral(extractWorkflow(workflow), inputs, options, null);
- }
-
-
- @Override
- public String runExperiment(Workflow workflow, List<WorkflowInput> inputs, ExperimentAdvanceOptions options)
- throws AiravataAPIInvocationException {
- return runExperimentGeneral(workflow,inputs, options, null).toString();
- }
-
-
- @Override
- public ExperimentAdvanceOptions createExperimentAdvanceOptions()
- throws AiravataAPIInvocationException {
- return new ExperimentAdvanceOptions();
- }
-
- @Override
- public ExperimentAdvanceOptions createExperimentAdvanceOptions(
- String experimentName, String experimentUser,
- String experimentMetadata) throws AiravataAPIInvocationException {
- ExperimentAdvanceOptions options = createExperimentAdvanceOptions();
- options.setExperimentName(experimentName);
- options.setExperimentCustomMetadata(experimentMetadata);
- options.setExperimentExecutionUser(experimentUser);
- return options;
- }
-
- @Override
- public void waitForExperimentTermination(String experimentId)
- throws AiravataAPIInvocationException {
-// Monitor experimentMonitor = getExperimentMonitor(experimentId, new EventDataListenerAdapter() {
-// @Override
-// public void notify(EventDataRepository eventDataRepo,
-// EventData eventData) {
-// if (eventData.getType()==EventType.WORKFLOW_TERMINATED){
-// getMonitor().stopMonitoring();
-// }
-// }
-// });
-// experimentMonitor.startMonitoring();
-// try {
-// WorkflowExecutionStatus workflowInstanceStatus = getClient().getProvenanceManager().getWorkflowInstanceStatus(experimentId, experimentId);
-// if (workflowInstanceStatus.getExecutionStatus()==State.FINISHED || workflowInstanceStatus.getExecutionStatus()==State.FAILED){
-// experimentMonitor.stopMonitoring();
-// return;
-// }
-// } catch (AiravataAPIInvocationException e) {
-// //Workflow may not have started yet. Best to use the monitor to follow the progress
-// }
-// experimentMonitor.waitForCompletion();
- }
-
- @Override
- public Monitor getExperimentMonitor(String experimentId)
- throws AiravataAPIInvocationException {
- return getExperimentMonitor(experimentId,null);
- }
-
- @Override
- public Monitor getExperimentMonitor(String experimentId,final EventDataListener listener)
- throws AiravataAPIInvocationException {
- MonitorConfiguration monitorConfiguration;
- try {
- monitorConfiguration = new MonitorConfiguration(
- getClient().getClientConfiguration().getMessagebrokerURL().toURI(), experimentId,
- true, getClient().getClientConfiguration().getMessageboxURL().toURI());
- final Monitor monitor = new Monitor(monitorConfiguration);
- monitor.printRawMessage(false);
- if (listener!=null) {
- monitor.getEventDataRepository().registerEventListener(listener);
- listener.setExperimentMonitor(monitor);
- }
- if (!monitor.getExperimentId().equals(">")){
- monitor.getEventDataRepository().registerEventListener(new EventDataListenerAdapter() {
- @Override
- public void notify(EventDataRepository eventDataRepo, EventData eventData) {
-// if (eventData.getType()==EventType.WORKFLOW_TERMINATED || eventData.getType()==EventType.SENDING_FAULT){
-// monitor.stopMonitoring();
-// }
- }
- });
- }
- return monitor;
- } catch (URISyntaxException e) {
- throw new AiravataAPIInvocationException(e);
- }
- }
-
- @Override
- public String runExperiment(String workflow, List<WorkflowInput> inputs,
- ExperimentAdvanceOptions options, EventDataListener listener)
- throws AiravataAPIInvocationException {
- return runExperimentGeneral(extractWorkflow(workflow), inputs, options, listener);
- }
-
- public AiravataClient getClient() {
- return client;
- }
- public void setClient(AiravataClient client) {
- this.client = client;
- }
-
- private String runExperimentGeneral(Workflow workflowObj, List<WorkflowInput> inputs, ExperimentAdvanceOptions options, EventDataListener listener) throws AiravataAPIInvocationException {
-// try {
-// List<NameValue> inputValues = new ArrayList<NameValue>();
-// for (WorkflowInput input : inputs) {
-// NameValue nameValue = new NameValue();
-// nameValue.setName(input.getName());
-// nameValue.setValue(String.valueOf(input.getValue()==null?input.getDefaultValue():input.getValue()));
-// inputValues.add(nameValue);
-// }
-// String workflowString = XMLUtil.xmlElementToString(workflowObj.toXML());
-// List<WSComponentPort> ports = getWSComponentPortInputs(workflowObj);
-// for (WorkflowInput input : inputs) {
-// WSComponentPort port = getWSComponentPort(input.getName(),
-// ports);
-// if (port != null) {
-// port.setValue(input.getValue());
-// }
-// }
-// for (WSComponentPort port : ports) {
-// NameValue nameValue = new NameValue();
-// nameValue.setName(port.getName());
-// if (port.getValue() == null) {
-// nameValue.setValue(port.getDefaultValue());
-// } else {
-// nameValue.setValue(port.getValue().toString());
-// }
-// inputValues.add(nameValue);
-// }
-// String experimentID=options.getCustomExperimentId();
-// String workflowTemplateName = workflowObj.getName();
-// if (experimentID == null || experimentID.isEmpty()) {
-// experimentID = workflowTemplateName + "_" + UUID.randomUUID();
-// }
-// getClient().getProvenanceManager().setWorkflowInstanceTemplateName(experimentID,workflowTemplateName);
-//
-// //TODO - fix user passing
-// String submissionUser = getClient().getUserManager().getAiravataUser();
-// String executionUser=options.getExperimentExecutionUser();
-// if (executionUser==null){
-// executionUser=submissionUser;
-// }
-// WorkflowContextHeaderBuilder builder = AiravataAPIUtils.createWorkflowContextHeaderBuilder(options, executionUser, submissionUser);
-// runPreWorkflowExecutionTasks(experimentID, executionUser, options.getExperimentMetadata(), options.getExperimentName());
-// NameValue[] inputVals = inputValues.toArray(new NameValue[] {});
-// if (listener!=null){
-// getExperimentMonitor(experimentID, listener).startMonitoring();
-// }
-// launchWorkflow(experimentID, workflowString, inputVals, builder);
-// return experimentID;
-//// } catch (GraphException e) {
-//// throw new AiravataAPIInvocationException(e);
-//// } catch (ComponentException e) {
-//// throw new AiravataAPIInvocationException(e);
-// } catch (Exception e) {
-// throw new AiravataAPIInvocationException("Error working with Airavata Registry: " + e.getLocalizedMessage(), e);
-// }
- return null;
- }
-
- private Workflow extractWorkflow(String workflowName) throws AiravataAPIInvocationException {
- Workflow workflowObj = null;
- //FIXME - There should be a better way to figure-out if the passed string is a name or an xml
- if(!workflowName.contains("http://airavata.apache.org/xbaya/xwf")){//(getClient().getWorkflowManager().isWorkflowExists(workflowName)) {
- workflowObj = getClient().getWorkflowManager().getWorkflow(workflowName);
- }else {
- try{
- workflowObj = getClient().getWorkflowManager().getWorkflowFromString(workflowName);
- }catch (AiravataAPIInvocationException e){
- getClient().getWorkflowManager().getWorkflow(workflowName);
- }
- }
- return workflowObj;
- }
-
-// private List<WSComponentPort> getWSComponentPortInputs(Workflow workflow)
-// throws GraphException, ComponentException {
-// workflow.createScript();
-// List<WSComponentPort> inputs = workflow.getInputs();
-// return inputs;
-// }
-//
-// private WSComponentPort getWSComponentPort(String name,
-// List<WSComponentPort> ports) {
-// for (WSComponentPort port : ports) {
-// if (port.getName().equals(name)) {
-// return port;
-// }
-// }
-// return null;
-// }
-
- private void launchWorkflow(String experimentId, String workflowGraph, NameValue[] inputs,
- WorkflowContextHeaderBuilder builder) throws AiravataAPIInvocationException {
- try {
- builder.getWorkflowMonitoringContext().setExperimentId(experimentId);
- WorkflowInterpretorStub stub = new WorkflowInterpretorStub(getClient().getAiravataManager().getWorkflowInterpreterServiceURL().toString());
- OMElement wchOMElement = AXIOMUtil.stringToOM(XMLUtil.xmlElementToString(builder
- .getXml()));
- wchOMElement.addAttribute("submissionUser", builder.getSubmissionUser(), wchOMElement.getNamespace());
- stub._getServiceClient().addHeader(
- wchOMElement);
- stub.launchWorkflow(workflowGraph, experimentId, inputs);
- } catch (AxisFault e) {
- e.printStackTrace();
- } catch (XMLStreamException e) {
- e.printStackTrace();
- } catch (RemoteException e) {
- e.printStackTrace();
- }
- }
-
- private void runPreWorkflowExecutionTasks(String experimentId, String user,
- String metadata, String experimentName) throws AiravataAPIInvocationException {
-// if (user != null) {
-// getClient().getProvenanceManager().setExperimentUser(experimentId, user);
-// }
-// if (metadata != null) {
-// getClient().getProvenanceManager().setExperimentMetadata(experimentId, metadata);
-// }
-// if (experimentName == null) {
-// experimentName = experimentId;
-// }
-// getClient().getProvenanceManager().setExperimentName(experimentId, experimentName);
-
- }
-
- public static void main(String[] args) {
- ExecutionManagerImpl a = new ExecutionManagerImpl(null);
- try {
- ExperimentAdvanceOptions b = a.createExperimentAdvanceOptions();
- b.getCustomWorkflowOutputDataSettings().addNewOutputDataSettings("la", "di", "da", false);
- WorkflowContextHeaderBuilder c = AiravataAPIUtils.createWorkflowContextHeaderBuilder(b, "sheeeeeeeeeeee","meeee");
- System.out.println(XMLUtil.xmlElementToString(c.getXml()));
- } catch (AiravataAPIInvocationException e) {
- e.printStackTrace();
- }
- }
-
-// @Override
-// public List<ExperimentExecutionError> getExperimentExecutionErrors(
-// String experimentId) throws AiravataAPIInvocationException {
-//// try {
-//// return getClient().getRegistryClient().getExperimentExecutionErrors(experimentId);
-//// } catch (Exception e) {
-//// throw new AiravataAPIInvocationException(e);
-//// }
-// return null;
-// }
-
-// @Override
-// public List<WorkflowExecutionError> getWorkflowExecutionErrors(
-// String experimentId, String workflowInstanceId)
-// throws AiravataAPIInvocationException {
-//// try {
-//// return getClient().getRegistryClient().getWorkflowExecutionErrors(experimentId,
-//// workflowInstanceId);
-//// } catch (Exception e) {
-//// throw new AiravataAPIInvocationException(e);
-//// }
-// return null;
-// }
-
-// @Override
-// public List<NodeExecutionError> getNodeExecutionErrors(String experimentId,
-// String workflowInstanceId, String nodeId)
-// throws AiravataAPIInvocationException {
-//// try {
-//// return getClient().getRegistryClient().getNodeExecutionErrors(experimentId,
-//// workflowInstanceId, nodeId);
-//// } catch (Exception e) {
-//// throw new AiravataAPIInvocationException(e);
-//// }
-// return null;
-// }
-
-// @Override
-// public List<ApplicationJobExecutionError> getApplicationJobErrors(String experimentId,
-// String workflowInstanceId, String nodeId, String gfacJobId)
-// throws AiravataAPIInvocationException {
-// try {
-// return getClient().getRegistryClient().getApplicationJobErrors(experimentId,
-// workflowInstanceId, nodeId, gfacJobId);
-// } catch (Exception e) {
-// throw new AiravataAPIInvocationException(e);
-// }
-// }
-
-// @Override
-// public List<ApplicationJobExecutionError> getApplicationJobErrors(String gfacJobId)
-// throws AiravataAPIInvocationException {
-// try {
-// return getClient().getRegistryClient().getApplicationJobErrors(gfacJobId);
-// } catch (Exception e) {
-// throw new AiravataAPIInvocationException(e);
-// }
-// }
-
-// @Override
-// public List<ExecutionError> getExecutionErrors(String experimentId,
-// String workflowInstanceId, String nodeId, String gfacJobId,
-// Source... filterBy) throws AiravataAPIInvocationException {
-// try {
-// return getClient().getRegistryClient().getExecutionErrors(experimentId,
-// workflowInstanceId, nodeId, gfacJobId, filterBy);
-// } catch (Exception e) {
-// throw new AiravataAPIInvocationException(e);
-// }
-// }
-
-// @Override
-// public int addExperimentError(ExperimentExecutionError error)
-// throws AiravataAPIInvocationException {
-// try {
-// return getClient().getRegistryClient().addExperimentError(error);
-// } catch (Exception e) {
-// throw new AiravataAPIInvocationException(e);
-// }
-// }
-
-// @Override
-// public int addWorkflowExecutionError(WorkflowExecutionError error)
-// throws AiravataAPIInvocationException {
-// try {
-// return getClient().getRegistryClient().addWorkflowExecutionError(error);
-// } catch (Exception e) {
-// throw new AiravataAPIInvocationException(e);
-// }
-// }
-
-// @Override
-// public int addNodeExecutionError(NodeExecutionError error)
-// throws AiravataAPIInvocationException {
-// try {
-// return getClient().getRegistryClient().addNodeExecutionError(error);
-// } catch (Exception e) {
-// throw new AiravataAPIInvocationException(e);
-// }
-// }
-
-// @Override
-// public int addApplicationJobExecutionError(ApplicationJobExecutionError error)
-// throws AiravataAPIInvocationException {
-// try {
-// return getClient().getRegistryClient().addApplicationJobExecutionError(error);
-// } catch (Exception e) {
-// throw new AiravataAPIInvocationException(e);
-// }
-// }
-}
http://git-wip-us.apache.org/repos/asf/airavata/blob/32fff944/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/ExecutionManagerThriftImpl.java
----------------------------------------------------------------------
diff --git a/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/ExecutionManagerThriftImpl.java b/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/ExecutionManagerThriftImpl.java
deleted file mode 100644
index 1924b29..0000000
--- a/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/ExecutionManagerThriftImpl.java
+++ /dev/null
@@ -1,467 +0,0 @@
-///*
-// *
-// * 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.client.impl;
-//
-//import org.apache.airavata.client.AiravataClient;
-//import org.apache.airavata.client.api.*;
-//import org.apache.airavata.client.api.ExperimentAdvanceOptions;
-//import org.apache.airavata.client.api.HPCSettings;
-//import org.apache.airavata.client.api.HostSchedulingSettings;
-//import org.apache.airavata.client.api.NodeSettings;
-//import org.apache.airavata.client.api.OutputDataSettings;
-//import org.apache.airavata.client.api.SecuritySettings;
-//import org.apache.airavata.client.api.WorkflowOutputDataSettings;
-//import org.apache.airavata.client.api.WorkflowSchedulingSettings;
-//import org.apache.airavata.client.api.exception.AiravataAPIInvocationException;
-//import org.apache.airavata.client.tools.NameValuePairType;
-//import org.apache.airavata.registry.api.ExecutionErrors;
-//import org.apache.airavata.registry.api.workflow.*;
-//import org.apache.airavata.workflow.model.wf.Workflow;
-//import org.apache.airavata.workflow.model.wf.WorkflowInput;
-//import org.apache.airavata.ws.monitor.*;
-//import org.apache.airavata.interpreter.service.client.ExecutionClient;
-//import org.apache.thrift.TException;
-//
-//import java.net.URISyntaxException;
-//import java.util.*;
-//
-//public class ExecutionManagerThriftImpl implements ExecutionManager {
-// private AiravataClient client;
-//
-// public ExecutionManagerThriftImpl() {
-// }
-//
-// public ExecutionManagerThriftImpl(AiravataClient client) {
-// setClient(client);
-// }
-//
-// public AiravataClient getClient() {
-// return client;
-// }
-//
-// public void setClient(AiravataClient client) {
-// this.client = client;
-// }
-//
-// public String runExperiment(String workflowTemplateId, List<WorkflowInput> inputs) throws AiravataAPIInvocationException {
-// ExperimentAdvanceOptions options = createExperimentAdvanceOptions(workflowTemplateId + "_" + Calendar.getInstance().getTime().toString(), getClient().getCurrentUser(), null);
-// return runExperimentGeneral(workflowTemplateId, inputs, options, null);
-//
-// }
-//
-// public String runExperiment(String workflow, List<WorkflowInput> inputs, ExperimentAdvanceOptions options) throws AiravataAPIInvocationException {
-// return runExperimentGeneral(workflow, inputs, options, null);
-// }
-//
-// public String runExperiment(String workflow, List<WorkflowInput> inputs, ExperimentAdvanceOptions options, EventDataListener listener) throws AiravataAPIInvocationException {
-// return runExperimentGeneral(workflow, inputs, options, listener);
-// }
-//
-// public String runExperiment(Workflow workflow, List<WorkflowInput> inputs, ExperimentAdvanceOptions options) throws AiravataAPIInvocationException {
-// return runExperimentGeneral(workflow.getName(), inputs, options, null);
-// }
-//
-// private String runExperimentGeneral(String wfname, List<WorkflowInput> inputs, ExperimentAdvanceOptions options, EventDataListener listener) throws AiravataAPIInvocationException {
-// Workflow workflowObj = null;
-// try {
-//// workflowObj = extractWorkflow(wfname);
-//// String experimentID = options.getCustomExperimentId();
-//// String workflowTemplateName = workflowObj.getName();
-//// if (experimentID == null || experimentID.isEmpty()) {
-//// experimentID = workflowTemplateName + "_" + UUID.randomUUID();
-//// }
-//// options.setCustomExperimentId(experimentID);
-//// getClient().getProvenanceManager().setWorkflowInstanceTemplateName(experimentID, workflowTemplateName);
-////
-//// String submissionUser = getClient().getUserManager().getAiravataUser();
-//// String executionUser=options.getExperimentExecutionUser();
-//// if (executionUser==null){
-//// executionUser=submissionUser;
-//// }
-//// options.setExperimentExecutionUser(executionUser);
-//// runPreWorkflowExecutionTasks(experimentID, executionUser, options.getExperimentMetadata(), options.getExperimentName());
-////
-//// String workflowContent = extractWorkflowContent(wfname);
-// Map<String, String> workflowInputs = new HashMap<String, String>();
-// for (WorkflowInput workflowInput : inputs){
-// String name = workflowInput.getName();
-// String value = (String)workflowInput.getValue();
-// workflowInputs.put(name, value);
-// }
-//// if (listener!=null){
-//// getExperimentMonitor(experimentID, listener).startMonitoring();
-//// }
-// org.apache.airavata.experiment.execution.ExperimentAdvanceOptions experimentAdvanceOptions = generateAdvancedOptions(options);
-// return getExecutionClient().runExperiment(wfname, workflowInputs, experimentAdvanceOptions);
-// } catch (TException e) {
-// throw new AiravataAPIInvocationException("Error occured while running the workflow", e);
-// }
-// }
-//
-// private void runPreWorkflowExecutionTasks(String experimentId, String user,
-// String metadata, String experimentName) throws AiravataAPIInvocationException {
-// if (user != null) {
-// getClient().getProvenanceManager().setExperimentUser(experimentId, user);
-// }
-// if (metadata != null) {
-// getClient().getProvenanceManager().setExperimentMetadata(experimentId, metadata);
-// }
-// if (experimentName == null) {
-// experimentName = experimentId;
-// }
-// getClient().getProvenanceManager().setExperimentName(experimentId, experimentName);
-// }
-//
-// public Monitor getExperimentMonitor(String experimentId) throws AiravataAPIInvocationException {
-// return getExperimentMonitor(experimentId,null);
-// }
-//
-// public Monitor getExperimentMonitor(String experimentId, EventDataListener listener) throws AiravataAPIInvocationException {
-// MonitorConfiguration monitorConfiguration;
-// try {
-// monitorConfiguration = new MonitorConfiguration(
-// getClient().getClientConfiguration().getMessagebrokerURL().toURI(), experimentId,
-// true, getClient().getClientConfiguration().getMessageboxURL().toURI());
-// final Monitor monitor = new Monitor(monitorConfiguration);
-// monitor.printRawMessage(false);
-// if (listener!=null) {
-// monitor.getEventDataRepository().registerEventListener(listener);
-// listener.setExperimentMonitor(monitor);
-// }
-// if (!monitor.getExperimentId().equals(">")){
-// monitor.getEventDataRepository().registerEventListener(new EventDataListenerAdapter() {
-// public void notify(EventDataRepository eventDataRepo, EventData eventData) {
-// if (eventData.getType()== MonitorUtil.EventType.WORKFLOW_TERMINATED || eventData.getType()== MonitorUtil.EventType.SENDING_FAULT){
-// monitor.stopMonitoring();
-// }
-// }
-// });
-// }
-// return monitor;
-// } catch (URISyntaxException e) {
-// throw new AiravataAPIInvocationException(e);
-// }
-// }
-//
-// public ExperimentAdvanceOptions createExperimentAdvanceOptions() throws AiravataAPIInvocationException {
-// return new ExperimentAdvanceOptions();
-// }
-//
-// public ExperimentAdvanceOptions createExperimentAdvanceOptions(String experimentName, String experimentUser, String experimentMetadata) throws AiravataAPIInvocationException {
-// ExperimentAdvanceOptions options = createExperimentAdvanceOptions();
-// options.setExperimentName(experimentName);
-// options.setExperimentCustomMetadata(experimentMetadata);
-// options.setExperimentExecutionUser(experimentUser);
-// return options;
-// }
-//
-// public void waitForExperimentTermination(String experimentId) throws AiravataAPIInvocationException {
-// Monitor experimentMonitor = getExperimentMonitor(experimentId, new EventDataListenerAdapter() {
-// public void notify(EventDataRepository eventDataRepo,
-// EventData eventData) {
-// if (eventData.getType()== MonitorUtil.EventType.WORKFLOW_TERMINATED){
-// getMonitor().stopMonitoring();
-// }
-// }
-// });
-// experimentMonitor.startMonitoring();
-// try {
-// WorkflowExecutionStatus workflowInstanceStatus = getClient().getProvenanceManager().getWorkflowInstanceStatus(experimentId, experimentId);
-// if (workflowInstanceStatus.getExecutionStatus()== WorkflowExecutionStatus.State.FINISHED || workflowInstanceStatus.getExecutionStatus()== WorkflowExecutionStatus.State.FAILED){
-// experimentMonitor.stopMonitoring();
-// return;
-// }
-// } catch (AiravataAPIInvocationException e) {
-// //Workflow may not have started yet. Best to use the monitor to follow the progress
-// }
-// experimentMonitor.waitForCompletion();
-//
-// }
-//
-// public List<ExperimentExecutionError> getExperimentExecutionErrors(String experimentId) throws AiravataAPIInvocationException {
-// try {
-// return getClient().getRegistryClient().getExperimentExecutionErrors(experimentId);
-// } catch (Exception e) {
-// throw new AiravataAPIInvocationException(e);
-// }
-// }
-//
-// public List<WorkflowExecutionError> getWorkflowExecutionErrors(String experimentId, String workflowInstanceId) throws AiravataAPIInvocationException {
-// try {
-// return getClient().getRegistryClient().getWorkflowExecutionErrors(experimentId,
-// workflowInstanceId);
-// } catch (Exception e) {
-// throw new AiravataAPIInvocationException(e);
-// }
-// }
-//
-// public List<NodeExecutionError> getNodeExecutionErrors(String experimentId, String workflowInstanceId, String nodeId) throws AiravataAPIInvocationException {
-// try {
-// return getClient().getRegistryClient().getNodeExecutionErrors(experimentId,
-// workflowInstanceId, nodeId);
-// } catch (Exception e) {
-// throw new AiravataAPIInvocationException(e);
-// }
-// }
-//
-// public List<ApplicationJobExecutionError> getApplicationJobErrors(String experimentId, String workflowInstanceId, String nodeId, String gfacJobId) throws AiravataAPIInvocationException {
-// try {
-// return getClient().getRegistryClient().getApplicationJobErrors(experimentId,
-// workflowInstanceId, nodeId, gfacJobId);
-// } catch (Exception e) {
-// throw new AiravataAPIInvocationException(e);
-// }
-// }
-//
-// public List<ApplicationJobExecutionError> getApplicationJobErrors(String gfacJobId) throws AiravataAPIInvocationException {
-// try {
-// return getClient().getRegistryClient().getApplicationJobErrors(gfacJobId);
-// } catch (Exception e) {
-// throw new AiravataAPIInvocationException(e);
-// }
-// }
-//
-// public List<ExecutionError> getExecutionErrors(String experimentId, String workflowInstanceId, String nodeId, String gfacJobId, ExecutionErrors.Source... filterBy) throws AiravataAPIInvocationException {
-// try {
-// return getClient().getRegistryClient().getExecutionErrors(experimentId,
-// workflowInstanceId, nodeId, gfacJobId, filterBy);
-// } catch (Exception e) {
-// throw new AiravataAPIInvocationException(e);
-// }
-// }
-//
-// public int addExperimentError(ExperimentExecutionError error) throws AiravataAPIInvocationException {
-// try {
-// return getClient().getRegistryClient().addExperimentError(error);
-// } catch (Exception e) {
-// throw new AiravataAPIInvocationException(e);
-// }
-// }
-//
-// public int addWorkflowExecutionError(WorkflowExecutionError error) throws AiravataAPIInvocationException {
-// try {
-// return getClient().getRegistryClient().addWorkflowExecutionError(error);
-// } catch (Exception e) {
-// throw new AiravataAPIInvocationException(e);
-// }
-// }
-//
-// public int addNodeExecutionError(NodeExecutionError error) throws AiravataAPIInvocationException {
-// try {
-// return getClient().getRegistryClient().addNodeExecutionError(error);
-// } catch (Exception e) {
-// throw new AiravataAPIInvocationException(e);
-// }
-// }
-//
-// public int addApplicationJobExecutionError(ApplicationJobExecutionError error) throws AiravataAPIInvocationException {
-// try {
-// return getClient().getRegistryClient().addApplicationJobExecutionError(error);
-// } catch (Exception e) {
-// throw new AiravataAPIInvocationException(e);
-// }
-// }
-//
-// public org.apache.airavata.experiment.execution.InterpreterService.Client getExecutionClient (){
-// ExecutionClient executionClient = new ExecutionClient();
-// return executionClient.getInterpreterServiceClient();
-//
-// }
-//
-//
-// private String extractWorkflowContent(String workflowName) throws AiravataAPIInvocationException {
-// if(workflowName.contains("http://airavata.apache.org/xbaya/xwf")){//(getClient().getWorkflowManager().isWorkflowExists(workflowName)) {
-// return workflowName;
-// }else {
-// return getClient().getWorkflowManager().getWorkflowAsString(workflowName);
-// }
-// }
-//
-// private Workflow extractWorkflow(String workflowName) throws AiravataAPIInvocationException {
-// Workflow workflowObj = null;
-// //FIXME - There should be a better way to figure-out if the passed string is a name or an xml
-// if(!workflowName.contains("http://airavata.apache.org/xbaya/xwf")){//(getClient().getWorkflowManager().isWorkflowExists(workflowName)) {
-// workflowObj = getClient().getWorkflowManager().getWorkflow(workflowName);
-// }else {
-// try{
-// workflowObj = getClient().getWorkflowManager().getWorkflowFromString(workflowName);
-// }catch (AiravataAPIInvocationException e){
-// getClient().getWorkflowManager().getWorkflow(workflowName);
-// }
-// }
-// return workflowObj;
-// }
-//
-// private org.apache.airavata.experiment.execution.ExperimentAdvanceOptions generateAdvancedOptions(org.apache.airavata.client.api.ExperimentAdvanceOptions exAdOpt){
-// try {
-// org.apache.airavata.experiment.execution.ExperimentAdvanceOptions advanceOptions = new org.apache.airavata.experiment.execution.ExperimentAdvanceOptions();
-// advanceOptions.setExperimentName(exAdOpt.getExperimentName());
-// advanceOptions.setCustomExperimentId(exAdOpt.getCustomExperimentId());
-// advanceOptions.setExecutionUser(exAdOpt.getExperimentExecutionUser());
-// advanceOptions.setMetadata(exAdOpt.getExperimentMetadata());
-// SecuritySettings customSecuritySettings = exAdOpt.getCustomSecuritySettings();
-// if (customSecuritySettings != null){
-// advanceOptions.setSecuritySettings(generateSecuritySettingsObj(customSecuritySettings));
-// }
-//
-// WorkflowOutputDataSettings outputDataSettings = exAdOpt.getCustomWorkflowOutputDataSettings();
-// List<org.apache.airavata.experiment.execution.OutputDataSettings> dataSettingsList = new ArrayList<org.apache.airavata.experiment.execution.OutputDataSettings>();
-// if (outputDataSettings != null){
-// OutputDataSettings[] outputDataSettingsList = outputDataSettings.getOutputDataSettingsList();
-// for (OutputDataSettings opds : outputDataSettingsList){
-// org.apache.airavata.experiment.execution.OutputDataSettings dataSettings = generateOutputDataObject(opds);
-// dataSettingsList.add(dataSettings);
-// }
-// org.apache.airavata.experiment.execution.WorkflowOutputDataSettings wfOpDSettings = new org.apache.airavata.experiment.execution.WorkflowOutputDataSettings();
-// wfOpDSettings.setOutputDataSettingsList(dataSettingsList);
-// advanceOptions.setWorkflowOutputDataSettings(wfOpDSettings);
-// }
-// WorkflowSchedulingSettings schedulingSettings = exAdOpt.getCustomWorkflowSchedulingSettings();
-// if (schedulingSettings != null){
-// org.apache.airavata.experiment.execution.WorkflowSchedulingSettings settings = generateShedulingSettingsObject(schedulingSettings);
-// advanceOptions.setWorkflowSchedulingSettings(settings);
-// }
-// return advanceOptions;
-// } catch (AiravataAPIInvocationException e) {
-// e.printStackTrace();
-// }
-// return null;
-// }
-//
-// private org.apache.airavata.experiment.execution.SecuritySettings generateSecuritySettingsObj(org.apache.airavata.client.api.SecuritySettings secSettings) {
-// try {
-// org.apache.airavata.experiment.execution.SecuritySettings settings = new org.apache.airavata.experiment.execution.SecuritySettings();
-// org.apache.airavata.experiment.execution.AmazonWebServicesSettings amWSSettings = new org.apache.airavata.experiment.execution.AmazonWebServicesSettings();
-// org.apache.airavata.client.api.AmazonWebServicesSettings amazonWSSettings = secSettings.getAmazonWSSettings();
-// if (amazonWSSettings != null){
-// amWSSettings.setAccessKey(amazonWSSettings.getSecretAccessKey());
-// amWSSettings.setAmiID(amazonWSSettings.getAMIId());
-// amWSSettings.setInstanceID(amazonWSSettings.getInstanceId());
-// amWSSettings.setSecretAccessKey(amazonWSSettings.getSecretAccessKey());
-// amWSSettings.setUsername(amazonWSSettings.getUsername());
-// settings.setAmazonWSSettings(amWSSettings);
-// }
-//
-// org.apache.airavata.experiment.execution.CredentialStoreSecuritySettings credSettings = new org.apache.airavata.experiment.execution.CredentialStoreSecuritySettings();
-// org.apache.airavata.client.api.CredentialStoreSecuritySettings credStoreSecSettings = secSettings.getCredentialStoreSecuritySettings();
-// if (credStoreSecSettings != null){
-// credSettings.setGatewayID(credStoreSecSettings.getGatewayId());
-// credSettings.setPortalUser(credStoreSecSettings.getPortalUser());
-// credSettings.setTokenId(credStoreSecSettings.getTokenId());
-// settings.setCredentialStoreSettings(credSettings);
-// }
-//
-//// org.apache.airavata.experiment.execution.MyProxyRepositorySettings myProxySettings = new org.apache.airavata.experiment.execution.MyProxyRepositorySettings();
-//// org.apache.airavata.client.api.GridMyProxyRepositorySettings proxyRepositorySettings = secSettings.getGridMyProxyRepositorySettings();
-//// if (proxyRepositorySettings != null){
-//// myProxySettings.setLifetime(proxyRepositorySettings.getLifeTime());
-//// myProxySettings.setMyproxyServer(proxyRepositorySettings.getMyProxyServer());
-//// myProxySettings.setPassword(proxyRepositorySettings.getPassword());
-//// myProxySettings.setUserName(proxyRepositorySettings.getUsername());
-//// settings.setMyproxySettings(myProxySettings);
-//// }
-////
-//// org.apache.airavata.experiment.execution.SSHAuthenticationSettings authSettings = new org.apache.airavata.experiment.execution.SSHAuthenticationSettings();
-//// org.apache.airavata.client.api.SSHAuthenticationSettings sshAuthenticationSettings = secSettings.getSSHAuthenticationSettings();
-//// if (sshAuthenticationSettings != null){
-//// authSettings.setAccessKeyID(sshAuthenticationSettings.getAccessKeyId());
-//// authSettings.setSecretAccessKey(sshAuthenticationSettings.getSecretAccessKey());
-//// settings.setSshAuthSettings(authSettings);
-//// }
-// return settings;
-//
-// } catch (AiravataAPIInvocationException e) {
-// e.printStackTrace();
-// }
-// return null;
-// }
-//
-// private org.apache.airavata.experiment.execution.OutputDataSettings generateOutputDataObject(OutputDataSettings opDataSettings){
-// org.apache.airavata.experiment.execution.OutputDataSettings dataSettings = new org.apache.airavata.experiment.execution.OutputDataSettings();
-// dataSettings.setDataRegURL(opDataSettings.getDataRegistryUrl());
-// dataSettings.setIsdataPersisted(opDataSettings.isDataPersistent());
-// dataSettings.setNodeID(opDataSettings.getNodeId());
-// dataSettings.setOutputdataDir(opDataSettings.getOutputDataDirectory());
-// return dataSettings;
-// }
-//
-// private org.apache.airavata.experiment.execution.WorkflowSchedulingSettings generateShedulingSettingsObject (WorkflowSchedulingSettings wfschSettings){
-// org.apache.airavata.experiment.execution.WorkflowSchedulingSettings schedulingSettings = new org.apache.airavata.experiment.execution.WorkflowSchedulingSettings();
-// NodeSettings[] list = wfschSettings.getNodeSettingsList();
-// List<org.apache.airavata.experiment.execution.NodeSettings> nodes = new ArrayList<org.apache.airavata.experiment.execution.NodeSettings>();
-// if (list != null){
-// for (NodeSettings ns : list){
-// org.apache.airavata.experiment.execution.NodeSettings nodeSettings = generateNodeSettingsObject(ns);
-// nodes.add(nodeSettings);
-// }
-// }
-// schedulingSettings.setNodeSettingsList(nodes);
-// return schedulingSettings;
-// }
-//
-// private org.apache.airavata.experiment.execution.NodeSettings generateNodeSettingsObject (NodeSettings settings){
-// org.apache.airavata.experiment.execution.NodeSettings nsettings = new org.apache.airavata.experiment.execution.NodeSettings();
-// nsettings.setNodeId(settings.getNodeId());
-// nsettings.setServiceId(settings.getServiceId());
-// nsettings.setHostSchedulingSettings(generateHostSchSettings(settings.getHostSettings()));
-// nsettings.setHpcSettings(generateHPCSettingsObject(settings.getHPCSettings()));
-//
-// List<NameValuePairType> nameValuePair = settings.getNameValuePair();
-// List<org.apache.airavata.experiment.execution.NameValuePairType> typeList = new ArrayList<org.apache.airavata.experiment.execution.NameValuePairType>();
-// if (nameValuePair != null){
-// for (NameValuePairType nvPair : nameValuePair){
-// org.apache.airavata.experiment.execution.NameValuePairType type = generateNVPairObject(nvPair);
-// typeList.add(type);
-// }
-// }
-// nsettings.setNameValuePairList(typeList);
-// return nsettings;
-// }
-//
-// private org.apache.airavata.experiment.execution.HostSchedulingSettings generateHostSchSettings (HostSchedulingSettings settings){
-// org.apache.airavata.experiment.execution.HostSchedulingSettings hscheduleSettings = new org.apache.airavata.experiment.execution.HostSchedulingSettings();
-// hscheduleSettings.setGatekeeperEPR(settings.getGatekeeperEPR());
-// hscheduleSettings.setHostID(settings.getHostId());
-// hscheduleSettings.setIsWSGramPreferred(settings.isWSGRAMPreffered());
-// return hscheduleSettings;
-// }
-//
-// private org.apache.airavata.experiment.execution.HPCSettings generateHPCSettingsObject (HPCSettings settings){
-// org.apache.airavata.experiment.execution.HPCSettings hsettings = new org.apache.airavata.experiment.execution.HPCSettings();
-// hsettings.setCpuCount(settings.getCPUCount());
-// hsettings.setJobManager(settings.getJobManager());
-// hsettings.setMaxWalltime(settings.getMaxWallTime());
-// hsettings.setNodeCount(settings.getNodeCount());
-// hsettings.setQueueName(settings.getQueueName());
-// return hsettings;
-// }
-//
-// private org.apache.airavata.experiment.execution.NameValuePairType generateNVPairObject (org.apache.airavata.client.tools.NameValuePairType settings){
-// org.apache.airavata.experiment.execution.NameValuePairType nvType = new org.apache.airavata.experiment.execution.NameValuePairType();
-// nvType.setName(settings.getName());
-// nvType.setDescription(settings.getDescription());
-// nvType.setValue(settings.getValue());
-// return nvType;
-// }
-//}
-//
-//
http://git-wip-us.apache.org/repos/asf/airavata/blob/32fff944/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/HPCSettingsImpl.java
----------------------------------------------------------------------
diff --git a/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/HPCSettingsImpl.java b/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/HPCSettingsImpl.java
deleted file mode 100644
index 6dcddd9..0000000
--- a/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/HPCSettingsImpl.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
- *
- * 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.client.impl;
-
-import org.apache.airavata.client.api.HPCSettings;
-
-public class HPCSettingsImpl implements HPCSettings {
- private String jobManager;
- private String queueName;
- private Integer cpuCount;
- private Integer nodeCount;
- private Integer maxWallTime;
-
- @Override
- public String getJobManager() {
- return jobManager;
- }
-
- @Override
- public Integer getCPUCount() {
- return cpuCount;
- }
-
- @Override
- public Integer getNodeCount() {
- return nodeCount;
- }
-
- @Override
- public String getQueueName() {
- return queueName;
- }
-
- @Override
- public Integer getMaxWallTime() {
- return maxWallTime;
- }
-
- @Override
- public void setJobManager(String jobManager) {
- this.jobManager=jobManager;
- }
-
- @Override
- public void setCPUCount(Integer cpuCount) {
- this.cpuCount=cpuCount;
- }
-
- @Override
- public void setNodeCount(Integer nodeCount) {
- this.nodeCount=nodeCount;
- }
-
- @Override
- public void setQueueName(String queueName) {
- this.queueName=queueName;
- }
-
- @Override
- public void setMaxWallTime(Integer maxWallTime) {
- this.maxWallTime=maxWallTime;
- }
-
- @Override
- public void resetJobManager() {
- this.jobManager=null;
- }
-
- @Override
- public void resetCPUCount() {
- this.cpuCount=null;
- }
-
- @Override
- public void resetNodeCount() {
- this.nodeCount=null;
- }
-
- @Override
- public void resetQueueName() {
- this.queueName=null;
- }
-
- @Override
- public void resetMaxWallTime() {
- this.maxWallTime=null;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/airavata/blob/32fff944/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/HostSchedulingSettingsImpl.java
----------------------------------------------------------------------
diff --git a/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/HostSchedulingSettingsImpl.java b/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/HostSchedulingSettingsImpl.java
deleted file mode 100644
index fdcb3a5..0000000
--- a/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/HostSchedulingSettingsImpl.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- *
- * 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.client.impl;
-
-import org.apache.airavata.client.api.HostSchedulingSettings;
-
-public class HostSchedulingSettingsImpl implements HostSchedulingSettings {
- private String hostId;
- private String gatekeeperEPR;
- private Boolean wsgramPreffered;
-
- @Override
- public String getHostId() {
- return hostId;
- }
-
- @Override
- public Boolean isWSGRAMPreffered() {
- return wsgramPreffered;
- }
-
- @Override
- public String getGatekeeperEPR() {
- return gatekeeperEPR;
- }
-
- @Override
- public void setHostId(String hostId) {
- this.hostId=hostId;
- }
-
- @Override
- public void setWSGramPreffered(Boolean wsgramPreffered) {
- this.wsgramPreffered=wsgramPreffered;
- }
-
- @Override
- public void setGatekeeperEPR(String gatekeeperEPR) {
- this.gatekeeperEPR=gatekeeperEPR;
- }
-
- @Override
- public void resetWSGramPreffered() {
- this.wsgramPreffered=null;
- }
-
- @Override
- public void resetGatekeeperEPR() {
- this.gatekeeperEPR=null;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/airavata/blob/32fff944/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/NodeSettingsImpl.java
----------------------------------------------------------------------
diff --git a/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/NodeSettingsImpl.java b/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/NodeSettingsImpl.java
deleted file mode 100644
index 3319e9a..0000000
--- a/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/NodeSettingsImpl.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
- *
- * 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.client.impl;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.airavata.client.api.HPCSettings;
-import org.apache.airavata.client.api.HostSchedulingSettings;
-import org.apache.airavata.client.api.NodeSettings;
-import org.apache.airavata.client.tools.NameValuePairType;
-
-public class NodeSettingsImpl implements NodeSettings {
- private String nodeId;
- private String serviceId;
- private HPCSettings hpcSettings;
- private HostSchedulingSettings hostSchedulingSettings;
- private List<NameValuePairType> nameValuePair;
-
- public NodeSettingsImpl(String nodeId) {
- this(nodeId,null);
- }
-
- public NodeSettingsImpl(String nodeId, String serviceId) {
- setNodeId(nodeId);
- setServiceId(serviceId);
- }
-
- @Override
- public String getNodeId() {
- return nodeId;
- }
-
- @Override
- public String getServiceId() {
- return serviceId;
- }
-
- @Override
- public HostSchedulingSettings getHostSettings() {
- if (hostSchedulingSettings==null){
- hostSchedulingSettings=new HostSchedulingSettingsImpl();
- }
- return hostSchedulingSettings;
- }
-
- @Override
- public HPCSettings getHPCSettings() {
- if (hpcSettings==null){
- hpcSettings=new HPCSettingsImpl();
- }
- return hpcSettings;
- }
-
- @Override
- public void setNodeId(String nodeId) {
- this.nodeId=nodeId;
- }
-
- @Override
- public void setServiceId(String serviceId) {
- this.serviceId=serviceId;
- }
-
- @Override
- public void setHostSettings(HostSchedulingSettings hostSchedulingSettings) {
- this.hostSchedulingSettings = hostSchedulingSettings;
- }
-
- @Override
- public void setHPCSettings(HPCSettings hpcSettings) {
- this.hpcSettings = hpcSettings;
- }
-
- @Override
- public List<NameValuePairType> getNameValuePair() {
- if (nameValuePair==null){
- nameValuePair=new ArrayList<NameValuePairType>();
- }
- return nameValuePair;
- }
-
- @Override
- public void setNameValuePair(List<NameValuePairType> nameValuePair) {
- this.nameValuePair = nameValuePair;
-
- }
-
-}
http://git-wip-us.apache.org/repos/asf/airavata/blob/32fff944/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/PasswordCallBackImpl.java
----------------------------------------------------------------------
diff --git a/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/PasswordCallBackImpl.java b/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/PasswordCallBackImpl.java
deleted file mode 100644
index 57d83a6..0000000
--- a/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/PasswordCallBackImpl.java
+++ /dev/null
@@ -1,39 +0,0 @@
-///*
-// *
-// * 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.client.impl;
-//
-//import org.apache.airavata.registry.api.PasswordCallback;
-//
-//public class PasswordCallBackImpl implements PasswordCallback {
-// private String username;
-// private String password;
-//
-// public PasswordCallBackImpl(String username, String password){
-// this.username = username;
-// this.password = password;
-// }
-//
-// @Override
-// public String getPassword(String username) {
-// return password;
-// }
-//}
http://git-wip-us.apache.org/repos/asf/airavata/blob/32fff944/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/ProvenanceManagerImpl.java
----------------------------------------------------------------------
diff --git a/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/ProvenanceManagerImpl.java b/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/ProvenanceManagerImpl.java
deleted file mode 100644
index e922a68..0000000
--- a/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/ProvenanceManagerImpl.java
+++ /dev/null
@@ -1,638 +0,0 @@
-///*
-// *
-// * 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.client.impl;
-//
-//import org.apache.airavata.client.AiravataClient;
-//import org.apache.airavata.client.api.ProvenanceManager;
-//import org.apache.airavata.client.api.exception.AiravataAPIInvocationException;
-//import org.apache.airavata.registry.api.workflow.*;
-//import org.apache.airavata.registry.api.workflow.ApplicationJob.ApplicationJobStatus;
-//import org.apache.airavata.registry.api.workflow.WorkflowExecutionStatus.State;
-//
-//import java.util.*;
-//
-//public class ProvenanceManagerImpl implements ProvenanceManager {
-// private AiravataClient client;
-//
-// public ProvenanceManagerImpl(AiravataClient client) {
-// setClient(client);
-// }
-//
-// @Override
-// public void setWorkflowInstanceNodeInput(WorkflowInstanceNode node, String data)
-// throws AiravataAPIInvocationException {
-//// try {
-//// getClient().getRegistryClient().updateWorkflowNodeInput(node, data);
-//// } catch (Exception e) {
-//// throw new AiravataAPIInvocationException(e);
-//// }
-// }
-//
-// @Override
-// public void setWorkflowInstanceNodeInput(String experimentId,
-// String workflowInstanceId, String nodeId, String data)
-// throws AiravataAPIInvocationException {
-// setWorkflowInstanceNodeInput(new WorkflowInstanceNode(new WorkflowExecution(experimentId, workflowInstanceId), nodeId), data);
-// }
-//
-// @Override
-// public void setWorkflowInstanceNodeOutput(WorkflowInstanceNode node, String data)
-// throws AiravataAPIInvocationException {
-//// try {
-//// getClient().getRegistryClient().updateWorkflowNodeOutput(node, data);
-//// } catch (Exception e) {
-//// throw new AiravataAPIInvocationException(e);
-//// }
-// }
-//
-// @Override
-// public void setWorkflowInstanceNodeOutput(String experimentId,
-// String workflowInstanceId, String nodeId, String data)
-// throws AiravataAPIInvocationException {
-// setWorkflowInstanceNodeOutput(new WorkflowInstanceNode(new WorkflowExecution(experimentId, workflowInstanceId), nodeId), data);
-//
-// }
-//
-// @Override
-// public String getWorkflowInstanceNodeInput(WorkflowInstanceNode node) throws AiravataAPIInvocationException {
-//// try {
-//// return getClient().getRegistryClient().getWorkflowInstanceNodeData(node.getWorkflowInstance().getWorkflowExecutionId(), node.getNodeId()).getInput();
-//// } catch (Exception e) {
-//// throw new AiravataAPIInvocationException(e);
-//// }
-// return null;
-// }
-//
-// @Override
-// public String getWorkflowInstanceNodeInput(String experimentId, String workflowInstanceId, String nodeId)
-// throws AiravataAPIInvocationException {
-// return getWorkflowInstanceNodeInput(new WorkflowInstanceNode(new WorkflowExecution(experimentId, workflowInstanceId), nodeId));
-// }
-//
-// @Override
-// public Map<WorkflowInstanceNode,String> getWorkflowInstanceNodeInput(String workflowName, String nodeId) throws AiravataAPIInvocationException{
-//// try {
-//// List<WorkflowNodeIOData> list = getClient().getRegistryClient().searchWorkflowInstanceNodeInput(".*", workflowName, nodeId);
-//// return groupNodePortData(list);
-//// } catch (Exception e) {
-//// throw new AiravataAPIInvocationException(e);
-//// }
-// return null;
-// }
-//
-// private Map<WorkflowInstanceNode, String> groupNodePortData(List<WorkflowNodeIOData> list) {
-// Map<WorkflowInstanceNode,String> portData=new HashMap<WorkflowInstanceNode, String>();
-// for (WorkflowNodeIOData data : list) {
-// portData.put(new WorkflowInstanceNode(new WorkflowExecution(data.getExperimentId(), data.getWorkflowInstanceId()), data.getNodeId()), data.getValue());
-// }
-// return portData;
-// }
-//
-// @Override
-// public String getWorkflowInstanceNodeOutput(WorkflowInstanceNode node) throws AiravataAPIInvocationException {
-//// try {
-//// return getClient().getRegistryClient().getWorkflowInstanceNodeData(node.getWorkflowInstance().getWorkflowExecutionId(), node.getNodeId()).getOutput();
-//// } catch (Exception e) {
-//// throw new AiravataAPIInvocationException(e);
-//// }
-// return null;
-// }
-//
-// @Override
-// public String getWorkflowInstanceNodeOutput(String experimentId, String workflowInstanceId, String nodeId)
-// throws AiravataAPIInvocationException {
-// return getWorkflowInstanceNodeOutput(new WorkflowInstanceNode(new WorkflowExecution(experimentId, workflowInstanceId), nodeId));
-//
-// }
-//
-// @Override
-// public Map<WorkflowInstanceNode,String> getWorkflowInstanceNodeOutput(String workflowName, String nodeId) throws AiravataAPIInvocationException{
-//// try {
-//// List<WorkflowNodeIOData> list = getClient().getRegistryClient().searchWorkflowInstanceNodeOutput(".*", workflowName, nodeId);
-//// return groupNodePortData(list);
-//// } catch (Exception e) {
-//// throw new AiravataAPIInvocationException(e);
-//// }
-// return null;
-// }
-//
-// @Override
-// public void setWorkflowInstanceStatus(String experimentId, String workflowInstanceId,
-// State status) throws AiravataAPIInvocationException {
-// setWorkflowInstanceStatus(new WorkflowExecutionStatus(new WorkflowExecution(experimentId, workflowInstanceId),status));
-// }
-//
-// @Override
-// public void setWorkflowInstanceStatus(WorkflowExecutionStatus status)
-// throws AiravataAPIInvocationException {
-//// try {
-//// getClient().getRegistryClient().updateWorkflowInstanceStatus(status);
-//// } catch (Exception e) {
-//// throw new AiravataAPIInvocationException(e);
-//// }
-//
-// }
-//
-// @Override
-// public WorkflowExecutionStatus getWorkflowInstanceStatus(
-// String experimentId, String workflowInstanceId)
-// throws AiravataAPIInvocationException {
-//// try {
-//// return getClient().getRegistryClient().getWorkflowInstanceStatus(experimentId);
-//// } catch (Exception e) {
-//// throw new AiravataAPIInvocationException(e);
-//// }
-// return null;
-// }
-//
-// @Override
-// public WorkflowExecutionStatus getWorkflowInstanceStatus(
-// WorkflowExecution workflowInstance)
-// throws AiravataAPIInvocationException {
-// return getWorkflowInstanceStatus(workflowInstance.getExperimentId(), workflowInstance.getWorkflowExecutionId());
-// }
-//
-// @Override
-// public void setExperimentUser(String experimentId, String user) throws AiravataAPIInvocationException {
-//// try {
-//// getClient().getRegistryClient().updateExperimentExecutionUser(experimentId, user);
-//// } catch (Exception e) {
-//// throw new AiravataAPIInvocationException(e);
-//// }
-// }
-//
-// @Override
-// public void setExperimentUser(ExperimentUser user)
-// throws AiravataAPIInvocationException {
-// setExperimentUser(user.getExperimentId(), user.getUser());
-// }
-//
-// @Override
-// public ExperimentUser getExperimentUser(String experimentId)throws AiravataAPIInvocationException {
-//// try {
-//// return new ExperimentUser(experimentId,getClient().getRegistryClient().getExperimentExecutionUser(experimentId));
-//// } catch (Exception e) {
-//// throw new AiravataAPIInvocationException(e);
-//// }
-// return null;
-// }
-//
-// @Override
-// public void setExperimentMetadata(String experimentId, String metadata)
-// throws AiravataAPIInvocationException {
-//// try {
-//// getClient().getRegistryClient().updateExperimentMetadata(experimentId, metadata);
-//// } catch (Exception e) {
-//// throw new AiravataAPIInvocationException(e);
-//// }
-//
-// }
-//
-// @Override
-// public void setExperimentMetadata(ExperimentMetadata instanceMetadata)
-// throws AiravataAPIInvocationException {
-// setExperimentMetadata(instanceMetadata.getExperimentId(), instanceMetadata.getMetadata());
-// }
-//
-// @Override
-// public ExperimentMetadata getExperimentMetadata(String experimentId)throws AiravataAPIInvocationException {
-//// try {
-//// return new ExperimentMetadata(experimentId, getClient().getRegistryClient().getExperimentMetadata(experimentId));
-//// } catch (Exception e) {
-//// throw new AiravataAPIInvocationException(e);
-//// }
-// return null;
-// }
-//
-// @Override
-// public boolean isExperimentNameExist(String experimentName) throws AiravataAPIInvocationException {
-//// try {
-//// return getClient().getRegistryClient().isExperimentNameExist(experimentName);
-//// } catch (Exception e) {
-//// throw new AiravataAPIInvocationException(e);
-//// }
-// return false;
-// }
-//
-// @Override
-// public List<String> getExperimentIdList(String owner) throws AiravataAPIInvocationException{
-//// try {
-//// return getClient().getRegistryClient().getExperimentIdByUser(owner);
-//// } catch (Exception e) {
-//// throw new AiravataAPIInvocationException(e);
-//// }
-// return null;
-// }
-//
-// @Override
-// public List<String> getExperimentIdList() throws AiravataAPIInvocationException {
-// return getExperimentIdList(getClient().getCurrentUser());
-// }
-//
-// @Override
-// public List<ExperimentData> getWorkflowExperimentDataList()
-// throws AiravataAPIInvocationException {
-// return getWorkflowExperimentDataList(getClient().getCurrentUser());
-// }
-//
-// @Override
-// public List<ExperimentData> getWorkflowExperimentDataList(String user)
-// throws AiravataAPIInvocationException {
-//// try {
-//// return getClient().getRegistryClient().getExperimentByUser(user);
-//// } catch (Exception e) {
-//// throw new AiravataAPIInvocationException(e);
-//// }
-// return null;
-// }
-//
-// @Override
-// public List<ExperimentData> getWorkflowExperimentData(String user,
-// int pageSize, int pageNo) throws AiravataAPIInvocationException {
-//// try {
-//// return getClient().getRegistryClient().getExperimentByUser(user, pageSize, pageNo);
-//// } catch (Exception e) {
-//// throw new AiravataAPIInvocationException(e);
-//// }
-// return null;
-// }
-//
-// @Override
-// public WorkflowExecutionData getWorkflowInstanceData(String experimentId,
-// String workflowInstanceId) throws AiravataAPIInvocationException {
-//// try {
-//// return getClient().getRegistryClient().getWorkflowInstanceData(workflowInstanceId);
-//// } catch (Exception e) {
-//// throw new AiravataAPIInvocationException(e);
-//// }
-// return null;
-// }
-//
-// @Override
-// public WorkflowExecutionData getWorkflowInstanceData(WorkflowExecution workflowInstance)
-// throws AiravataAPIInvocationException {
-// return getWorkflowInstanceData(workflowInstance.getExperimentId(), workflowInstance.getWorkflowExecutionId());
-// }
-//
-// @Override
-// public String[] getWorkflowExecutionOutputNames(String exeperimentId)
-// throws AiravataAPIInvocationException {
-// throw new AiravataAPIInvocationException(new Exception("Not implemented"));
-// }
-//
-// public AiravataClient getClient() {
-// return client;
-// }
-//
-// public void setClient(AiravataClient client) {
-// this.client = client;
-// }
-//
-// @Override
-// public void setExperimentName(String experimentId, String experimentName)
-// throws AiravataAPIInvocationException {
-//// try {
-//// getClient().getRegistryClient().updateExperimentName(experimentId, experimentName);
-//// } catch (Exception e) {
-//// throw new AiravataAPIInvocationException(e);
-//// }
-// }
-//
-// @Override
-// public void setExperimentName(ExperimentName experimentName)
-// throws AiravataAPIInvocationException {
-// setExperimentName(experimentName.getExperimentId(),experimentName.getInstanceName());
-// }
-//
-// @Override
-// public ExperimentName getExperimentName(String experimentId)
-// throws AiravataAPIInvocationException {
-//// try {
-//// return new ExperimentName(experimentId, getClient().getRegistryClient().getExperimentName(experimentId));
-//// } catch (Exception e) {
-//// throw new AiravataAPIInvocationException(e);
-//// }
-// return null;
-// }
-//
-// @Override
-// public ExperimentData getWorkflowExperimentData(String experimentId)
-// throws AiravataAPIInvocationException {
-//// try {
-//// return getClient().getRegistryClient().getExperiment(experimentId);
-//// } catch (Exception e) {
-//// throw new AiravataAPIInvocationException(e);
-//// }
-// return null;
-// }
-//
-// @Override
-// public void setWorkflowInstanceNodeStatus(String experimentId,
-// String workflowInstaceId, String nodeId, State status)
-// throws AiravataAPIInvocationException {
-//// try {
-//// getClient().getRegistryClient().updateWorkflowNodeStatus(workflowInstaceId, nodeId, status);
-//// } catch (Exception e) {
-//// throw new AiravataAPIInvocationException(e);
-//// }
-//
-// }
-//
-// @Override
-// public void setWorkflowInstanceNodeStatus(NodeExecutionStatus status)
-// throws AiravataAPIInvocationException {
-//// try {
-//// getClient().getRegistryClient().updateWorkflowNodeStatus(status);
-//// } catch (Exception e) {
-//// throw new AiravataAPIInvocationException(e);
-//// }
-// }
-//
-// @Override
-// public NodeExecutionStatus getWorkflowInstanceNodeStatus(
-// String experimentId, String workflowInstaceId, String nodeId)
-// throws AiravataAPIInvocationException {
-// return getWorkflowInstanceNodeStatus(new WorkflowInstanceNode(new WorkflowExecution(experimentId,workflowInstaceId),nodeId));
-// }
-//
-// @Override
-// public NodeExecutionStatus getWorkflowInstanceNodeStatus(
-// WorkflowInstanceNode node) throws AiravataAPIInvocationException {
-//// try {
-//// return getClient().getRegistryClient().getWorkflowNodeStatus(node);
-//// } catch (Exception e) {
-//// throw new AiravataAPIInvocationException(e);
-//// }
-// return null;
-// }
-//
-// @Override
-// public void addExperiment(String projectName, String experimentId, String experimentName)
-// throws AiravataAPIInvocationException {
-//// try {
-//// AiravataExperiment experiment = new AiravataExperiment();
-//// experiment.setExperimentId(experimentId);
-//// getClient().getRegistryClient().addExperiment(projectName, experiment);
-//// getClient().getRegistryClient().updateExperimentName(experimentId, experimentName);
-//// } catch (Exception e) {
-//// throw new AiravataAPIInvocationException(e);
-//// }
-// }
-//
-// @Override
-// public void addWorkflowInstance(String experimentId,
-// WorkflowExecution workflowInstance)
-// throws AiravataAPIInvocationException {
-//// try {
-//// getClient().getRegistryClient().addWorkflowInstance(experimentId, workflowInstance.getWorkflowExecutionId(),workflowInstance.getTemplateName());
-//// } catch (Exception e) {
-//// throw new AiravataAPIInvocationException(e);
-//// }
-//
-// }
-//
-// @Override
-// public List<WorkflowExecution> getExperimentWorkflowInstances(String experimentId) throws AiravataAPIInvocationException {
-//// try{
-//// return getClient().getRegistryClient().getExperimentWorkflowInstances(experimentId);
-//// }catch (Exception e) {
-//// throw new AiravataAPIInvocationException(e);
-//// }
-// return null;
-// }
-//
-// @Override
-// public void setWorkflowNodeType(WorkflowInstanceNode node, WorkflowNodeType type) throws AiravataAPIInvocationException {
-//// try{
-//// getClient().getRegistryClient().updateWorkflowNodeType(node, type);
-//// }catch (Exception e) {
-//// throw new AiravataAPIInvocationException(e);
-//// }
-// }
-//
-// @Override
-// public void setWorkflowInstanceTemplateName(String workflowInstanceId, String templateName) throws AiravataAPIInvocationException {
-//// try{
-//// getClient().getRegistryClient().setWorkflowInstanceTemplateName(workflowInstanceId, templateName);
-//// }catch (Exception e) {
-//// throw new AiravataAPIInvocationException(e);
-//// }
-// }
-//
-// @Override
-// public void saveWorkflowExecutionOutput(String experimentId, String outputNodeName, String output) throws AiravataAPIInvocationException {
-//// try {
-//// getClient().getRegistryClient().saveWorkflowExecutionOutput(experimentId, outputNodeName, output);
-//// } catch (Exception e) {
-//// throw new AiravataAPIInvocationException(e);
-//// }
-// }
-//
-// @Override
-// public ExperimentData getExperimentMetaInformation(String experimentId)
-// throws AiravataAPIInvocationException {
-//// try {
-//// return getClient().getRegistryClient().getExperimentMetaInformation(experimentId);
-//// } catch (Exception e) {
-//// throw new AiravataAPIInvocationException(e);
-//// }
-// return null;
-// }
-//
-// @Override
-// public List<ExperimentData> getAllExperimentMetaInformation(String user)
-// throws AiravataAPIInvocationException {
-//// try {
-//// return getClient().getRegistryClient().getAllExperimentMetaInformation(user);
-//// } catch (Exception e) {
-//// throw new AiravataAPIInvocationException(e);
-//// }
-// return null;
-// }
-//
-// @Override
-// public List<ExperimentData> getExperimentDataList()
-// throws AiravataAPIInvocationException {
-// return getWorkflowExperimentDataList();
-// }
-//
-// @Override
-// public List<ExperimentData> getExperimentDataList(String user)
-// throws AiravataAPIInvocationException {
-// return getWorkflowExperimentDataList(user);
-// }
-//
-// @Override
-// public List<ExperimentData> getExperimentData(String user, int pageSize,
-// int pageNo) throws AiravataAPIInvocationException {
-// return getWorkflowExperimentData(user, pageSize, pageNo);
-// }
-//
-// @Override
-// public ExperimentData getExperimentData(String experimentId)
-// throws AiravataAPIInvocationException {
-// return getWorkflowExperimentData(experimentId);
-// }
-//
-// public void updateWorkflowNodeGramData(WorkflowNodeGramData data) throws AiravataAPIInvocationException {
-//// try {
-//// client.getRegistryClient().updateWorkflowNodeGramData(data);
-//// } catch (RegException e) {
-//// throw new AiravataAPIInvocationException(e);
-//// } catch (AiravataConfigurationException e) {
-//// throw new AiravataAPIInvocationException(e);
-//// }
-// }
-//
-// @Override
-// public boolean isApplicationJobExists(String gfacJobId)
-// throws AiravataAPIInvocationException {
-//// try {
-//// return client.getRegistryClient().isApplicationJobExists(gfacJobId);
-//// } catch (Exception e) {
-//// throw new AiravataAPIInvocationException(e);
-//// }
-// return false;
-// }
-//
-// @Override
-// public void addApplicationJob(ApplicationJob job) throws AiravataAPIInvocationException {
-//// try {
-//// client.getRegistryClient().addApplicationJob(job);
-//// } catch (Exception e) {
-//// throw new AiravataAPIInvocationException(e);
-//// }
-// }
-//
-// @Override
-// public void updateApplicationJob(ApplicationJob job)
-// throws AiravataAPIInvocationException {
-//// try {
-//// client.getRegistryClient().updateApplicationJob(job);
-//// } catch (Exception e) {
-//// throw new AiravataAPIInvocationException(e);
-//// }
-// }
-//
-// @Override
-// public void updateApplicationJobStatus(String jobId, ApplicationJobStatus status, Date statusUpdateTime)
-// throws AiravataAPIInvocationException {
-//// try {
-//// client.getRegistryClient().updateApplicationJobStatus(jobId, status, statusUpdateTime);
-//// } catch (Exception e) {
-//// throw new AiravataAPIInvocationException(e);
-//// }
-// }
-//
-// @Override
-// public void updateApplicationJobData(String jobId, String jobdata)
-// throws AiravataAPIInvocationException {
-//// try {
-//// client.getRegistryClient().updateApplicationJobData(jobId, jobdata);
-//// } catch (Exception e) {
-//// throw new AiravataAPIInvocationException(e);
-//// }
-// }
-//
-// @Override
-// public void updateApplicationJobSubmittedTime(String jobId, Date submitted)
-// throws AiravataAPIInvocationException {
-//// try {
-//// client.getRegistryClient().updateApplicationJobSubmittedTime(jobId, submitted);
-//// } catch (Exception e) {
-//// throw new AiravataAPIInvocationException(e);
-//// }
-// }
-//
-// @Override
-// public void updateApplicationJobStatusUpdateTime(String jobId, Date completed)
-// throws AiravataAPIInvocationException {
-//// try {
-//// client.getRegistryClient().updateApplicationJobStatusUpdateTime(jobId, completed);
-//// } catch (Exception e) {
-//// throw new AiravataAPIInvocationException(e);
-//// }
-// }
-//
-// @Override
-// public void updateApplicationJobMetadata(String jobId, String metadata)
-// throws AiravataAPIInvocationException {
-//// try {
-//// client.getRegistryClient().updateApplicationJobMetadata(jobId, metadata);
-//// } catch (Exception e) {
-//// throw new AiravataAPIInvocationException(e);
-//// }
-// }
-//
-// @Override
-// public ApplicationJob getApplicationJob(String jobId)
-// throws AiravataAPIInvocationException {
-//// try {
-//// return client.getRegistryClient().getApplicationJob(jobId);
-//// } catch (Exception e) {
-//// throw new AiravataAPIInvocationException(e);
-//// }
-// return null;
-// }
-//
-// @Override
-// public List<ApplicationJob> getApplicationJobsForDescriptors(String serviceDescriptionId,
-// String hostDescriptionId, String applicationDescriptionId)
-// throws AiravataAPIInvocationException {
-//// try {
-//// return client.getRegistryClient().getApplicationJobsForDescriptors(serviceDescriptionId, hostDescriptionId, applicationDescriptionId);
-//// } catch (Exception e) {
-//// throw new AiravataAPIInvocationException(e);
-//// }
-// return null;
-// }
-//
-// @Override
-// public List<ApplicationJob> getApplicationJobs(String experimentId,
-// String workflowExecutionId, String nodeId)
-// throws AiravataAPIInvocationException {
-//// try {
-//// return client.getRegistryClient().getApplicationJobs(experimentId, workflowExecutionId, nodeId);
-//// } catch (Exception e) {
-//// throw new AiravataAPIInvocationException(e);
-//// }
-// return null;
-// }
-//
-// @Override
-// public void updateApplicationJobStatus(String jobId,
-// ApplicationJobStatus status) throws AiravataAPIInvocationException {
-// updateApplicationJobStatus(jobId, status, Calendar.getInstance().getTime());
-// }
-//
-// @Override
-// public List<ApplicationJobStatusData> getApplicationJobStatusHistory(
-// String jobId) throws AiravataAPIInvocationException {
-//// try {
-//// return client.getRegistryClient().getApplicationJobStatusHistory(jobId);
-//// } catch (Exception e) {
-//// throw new AiravataAPIInvocationException(e);
-//// }
-// return null;
-// }
-//
-//}
http://git-wip-us.apache.org/repos/asf/airavata/blob/32fff944/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/SecuritySettingsImpl.java
----------------------------------------------------------------------
diff --git a/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/SecuritySettingsImpl.java b/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/SecuritySettingsImpl.java
deleted file mode 100644
index 7a72998..0000000
--- a/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/SecuritySettingsImpl.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- *
- * 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.client.impl;
-
-import org.apache.airavata.client.api.*;
-import org.apache.airavata.client.api.exception.AiravataAPIUnimplementedException;
-
-public class SecuritySettingsImpl implements SecuritySettings {
- private AmazonWebServicesSettings amazonWebServicesSettings = new AmazonWebServicesSettingsImpl();
- private CredentialStoreSecuritySettings credentialStoreSecuritySettings = new CredentialStoreSecuritySettingsImpl();
-
- public AmazonWebServicesSettings getAmazonWSSettings() {
- return amazonWebServicesSettings;
- }
-
- public CredentialStoreSecuritySettings getCredentialStoreSecuritySettings() throws AiravataAPIUnimplementedException {
- return credentialStoreSecuritySettings;
- }
-
- public GridMyProxyRepositorySettings getGridMyProxyRepositorySettings() throws AiravataAPIUnimplementedException {
- throw new AiravataAPIUnimplementedException("Customizing security is not supported by the client in this binary!!!");
- }
-
- public SSHAuthenticationSettings getSSHAuthenticationSettings() throws AiravataAPIUnimplementedException {
- throw new AiravataAPIUnimplementedException("Customizing security is not supported by the client in this binary!!!");
- }
-}
http://git-wip-us.apache.org/repos/asf/airavata/blob/32fff944/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/UserManagerImpl.java
----------------------------------------------------------------------
diff --git a/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/UserManagerImpl.java b/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/UserManagerImpl.java
deleted file mode 100644
index 06ea94a..0000000
--- a/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/UserManagerImpl.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- *
- * 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.client.impl;
-
-import org.apache.airavata.client.AiravataClient;
-import org.apache.airavata.client.api.UserManager;
-
-public class UserManagerImpl implements UserManager {
- private AiravataClient client;
-
- public UserManagerImpl(AiravataClient client) {
- setClient(client);
- }
-
- @Override
- public String getAiravataUser() {
- return getClient().getCurrentUser();
- }
- public AiravataClient getClient() {
- return client;
- }
- public void setClient(AiravataClient client) {
- this.client = client;
- }
-
-}
[2/9] airavata git commit: removing previous airavata client API -
AIRAVATA-1371
Posted by ch...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/32fff944/modules/airavata-client/src/main/java/org/apache/airavata/client/tools/DocumentCreatorNew.java
----------------------------------------------------------------------
diff --git a/modules/airavata-client/src/main/java/org/apache/airavata/client/tools/DocumentCreatorNew.java b/modules/airavata-client/src/main/java/org/apache/airavata/client/tools/DocumentCreatorNew.java
deleted file mode 100644
index 1936593..0000000
--- a/modules/airavata-client/src/main/java/org/apache/airavata/client/tools/DocumentCreatorNew.java
+++ /dev/null
@@ -1,823 +0,0 @@
-///*
-// *
-// * 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.client.tools;
-//
-//import org.airavata.appcatalog.cpi.AppCatalog;
-//import org.airavata.appcatalog.cpi.AppCatalogException;
-//import org.apache.airavata.api.Airavata;
-//import org.apache.airavata.common.utils.ClientSettings;
-//import org.apache.airavata.model.appcatalog.appdeployment.ApplicationDeploymentDescription;
-//import org.apache.airavata.model.appcatalog.appdeployment.ApplicationModule;
-//import org.apache.airavata.model.appcatalog.appdeployment.ApplicationParallelismType;
-//import org.apache.airavata.model.appcatalog.appinterface.ApplicationInterfaceDescription;
-//import org.apache.airavata.model.appcatalog.appinterface.DataType;
-//import org.apache.airavata.model.appcatalog.computeresource.*;
-//import org.apache.airavata.model.appcatalog.gatewayprofile.ComputeResourcePreference;
-//import org.apache.airavata.model.appcatalog.gatewayprofile.GatewayResourceProfile;
-//import org.apache.airavata.model.error.AiravataClientException;
-//import org.apache.airavata.model.error.AiravataSystemException;
-//import org.apache.airavata.model.error.InvalidRequestException;
-//import org.apache.thrift.TException;
-//
-//import java.io.File;
-//import java.util.*;
-//
-///**
-// * This class has been moved to integration-tests module, use that instead of this
-// */
-//@Deprecated
-//public class DocumentCreatorNew {
-//
-// private AppCatalog appcatalog = null;
-// private String trestleshpcHostAddress = "trestles.sdsc.edu";
-// private String lonestarHostAddress = "lonestar.tacc.utexas.edu";
-// private String stampedeHostAddress = "stampede.tacc.xsede.org";
-// private String gridftpAddress = "gsiftp://trestles-dm1.sdsc.edu:2811";
-// private String gramAddress = "trestles-login1.sdsc.edu:2119/jobmanager-pbstest2";
-// private String bigRed2HostAddress = "bigred2.uits.iu.edu";
-//
-// //App Module Id's
-// private static String echoModuleId;
-// private static String amberModuleId;
-// private static String autoDockModuleId;
-// private static String espressoModuleId;
-// private static String gromacsModuleId;
-// private static String lammpsModuleId;
-// private static String nwChemModuleId;
-// private static String trinityModuleId;
-// private static String wrfModuleId;
-// private Airavata.Client client;
-// private GatewayResourceProfile gatewayResourceProfile;
-//
-// public DocumentCreatorNew(Airavata.Client client) throws AppCatalogException {
-// this.client = client;
-// }
-//
-// public String createLocalHostDocs() throws AppCatalogException, InvalidRequestException, AiravataClientException, AiravataSystemException, TException {
-// //Define compute resource host
-// ComputeResourceDescription host = DocumentCreatorUtils.createComputeResourceDescription(
-// "localhost", new ArrayList<String>(Arrays.asList(new String[]{"127.0.0.1"})), new ArrayList<String>(Arrays.asList(new String[]{"127.0.0.1"})));
-//// host.setIsEmpty(true);
-// host.setComputeResourceId(client.registerComputeResource(host));
-//
-// LOCALSubmission localSubmission = new LOCALSubmission();
-// ResourceJobManager resourceJobManager = DocumentCreatorUtils.createResourceJobManager(ResourceJobManagerType.FORK, null, null, null);
-// localSubmission.setResourceJobManager(resourceJobManager);
-// client.addLocalSubmissionDetails(host.getComputeResourceId(), 1, localSubmission);
-//
-// LOCALDataMovement localDataMovement = new LOCALDataMovement();
-// client.addLocalDataMovementDetails(host.getComputeResourceId(), 1, localDataMovement);
-//
-// //Define application module
-// ApplicationModule module = DocumentCreatorUtils.createApplicationModule("echo", "1.0.0", "Local host echo applications");
-// module.setAppModuleId(client.registerApplicationModule(module));
-//
-// //Define application interfaces
-// ApplicationInterfaceDescription application = new ApplicationInterfaceDescription();
-//// application.setIsEmpty(false);
-// application.setApplicationName("SimpleEcho0");
-// application.addToApplicationModules(module.getAppModuleId());
-// application.addToApplicationInputs(DocumentCreatorUtils.createAppInput("echo_input", "echo_input", "Echo Input Data", null, DataType.STRING));
-// application.addToApplicationOutputs(DocumentCreatorUtils.createAppOutput("echo_output", null, DataType.STRING));
-// application.setApplicationInterfaceId(client.registerApplicationInterface(application));
-//
-// //Define application deployment
-// ApplicationDeploymentDescription deployment = DocumentCreatorUtils.createApplicationDeployment(host.getComputeResourceId(), module.getAppModuleId(), "/bin/echo", ApplicationParallelismType.SERIAL, "Local echo app depoyment");
-// deployment.setAppDeploymentId(client.registerApplicationDeployment(deployment));
-//
-// //Define gateway profile
-// ComputeResourcePreference computeResourcePreference = DocumentCreatorUtils.createComputeResourcePreference(
-// host.getComputeResourceId(), "/tmp", null,
-// false, null,
-// null, null);
-// gatewayResourceProfile = new GatewayResourceProfile();
-//// gatewayResourceProfile.setGatewayID("default");
-// gatewayResourceProfile.setGatewayName(ClientSettings.getSetting("default.registry.gateway", "php_reference_gateway"));
-// gatewayResourceProfile.addToComputeResourcePreferences(computeResourcePreference);
-// String gatewayId = client.registerGatewayResourceProfile(gatewayResourceProfile);
-// gatewayResourceProfile.setGatewayID(gatewayId);
-// client.addGatewayComputeResourcePreference(gatewayResourceProfile.getGatewayID(), host.getComputeResourceId(), computeResourcePreference);
-// return host.getComputeResourceId() + "," + application.getApplicationInterfaceId();
-// }
-//
-// private GatewayResourceProfile getGatewayResourceProfile() throws InvalidRequestException, AiravataClientException, AiravataSystemException, TException {
-//// if (gatewayResourceProfile==null){
-//// try {
-//// gatewayResourceProfile = client.getGatewayResourceProfile(ga);
-//// } catch (Exception e) {
-////
-//// }
-// if (gatewayResourceProfile == null) {
-// gatewayResourceProfile = new GatewayResourceProfile();
-//// gatewayResourceProfile.setGatewayID("default");
-// gatewayResourceProfile.setGatewayName("default");
-// gatewayResourceProfile.setGatewayID(client.registerGatewayResourceProfile(gatewayResourceProfile));
-// }
-//// }
-// return gatewayResourceProfile;
-//
-// }
-//
-// public String createSSHHostDocs() throws AppCatalogException, InvalidRequestException, AiravataClientException, AiravataSystemException, TException {
-// ComputeResourceDescription host = DocumentCreatorUtils.createComputeResourceDescription("gw111.iu.xsede.org", null, null);
-// host.addToIpAddresses("gw111.iu.xsede.org");
-// host.addToHostAliases("gw111.iu.xsede.org");
-// host.setResourceDescription("gw111 ssh access");
-// host.setComputeResourceId(client.registerComputeResource(host));
-//
-//
-// SSHJobSubmission jobSubmission = new SSHJobSubmission();
-// jobSubmission.setSshPort(22);
-// jobSubmission.setSecurityProtocol(SecurityProtocol.SSH_KEYS);
-// ResourceJobManager resourceJobManager = DocumentCreatorUtils.createResourceJobManager(ResourceJobManagerType.FORK, null, null, null);
-// jobSubmission.setResourceJobManager(resourceJobManager);
-// client.addSSHJobSubmissionDetails(host.getComputeResourceId(), 1, jobSubmission);
-//
-// SCPDataMovement scpDataMovement = new SCPDataMovement();
-// scpDataMovement.setSecurityProtocol(SecurityProtocol.SSH_KEYS);
-// scpDataMovement.setSshPort(22);
-// client.addSCPDataMovementDetails(host.getComputeResourceId(), 1, scpDataMovement);
-//
-// ApplicationModule module = DocumentCreatorUtils.createApplicationModule("echo", "1.1", null);
-// module.setAppModuleId(client.registerApplicationModule(module));
-// ;
-//
-// ApplicationDeploymentDescription deployment = DocumentCreatorUtils.createApplicationDeployment(host.getComputeResourceId(), module.getAppModuleId(), "/bin/echo", ApplicationParallelismType.SERIAL, "SSHEchoApplication");
-// client.registerApplicationDeployment(deployment);
-//
-// ApplicationInterfaceDescription application = new ApplicationInterfaceDescription();
-//// application.setIsEmpty(false);
-// application.setApplicationName("SSHEcho1");
-// application.addToApplicationModules(module.getAppModuleId());
-// application.addToApplicationInputs(DocumentCreatorUtils.createAppInput("echo_input", "echo_input", null, null, DataType.STRING));
-// application.addToApplicationOutputs(DocumentCreatorUtils.createAppOutput("echo_output", null, DataType.STRING));
-// client.registerApplicationInterface(application);
-// client.addGatewayComputeResourcePreference(getGatewayResourceProfile().getGatewayID(), host.getComputeResourceId(), DocumentCreatorUtils.createComputeResourcePreference(host.getComputeResourceId(), "/tmp", null, false, null, null, null));
-// return host.getComputeResourceId() + "," + application.getApplicationInterfaceId();
-// }
-//
-// //
-//// public void createGramDocs() {
-////// /*
-////// creating host descriptor for gram
-////// */
-////// HostDescription host = new HostDescription(GlobusHostType.type);
-////// host.getType().setHostAddress(trestleshpcHostAddress);
-////// host.getType().setHostName(trestleshpcHostAddress);
-////// ((GlobusHostType) host.getType()).setGlobusGateKeeperEndPointArray(new String[]{gramAddress});
-////// ((GlobusHostType) host.getType()).setGridFTPEndPointArray(new String[]{gridftpAddress});
-////// try {
-////// airavataAPI.getApplicationManager().saveHostDescription(host);
-////// } catch (AiravataAPIInvocationException e) {
-////// e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.
-////// }
-//////
-//////
-////// /*
-////// * Service Description creation and saving
-////// */
-////// String serviceName = "SimpleEcho1";
-////// ServiceDescription serv = new ServiceDescription();
-////// serv.getType().setName(serviceName);
-//////
-////// List<InputParameterType> inputList = new ArrayList<InputParameterType>();
-////// List<OutputParameterType> outputList = new ArrayList<OutputParameterType>();
-//////
-////// InputParameterType input = InputParameterType.Factory.newInstance();
-////// input.setParameterName("echo_input");
-////// ParameterType parameterType = input.addNewParameterType();
-////// parameterType.setType(DataType.STRING);
-////// parameterType.setName("String");
-//////
-////// OutputParameterType output = OutputParameterType.Factory.newInstance();
-////// output.setParameterName("echo_output");
-////// ParameterType parameterType1 = output.addNewParameterType();
-////// parameterType1.setType(DataType.STRING);
-////// parameterType1.setName("String");
-//////
-////// inputList.add(input);
-////// outputList.add(output);
-//////
-////// InputParameterType[] inputParamList = inputList.toArray(new InputParameterType[inputList.size()]);
-////// OutputParameterType[] outputParamList = outputList.toArray(new OutputParameterType[outputList.size()]);
-//////
-////// serv.getType().setInputParametersArray(inputParamList);
-////// serv.getType().setOutputParametersArray(outputParamList);
-////// try {
-////// airavataAPI.getApplicationManager().saveServiceDescription(serv);
-////// } catch (AiravataAPIInvocationException e) {
-////// e.printStackTrace();
-////// }
-//////
-////// /*
-////// Application descriptor creation and saving
-////// */
-////// ApplicationDescription appDesc = new ApplicationDescription(HpcApplicationDeploymentType.type);
-////// HpcApplicationDeploymentType app = (HpcApplicationDeploymentType) appDesc.getType();
-////// ApplicationDeploymentDescriptionType.ApplicationName name = ApplicationDeploymentDescriptionType.ApplicationName.Factory.newInstance();
-////// name.setStringValue("EchoLocal");
-////// app.setApplicationName(name);
-////// ProjectAccountType projectAccountType = app.addNewProjectAccount();
-////// projectAccountType.setProjectAccountNumber("sds128");
-//////
-////// QueueType queueType = app.addNewQueue();
-////// queueType.setQueueName("normal");
-//////
-////// app.setCpuCount(1);
-////// app.setJobType(JobTypeType.SERIAL);
-////// app.setNodeCount(1);
-////// app.setProcessorsPerNode(1);
-//////
-////// /*
-////// * Use bat file if it is compiled on Windows
-////// */
-////// app.setExecutableLocation("/bin/echo");
-//////
-////// /*
-////// * Default tmp location
-////// */
-////// String tempDir = "/home/ogce/scratch";
-////// app.setScratchWorkingDirectory(tempDir);
-////// app.setMaxMemory(10);
-//////
-//////
-////// try {
-////// airavataAPI.getApplicationManager().saveApplicationDescription(serviceName, trestleshpcHostAddress, appDesc);
-////// } catch (AiravataAPIInvocationException e) {
-////// e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.
-////// }
-//// }
-////
-// public String createPBSDocsForOGCE_Echo() throws AppCatalogException, InvalidRequestException, AiravataClientException, AiravataSystemException, TException {
-//
-// ComputeResourceDescription host = DocumentCreatorUtils.createComputeResourceDescription(trestleshpcHostAddress, null, null);
-// host.addToIpAddresses(trestleshpcHostAddress);
-// host.addToHostAliases(trestleshpcHostAddress);
-// host.setComputeResourceId(client.registerComputeResource(host));
-//
-// SSHJobSubmission sshJobSubmission = new SSHJobSubmission();
-// ResourceJobManager resourceJobManager = DocumentCreatorUtils.createResourceJobManager(ResourceJobManagerType.PBS, "/opt/torque/bin/", null, null);
-// sshJobSubmission.setResourceJobManager(resourceJobManager);
-// sshJobSubmission.setSecurityProtocol(SecurityProtocol.GSI);
-// sshJobSubmission.setSshPort(22);
-// client.addSSHJobSubmissionDetails(host.getComputeResourceId(), 1, sshJobSubmission);
-//
-// SCPDataMovement scpDataMovement = new SCPDataMovement();
-// scpDataMovement.setSecurityProtocol(SecurityProtocol.GSI);
-// scpDataMovement.setSshPort(22);
-//
-// client.addSCPDataMovementDetails(host.getComputeResourceId(), 1, scpDataMovement);
-//
-// ApplicationModule module1 = DocumentCreatorUtils.createApplicationModule("echo", "1.2", null);
-// module1.setAppModuleId(client.registerApplicationModule(module1));
-//
-// ApplicationInterfaceDescription application = new ApplicationInterfaceDescription();
-//// application.setIsEmpty(false);
-// application.setApplicationName("SimpleEcho2");
-// application.addToApplicationModules(module1.getAppModuleId());
-// application.addToApplicationInputs(DocumentCreatorUtils.createAppInput("echo_input", "echo_input", "echo_input", null, DataType.STRING));
-// application.addToApplicationOutputs(DocumentCreatorUtils.createAppOutput("echo_output", null, DataType.STRING));
-//
-// application.setApplicationInterfaceId(client.registerApplicationInterface(application));
-//
-// ApplicationDeploymentDescription deployment = DocumentCreatorUtils.createApplicationDeployment(host.getComputeResourceId(), module1.getAppModuleId(), "/home/ogce/echo.sh", ApplicationParallelismType.SERIAL, "Echo application");
-// deployment.setAppDeploymentId(client.registerApplicationDeployment(deployment));
-//
-// client.addGatewayComputeResourcePreference(getGatewayResourceProfile().getGatewayID(), host.getComputeResourceId(), DocumentCreatorUtils.createComputeResourcePreference(host.getComputeResourceId(), "/oasis/scratch/trestles/ogce/temp_project/", "sds128", false, null, null, null));
-// return host.getComputeResourceId() + "," + application.getApplicationInterfaceId();
-// }
-//
-// public String createPBSDocsForOGCE_WRF() throws AppCatalogException, InvalidRequestException, AiravataClientException, AiravataSystemException, TException {
-//
-// ComputeResourceDescription host = DocumentCreatorUtils.createComputeResourceDescription(trestleshpcHostAddress, null, null);
-// host.addToIpAddresses(trestleshpcHostAddress);
-// host.addToHostAliases(trestleshpcHostAddress);
-// host.setComputeResourceId(client.registerComputeResource(host));
-//
-// SSHJobSubmission sshJobSubmission = new SSHJobSubmission();
-// ResourceJobManager resourceJobManager = DocumentCreatorUtils.createResourceJobManager(ResourceJobManagerType.PBS, "/opt/torque/bin/", null, null);
-// sshJobSubmission.setResourceJobManager(resourceJobManager);
-// sshJobSubmission.setSecurityProtocol(SecurityProtocol.GSI);
-// sshJobSubmission.setSshPort(22);
-// client.addSSHJobSubmissionDetails(host.getComputeResourceId(), 1, sshJobSubmission);
-//
-// SCPDataMovement scpDataMovement = new SCPDataMovement();
-// scpDataMovement.setSecurityProtocol(SecurityProtocol.GSI);
-// scpDataMovement.setSshPort(22);
-//
-// client.addSCPDataMovementDetails(host.getComputeResourceId(), 1, scpDataMovement);
-//
-// client.addGatewayComputeResourcePreference(getGatewayResourceProfile().getGatewayID(), host.getComputeResourceId(), DocumentCreatorUtils.createComputeResourcePreference(host.getComputeResourceId(), "/oasis/scratch/trestles/ogce/temp_project/", "sds128", false, null, null, null));
-//
-// ApplicationModule module2 = DocumentCreatorUtils.createApplicationModule("wrf", "1.0.0", null);
-// module2.setAppModuleId(client.registerApplicationModule(module2));
-// ApplicationInterfaceDescription application2 = new ApplicationInterfaceDescription();
-//// application2.setIsEmpty(false);
-// application2.setApplicationName("WRF");
-// application2.addToApplicationModules(module2.getAppModuleId());
-// application2.addToApplicationInputs(DocumentCreatorUtils.createAppInput("WRF_Namelist", "WRF_Namelist", null, null, DataType.URI));
-// application2.addToApplicationInputs(DocumentCreatorUtils.createAppInput("WRF_Boundary_File", "WRF_Boundary_File", null, null, DataType.URI));
-// application2.addToApplicationInputs(DocumentCreatorUtils.createAppInput("WRF_Input_File", "WRF_Input_File", null, null, DataType.URI));
-//
-// application2.addToApplicationOutputs(DocumentCreatorUtils.createAppOutput("WRF_Output", null, DataType.URI));
-// application2.addToApplicationOutputs(DocumentCreatorUtils.createAppOutput("WRF_Execution_Log", null, DataType.URI));
-// application2.setApplicationInterfaceId(client.registerApplicationInterface(application2));
-//
-// ApplicationDeploymentDescription deployment2 = DocumentCreatorUtils.createApplicationDeployment(host.getComputeResourceId(), module2.getAppModuleId(), "/home/ogce/production/app_wrappers/wrf_wrapper.sh", ApplicationParallelismType.MPI, "WRF");
-// deployment2.setAppDeploymentId(client.registerApplicationDeployment(deployment2));
-// return host.getComputeResourceId() + "," + application2.getApplicationInterfaceId();
-// }
-//
-// public String createSlumWRFDocs() throws AppCatalogException, TException {
-// ComputeResourceDescription host = DocumentCreatorUtils.createComputeResourceDescription(stampedeHostAddress, null, null);
-// host.addToHostAliases(stampedeHostAddress);
-// host.addToIpAddresses(stampedeHostAddress);
-// host.setComputeResourceId(client.registerComputeResource(host));
-//
-// ResourceJobManager resourceJobManager = DocumentCreatorUtils.createResourceJobManager(ResourceJobManagerType.SLURM, "/usr/bin/", null, "push");
-// SSHJobSubmission sshJobSubmission = new SSHJobSubmission();
-// sshJobSubmission.setResourceJobManager(resourceJobManager);
-// sshJobSubmission.setSecurityProtocol(SecurityProtocol.GSI);
-// sshJobSubmission.setSshPort(2222);
-//
-// client.addSSHJobSubmissionDetails(host.getComputeResourceId(), 1, sshJobSubmission);
-// SCPDataMovement scpDataMovement = new SCPDataMovement();
-// scpDataMovement.setSecurityProtocol(SecurityProtocol.GSI);
-// scpDataMovement.setSshPort(22);
-// client.addSCPDataMovementDetails(host.getComputeResourceId(), 1, scpDataMovement);
-// client.addSCPDataMovementDetails(host.getComputeResourceId(), 1, scpDataMovement);
-//
-// client.addGatewayComputeResourcePreference(getGatewayResourceProfile().getGatewayID(), host.getComputeResourceId(), DocumentCreatorUtils.createComputeResourcePreference(host.getComputeResourceId(), "/home1/01437/ogce", "TG-STA110014S", false, null, null, null));
-//
-// ApplicationModule module2 = DocumentCreatorUtils.createApplicationModule("wrf", "1.0.0", null);
-// module2.setAppModuleId(client.registerApplicationModule(module2));
-// ApplicationInterfaceDescription application2 = new ApplicationInterfaceDescription();
-// // application2.setIsEmpty(false);
-// application2.setApplicationName("WRF");
-// application2.addToApplicationModules(module2.getAppModuleId());
-// application2.addToApplicationInputs(DocumentCreatorUtils.createAppInput("WRF_Namelist", "WRF_Namelist", null, null, DataType.URI));
-// application2.addToApplicationInputs(DocumentCreatorUtils.createAppInput("WRF_Boundary_File", "WRF_Boundary_File", null, null, DataType.URI));
-// application2.addToApplicationInputs(DocumentCreatorUtils.createAppInput("WRF_Input_File", "WRF_Input_File", null, null, DataType.URI));
-//
-// application2.addToApplicationOutputs(DocumentCreatorUtils.createAppOutput("WRF_Output", null, DataType.URI));
-// application2.addToApplicationOutputs(DocumentCreatorUtils.createAppOutput("WRF_Execution_Log", null, DataType.URI));
-// application2.setApplicationInterfaceId(client.registerApplicationInterface(application2));
-//
-// ApplicationDeploymentDescription deployment2 = DocumentCreatorUtils.createApplicationDeployment(host.getComputeResourceId(), module2.getAppModuleId(), "/home1/01437/ogce/production/app_wrappers/wrf_wrapper.sh", ApplicationParallelismType.MPI, "WRF");
-// deployment2.setAppDeploymentId(client.registerApplicationDeployment(deployment2));
-// return host.getComputeResourceId() + "," + application2.getApplicationInterfaceId();
-//
-// }
-//
-// public String createSlurmDocs() throws AppCatalogException, InvalidRequestException, AiravataClientException, AiravataSystemException, TException {
-// ComputeResourceDescription host = DocumentCreatorUtils.createComputeResourceDescription(stampedeHostAddress, null, null);
-// host.addToHostAliases(stampedeHostAddress);
-// host.addToIpAddresses(stampedeHostAddress);
-// host.setComputeResourceId(client.registerComputeResource(host));
-//
-// ResourceJobManager resourceJobManager = DocumentCreatorUtils.createResourceJobManager(ResourceJobManagerType.SLURM, "/usr/bin/", null, "push");
-// SSHJobSubmission sshJobSubmission = new SSHJobSubmission();
-// sshJobSubmission.setResourceJobManager(resourceJobManager);
-// sshJobSubmission.setSecurityProtocol(SecurityProtocol.GSI);
-// sshJobSubmission.setSshPort(2222);
-// client.addSSHJobSubmissionDetails(host.getComputeResourceId(), 1, sshJobSubmission);
-//
-// SCPDataMovement scpDataMovement = new SCPDataMovement();
-// scpDataMovement.setSecurityProtocol(SecurityProtocol.GSI);
-// scpDataMovement.setSshPort(22);
-// client.addSCPDataMovementDetails(host.getComputeResourceId(), 1, scpDataMovement);
-//
-// ApplicationModule module = DocumentCreatorUtils.createApplicationModule("echo", "1.3", null);
-// module.setAppModuleId(client.registerApplicationModule(module));
-//
-// ApplicationInterfaceDescription application = new ApplicationInterfaceDescription();
-//// application.setIsEmpty(false);
-// application.setApplicationName("SimpleEcho3");
-// application.addToApplicationModules(module.getAppModuleId());
-// application.addToApplicationInputs(DocumentCreatorUtils.createAppInput("echo_input", "echo_input", null, null, DataType.STRING));
-// application.addToApplicationOutputs(DocumentCreatorUtils.createAppOutput("echo_output", null, DataType.STRING));
-// application.setApplicationInterfaceId(client.registerApplicationInterface(application));
-//
-// ApplicationDeploymentDescription deployment = DocumentCreatorUtils.createApplicationDeployment(host.getComputeResourceId(), module.getAppModuleId(), "/bin/echo", ApplicationParallelismType.SERIAL, "EchoLocal");
-// deployment.setAppDeploymentId(client.registerApplicationDeployment(deployment));
-//
-// client.addGatewayComputeResourcePreference(getGatewayResourceProfile().getGatewayID(), host.getComputeResourceId(), DocumentCreatorUtils.createComputeResourcePreference(host.getComputeResourceId(), "/home1/01437/ogce", "TG-STA110014S", false, null, null, null));
-// return host.getComputeResourceId() + "," + application.getApplicationInterfaceId();
-// }
-//
-// public String createSGEDocs() throws AppCatalogException, InvalidRequestException, AiravataClientException, AiravataSystemException, TException {
-// ComputeResourceDescription host = DocumentCreatorUtils.createComputeResourceDescription(lonestarHostAddress, null, null);
-// host.addToHostAliases(lonestarHostAddress);
-// host.addToIpAddresses(lonestarHostAddress);
-// host.setComputeResourceId(client.registerComputeResource(host));
-//
-// ResourceJobManager resourceJobManager = DocumentCreatorUtils.createResourceJobManager(ResourceJobManagerType.UGE, "/opt/sge6.2/bin/lx24-amd64/", null, null);
-// SSHJobSubmission sshJobSubmission = new SSHJobSubmission();
-// sshJobSubmission.setResourceJobManager(resourceJobManager);
-// sshJobSubmission.setSecurityProtocol(SecurityProtocol.GSI);
-// sshJobSubmission.setSshPort(22);
-//
-// client.addSSHJobSubmissionDetails(host.getComputeResourceId(), 1, sshJobSubmission);
-//
-// SCPDataMovement scpDataMovement = new SCPDataMovement();
-// scpDataMovement.setSecurityProtocol(SecurityProtocol.GSI);
-// scpDataMovement.setSshPort(22);
-// client.addSCPDataMovementDetails(host.getComputeResourceId(), 1, scpDataMovement);
-//
-// ApplicationModule module = DocumentCreatorUtils.createApplicationModule("echo", "1.4", null);
-// module.setAppModuleId(client.registerApplicationModule(module));
-//
-// ApplicationInterfaceDescription application = new ApplicationInterfaceDescription();
-//// application.setIsEmpty(false);
-// application.setApplicationName("SimpleEcho4");
-// application.addToApplicationModules(module.getAppModuleId());
-// application.addToApplicationInputs(DocumentCreatorUtils.createAppInput("echo_input", "echo_input", null, null, DataType.STRING));
-// application.addToApplicationOutputs(DocumentCreatorUtils.createAppOutput("echo_output", null, DataType.STRING));
-// application.setApplicationInterfaceId(client.registerApplicationInterface(application));
-//
-// ApplicationDeploymentDescription deployment = DocumentCreatorUtils.createApplicationDeployment(host.getComputeResourceId(), module.getAppModuleId(), "/bin/echo", ApplicationParallelismType.SERIAL, "EchoLocal");
-// deployment.setAppDeploymentId(client.registerApplicationDeployment(deployment));
-//
-// client.addGatewayComputeResourcePreference(getGatewayResourceProfile().getGatewayID(), host.getComputeResourceId(), DocumentCreatorUtils.createComputeResourcePreference(host.getComputeResourceId(), "/home1/01437/ogce", "TG-STA110014S", false, null, null, null));
-// return host.getComputeResourceId() + "," + application.getApplicationInterfaceId();
-// }
-//
-//// public void createEchoHostDocs() {
-//// String serviceName = "Echo";
-//// ServiceDescription serviceDescription = new ServiceDescription();
-//// List<InputParameterType> inputParameters = new ArrayList<InputParameterType>();
-//// List<OutputParameterType> outputParameters = new ArrayList<OutputParameterType>();
-//// serviceDescription.getType().setName(serviceName);
-//// serviceDescription.getType().setDescription("Echo service");
-//// // Creating input parameters
-//// InputParameterType parameter = InputParameterType.Factory.newInstance();
-//// parameter.setParameterName("echo_input");
-//// parameter.setParameterDescription("echo input");
-//// ParameterType parameterType = parameter.addNewParameterType();
-//// parameterType.setType(DataType.STRING);
-//// parameterType.setName("String");
-//// inputParameters.add(parameter);
-////
-//// // Creating output parameters
-//// OutputParameterType outputParameter = OutputParameterType.Factory.newInstance();
-//// outputParameter.setParameterName("echo_output");
-//// outputParameter.setParameterDescription("Echo output");
-//// ParameterType outputParaType = outputParameter.addNewParameterType();
-//// outputParaType.setType(DataType.STRING);
-//// outputParaType.setName("String");
-//// outputParameters.add(outputParameter);
-////
-//// // Setting input and output parameters to serviceDescriptor
-//// serviceDescription.getType().setInputParametersArray(inputParameters.toArray(new InputParameterType[] {}));
-//// serviceDescription.getType().setOutputParametersArray(outputParameters.toArray(new OutputParameterType[] {}));
-////
-//// try {
-//// airavataAPI.getApplicationManager().saveServiceDescription(serviceDescription);
-//// } catch (AiravataAPIInvocationException e) {
-//// e.printStackTrace(); // To change body of catch statement use File |
-//// // Settings | File Templates.
-//// }
-//// // Localhost
-//// ApplicationDescription applicationDeploymentDescription = new ApplicationDescription();
-//// ApplicationDeploymentDescriptionType applicationDeploymentDescriptionType = applicationDeploymentDescription.getType();
-//// applicationDeploymentDescriptionType.addNewApplicationName().setStringValue(serviceName);
-//// applicationDeploymentDescriptionType.setExecutableLocation("/bin/echo");
-//// applicationDeploymentDescriptionType.setScratchWorkingDirectory("/tmp");
-////
-//// try {
-//// airavataAPI.getApplicationManager().saveApplicationDescription(serviceName, "localhost", applicationDeploymentDescription);
-//// } catch (AiravataAPIInvocationException e) {
-//// e.printStackTrace(); // To change body of catch statement use File |
-//// // Settings | File Templates.
-//// }
-//// // Stampede
-//// /*
-//// * Application descriptor creation and saving
-//// */
-//// ApplicationDescription appDesc1 = new ApplicationDescription(HpcApplicationDeploymentType.type);
-//// HpcApplicationDeploymentType app1 = (HpcApplicationDeploymentType) appDesc1.getType();
-//// ApplicationDeploymentDescriptionType.ApplicationName name = ApplicationDeploymentDescriptionType.ApplicationName.Factory.newInstance();
-//// name.setStringValue(serviceName);
-//// app1.setApplicationName(name);
-//// ProjectAccountType projectAccountType = app1.addNewProjectAccount();
-//// projectAccountType.setProjectAccountNumber("TG-STA110014S");
-////
-//// QueueType queueType = app1.addNewQueue();
-//// queueType.setQueueName("normal");
-////
-//// app1.setCpuCount(1);
-//// app1.setJobType(JobTypeType.SERIAL);
-//// app1.setNodeCount(1);
-//// app1.setProcessorsPerNode(1);
-//// app1.setMaxWallTime(10);
-//// /*
-//// * Use bat file if it is compiled on Windows
-//// */
-//// app1.setExecutableLocation("/bin/echo");
-////
-//// /*
-//// * Default tmp location
-//// */
-//// String tempDir = "/home1/01437/ogce";
-////
-//// app1.setScratchWorkingDirectory(tempDir);
-//// app1.setInstalledParentPath("/usr/bin/");
-////
-//// try {
-//// airavataAPI.getApplicationManager().saveApplicationDescription(serviceName, stampedeHostAddress, appDesc1);
-//// } catch (AiravataAPIInvocationException e) {
-//// e.printStackTrace(); // To change body of catch statement use File |
-//// // Settings | File Templates.
-//// }
-//// // Trestles
-//// /*
-//// * Application descriptor creation and saving
-//// */
-//// ApplicationDescription appDesc2 = new ApplicationDescription(HpcApplicationDeploymentType.type);
-//// HpcApplicationDeploymentType app2 = (HpcApplicationDeploymentType) appDesc2.getType();
-//// ApplicationDeploymentDescriptionType.ApplicationName name2 = ApplicationDeploymentDescriptionType.ApplicationName.Factory.newInstance();
-//// name2.setStringValue(serviceName);
-//// app2.setApplicationName(name);
-//// ProjectAccountType projectAccountType2 = app2.addNewProjectAccount();
-//// projectAccountType2.setProjectAccountNumber("sds128");
-////
-//// QueueType queueType2 = app2.addNewQueue();
-//// queueType2.setQueueName("normal");
-////
-//// app2.setCpuCount(1);
-//// app2.setJobType(JobTypeType.SERIAL);
-//// app2.setNodeCount(1);
-//// app2.setProcessorsPerNode(1);
-//// app2.setMaxWallTime(10);
-//// /*
-//// * Use bat file if it is compiled on Windows
-//// */
-//// app2.setExecutableLocation("/bin/echo");
-////
-//// /*
-//// * Default tmp location
-//// */
-//// String tempDir2 = "/home/ogce/scratch";
-////
-//// app2.setScratchWorkingDirectory(tempDir2);
-//// app2.setInstalledParentPath("/opt/torque/bin/");
-////
-//// try {
-//// airavataAPI.getApplicationManager().saveApplicationDescription(serviceName, trestleshpcHostAddress, appDesc2);
-//// } catch (AiravataAPIInvocationException e) {
-//// e.printStackTrace(); // To change body of catch statement use File |
-//// // Settings | File Templates.
-//// }
-//// // Lonestar
-//// /*
-//// * Application descriptor creation and saving
-//// */
-//// ApplicationDescription appDesc3 = new ApplicationDescription(HpcApplicationDeploymentType.type);
-//// HpcApplicationDeploymentType app3 = (HpcApplicationDeploymentType) appDesc3.getType();
-//// ApplicationDeploymentDescriptionType.ApplicationName name3 = ApplicationDeploymentDescriptionType.ApplicationName.Factory.newInstance();
-//// name3.setStringValue(serviceName);
-//// app3.setApplicationName(name);
-//// ProjectAccountType projectAccountType3 = app3.addNewProjectAccount();
-//// projectAccountType3.setProjectAccountNumber("TG-STA110014S");
-////
-//// QueueType queueType3 = app3.addNewQueue();
-//// queueType3.setQueueName("normal");
-////
-//// app3.setCpuCount(1);
-//// app3.setJobType(JobTypeType.SERIAL);
-//// app3.setNodeCount(1);
-//// app3.setProcessorsPerNode(1);
-//// app3.setMaxWallTime(10);
-//// /*
-//// * Use bat file if it is compiled on Windows
-//// */
-//// app3.setExecutableLocation("/bin/echo");
-////
-//// /*
-//// * Default tmp location
-//// */
-//// String tempDir3 = "/home1/01437/ogce";
-////
-//// app3.setScratchWorkingDirectory(tempDir3);
-//// app3.setInstalledParentPath("/opt/sge6.2/bin/lx24-amd64/");
-////
-//// try {
-//// airavataAPI.getApplicationManager().saveApplicationDescription(serviceName, lonestarHostAddress, appDesc3);
-//// } catch (AiravataAPIInvocationException e) {
-//// e.printStackTrace(); // To change body of catch statement use File |
-//// // Settings | File Templates.
-//// }
-////
-//// }
-//
-// public String createBigRedDocs() throws InvalidRequestException, AiravataClientException, AiravataSystemException, TException, AppCatalogException {
-// ComputeResourceDescription host = DocumentCreatorUtils.createComputeResourceDescription("bigred2", null, null);
-// host.addToHostAliases(bigRed2HostAddress);
-// host.addToIpAddresses(bigRed2HostAddress);
-// host.setComputeResourceId(client.registerComputeResource(host));
-//
-//
-// Map<JobManagerCommand, String> commands = new HashMap<JobManagerCommand, String>();
-// commands.put(JobManagerCommand.SUBMISSION, "aprun -n");
-// ResourceJobManager resourceJobManager = DocumentCreatorUtils.createResourceJobManager(ResourceJobManagerType.UGE, "/opt/torque/torque-4.2.3.1/bin/", commands, null);
-// SSHJobSubmission sshJobSubmission = new SSHJobSubmission();
-// sshJobSubmission.setResourceJobManager(resourceJobManager);
-// sshJobSubmission.setSecurityProtocol(SecurityProtocol.SSH_KEYS);
-// sshJobSubmission.setSshPort(22);
-//
-// client.addSSHJobSubmissionDetails(host.getComputeResourceId(), 1, sshJobSubmission);
-//
-// SCPDataMovement scpDataMovement = new SCPDataMovement();
-// scpDataMovement.setSecurityProtocol(SecurityProtocol.SSH_KEYS);
-// scpDataMovement.setSshPort(22);
-// client.addSCPDataMovementDetails(host.getComputeResourceId(), 1, scpDataMovement);
-//
-// ApplicationModule module = DocumentCreatorUtils.createApplicationModule("echo", "1.5", null);
-// module.setAppModuleId(client.registerApplicationModule(module));
-//
-// ApplicationInterfaceDescription application = new ApplicationInterfaceDescription();
-// application.setApplicationName("SimpleEchoBR");
-// application.addToApplicationModules(module.getAppModuleId());
-// application.addToApplicationInputs(DocumentCreatorUtils.createAppInput("echo_input", "echo_input", null, null, DataType.STRING));
-// application.addToApplicationOutputs(DocumentCreatorUtils.createAppOutput("echo_output", null, DataType.STRING));
-// application.setApplicationInterfaceId(client.registerApplicationInterface(application));
-//
-// ApplicationDeploymentDescription deployment = DocumentCreatorUtils.createApplicationDeployment(host.getComputeResourceId(), module.getAppModuleId(), "/N/u/lginnali/BigRed2/myjob/test.sh", ApplicationParallelismType.SERIAL, "EchoLocal");
-// deployment.setAppDeploymentId(client.registerApplicationDeployment(deployment));
-//
-// String date = (new Date()).toString();
-// date = date.replaceAll(" ", "_");
-// date = date.replaceAll(":", "_");
-// String tempDir = "/N/u/lginnali/BigRed2/myjob";
-// tempDir = tempDir + File.separator + "SimpleEcho" + "_" + date + "_" + UUID.randomUUID();
-//
-// client.addGatewayComputeResourcePreference(getGatewayResourceProfile().getGatewayID(), host.getComputeResourceId(), DocumentCreatorUtils.createComputeResourcePreference(host.getComputeResourceId(), tempDir, "TG-STA110014S", false, null, null, null));
-//
-//
-// return host.getComputeResourceId() + "," + application.getApplicationInterfaceId();
-// }
-//
-// public String createBigRedAmberDocs() throws InvalidRequestException, AiravataClientException, AiravataSystemException, TException, AppCatalogException {
-// ComputeResourceDescription host = DocumentCreatorUtils.createComputeResourceDescription("bigred2", null, null);
-// host.addToHostAliases(bigRed2HostAddress);
-// host.addToIpAddresses(bigRed2HostAddress);
-// host.setComputeResourceId(client.registerComputeResource(host));
-//
-//
-// Map<JobManagerCommand, String> commands = new HashMap<JobManagerCommand, String>();
-// commands.put(JobManagerCommand.SUBMISSION, "aprun -n 4");
-// ResourceJobManager resourceJobManager = DocumentCreatorUtils.createResourceJobManager(ResourceJobManagerType.UGE, "/opt/torque/torque-4.2.3.1/bin/", commands, null);
-// SSHJobSubmission sshJobSubmission = new SSHJobSubmission();
-// sshJobSubmission.setResourceJobManager(resourceJobManager);
-// sshJobSubmission.setSecurityProtocol(SecurityProtocol.SSH_KEYS);
-// sshJobSubmission.setSshPort(22);
-//
-// client.addSSHJobSubmissionDetails(host.getComputeResourceId(), 1, sshJobSubmission);
-//
-// SCPDataMovement scpDataMovement = new SCPDataMovement();
-// scpDataMovement.setSecurityProtocol(SecurityProtocol.SSH_KEYS);
-// scpDataMovement.setSshPort(22);
-// client.addSCPDataMovementDetails(host.getComputeResourceId(), 1, scpDataMovement);
-//
-//
-// ApplicationModule amodule = DocumentCreatorUtils.createApplicationModule("Amber", "12.0", null);
-// amodule.setAppModuleId(client.registerApplicationModule(amodule));
-//
-//
-// ApplicationInterfaceDescription application = new ApplicationInterfaceDescription();
-// application.setApplicationName("AmberBR2");
-// application.addToApplicationModules(amodule.getAppModuleId());
-// application.addToApplicationInputs(DocumentCreatorUtils.createAppInput("AMBER_HEAT_RST", "AMBER_HEAT_RST", null, null, DataType.URI));
-// application.addToApplicationInputs(DocumentCreatorUtils.createAppInput("AMBER_PROD_IN", "AMBER_PROD_IN", null, null, DataType.URI));
-// application.addToApplicationInputs(DocumentCreatorUtils.createAppInput("AMBER_PRMTOP", "AMBER_PRMTOP", null, null, DataType.URI));
-// application.addToApplicationOutputs(DocumentCreatorUtils.createAppOutput("AMBER_Prod.info", null, DataType.URI));
-// application.addToApplicationOutputs(DocumentCreatorUtils.createAppOutput("AMBER_Prod.mdcrd", null, DataType.URI));
-// application.addToApplicationOutputs(DocumentCreatorUtils.createAppOutput("AMBER_Prod.out", null, DataType.URI));
-// application.addToApplicationOutputs(DocumentCreatorUtils.createAppOutput("AMBER_Prod.rst", null, DataType.URI));
-// application.setApplicationInterfaceId(client.registerApplicationInterface(application));
-//
-// ApplicationDeploymentDescription deployment = DocumentCreatorUtils.createApplicationDeployment(host.getComputeResourceId(), amodule.getAppModuleId(), "/N/u/cgateway/BigRed2/sandbox/amber_wrapper.sh", ApplicationParallelismType.SERIAL, "AmberBR2");
-// deployment.setAppDeploymentId(client.registerApplicationDeployment(deployment));
-//
-//
-// String date = (new Date()).toString();
-// date = date.replaceAll(" ", "_");
-// date = date.replaceAll(":", "_");
-// String tempDir = "/N/u/cgateway/BigRed2/sandbox/jobs";
-// tempDir = tempDir + File.separator +
-// "Amber";
-//
-// client.addGatewayComputeResourcePreference(getGatewayResourceProfile().getGatewayID(), host.getComputeResourceId(), DocumentCreatorUtils.createComputeResourcePreference(host.getComputeResourceId(), tempDir, null, false, null, null, null));
-//
-//
-// return host.getComputeResourceId() + "," + application.getApplicationInterfaceId();
-// }
-//
-// public String createStampedeAmberDocs() throws InvalidRequestException, AiravataClientException, AiravataSystemException, TException, AppCatalogException {
-// ComputeResourceDescription host = DocumentCreatorUtils.createComputeResourceDescription(stampedeHostAddress, null, null);
-// host.addToHostAliases(stampedeHostAddress);
-// host.addToIpAddresses(stampedeHostAddress);
-// host.setComputeResourceId(client.registerComputeResource(host));
-//
-// ResourceJobManager resourceJobManager = DocumentCreatorUtils.createResourceJobManager(ResourceJobManagerType.SLURM, "/usr/bin/", null, "push");
-// SSHJobSubmission sshJobSubmission = new SSHJobSubmission();
-// sshJobSubmission.setResourceJobManager(resourceJobManager);
-// sshJobSubmission.setSecurityProtocol(SecurityProtocol.GSI);
-// sshJobSubmission.setSshPort(2222);
-// client.addSSHJobSubmissionDetails(host.getComputeResourceId(), 1, sshJobSubmission);
-//
-// SCPDataMovement scpDataMovement = new SCPDataMovement();
-// scpDataMovement.setSecurityProtocol(SecurityProtocol.GSI);
-// scpDataMovement.setSshPort(22);
-// client.addSCPDataMovementDetails(host.getComputeResourceId(), 1, scpDataMovement);
-// ApplicationModule amodule = DocumentCreatorUtils.createApplicationModule("Amber", "12.0", null);
-// amodule.setAppModuleId(client.registerApplicationModule(amodule));
-//
-//
-// ApplicationInterfaceDescription application = new ApplicationInterfaceDescription();
-// application.setApplicationName("AmberBR2");
-// application.addToApplicationModules(amodule.getAppModuleId());
-// application.addToApplicationInputs(DocumentCreatorUtils.createAppInput("AMBER_HEAT_RST", "AMBER_HEAT_RST", null, null, DataType.URI));
-// application.addToApplicationInputs(DocumentCreatorUtils.createAppInput("AMBER_PROD_IN", "AMBER_PROD_IN", null, null, DataType.URI));
-// application.addToApplicationInputs(DocumentCreatorUtils.createAppInput("AMBER_PRMTOP", "AMBER_PRMTOP", null, null, DataType.URI));
-// application.addToApplicationOutputs(DocumentCreatorUtils.createAppOutput("AMBER_Prod.info", null, DataType.URI));
-// application.addToApplicationOutputs(DocumentCreatorUtils.createAppOutput("AMBER_Prod.mdcrd", null, DataType.URI));
-// application.addToApplicationOutputs(DocumentCreatorUtils.createAppOutput("AMBER_Prod.out", null, DataType.URI));
-// application.addToApplicationOutputs(DocumentCreatorUtils.createAppOutput("AMBER_Prod.rst", null, DataType.URI));
-// application.setApplicationInterfaceId(client.registerApplicationInterface(application));
-//
-// ApplicationDeploymentDescription deployment = DocumentCreatorUtils.createApplicationDeployment(host.getComputeResourceId(), amodule.getAppModuleId(), "/home1/01437/ogce/production/app_wrappers/amber_wrapper.sh", ApplicationParallelismType.SERIAL, "AmberStampede");
-// deployment.setAppDeploymentId(client.registerApplicationDeployment(deployment));
-//
-// client.addGatewayComputeResourcePreference(getGatewayResourceProfile().getGatewayID(), host.getComputeResourceId(), DocumentCreatorUtils.createComputeResourcePreference(host.getComputeResourceId(), "/home1/01437/ogce", "TG-STA110014S", false, null, null, null));
-//
-//
-// return host.getComputeResourceId() + "," + application.getApplicationInterfaceId();
-//
-// }
-//
-// public String createTrestlesAmberDocs() throws InvalidRequestException, AiravataClientException, AiravataSystemException, TException, AppCatalogException {
-// ComputeResourceDescription host = DocumentCreatorUtils.createComputeResourceDescription(trestleshpcHostAddress, null, null);
-// host.addToIpAddresses(trestleshpcHostAddress);
-// host.addToHostAliases(trestleshpcHostAddress);
-// host.setComputeResourceId(client.registerComputeResource(host));
-//
-// SSHJobSubmission sshJobSubmission = new SSHJobSubmission();
-// ResourceJobManager resourceJobManager = DocumentCreatorUtils.createResourceJobManager(ResourceJobManagerType.PBS, "/opt/torque/bin/", null, null);
-// sshJobSubmission.setResourceJobManager(resourceJobManager);
-// sshJobSubmission.setSecurityProtocol(SecurityProtocol.GSI);
-// sshJobSubmission.setSshPort(22);
-// client.addSSHJobSubmissionDetails(host.getComputeResourceId(), 1, sshJobSubmission);
-//
-// SCPDataMovement scpDataMovement = new SCPDataMovement();
-// scpDataMovement.setSecurityProtocol(SecurityProtocol.GSI);
-// scpDataMovement.setSshPort(22);
-// client.addSCPDataMovementDetails(host.getComputeResourceId(), 1, scpDataMovement);
-//
-// ApplicationModule amodule = DocumentCreatorUtils.createApplicationModule("Amber", "12.0", null);
-// amodule.setAppModuleId(client.registerApplicationModule(amodule));
-//
-//
-// ApplicationInterfaceDescription application = new ApplicationInterfaceDescription();
-// application.setApplicationName("AmberTrestles");
-// application.addToApplicationModules(amodule.getAppModuleId());
-// application.addToApplicationInputs(DocumentCreatorUtils.createAppInput("AMBER_HEAT_RST", "AMBER_HEAT_RST", null, null, DataType.URI));
-// application.addToApplicationInputs(DocumentCreatorUtils.createAppInput("AMBER_PROD_IN", "AMBER_PROD_IN", null, null, DataType.URI));
-// application.addToApplicationInputs(DocumentCreatorUtils.createAppInput("AMBER_PRMTOP", "AMBER_PRMTOP", null, null, DataType.URI));
-// application.addToApplicationOutputs(DocumentCreatorUtils.createAppOutput("AMBER_Prod.info", null, DataType.URI));
-// application.addToApplicationOutputs(DocumentCreatorUtils.createAppOutput("AMBER_Prod.mdcrd", null, DataType.URI));
-// application.addToApplicationOutputs(DocumentCreatorUtils.createAppOutput("AMBER_Prod.out", null, DataType.URI));
-// application.addToApplicationOutputs(DocumentCreatorUtils.createAppOutput("AMBER_Prod.rst", null, DataType.URI));
-// application.setApplicationInterfaceId(client.registerApplicationInterface(application));
-//
-// ApplicationDeploymentDescription deployment = DocumentCreatorUtils.createApplicationDeployment(host.getComputeResourceId(), amodule.getAppModuleId(), "/home/ogce/production/app_wrappers/amber_wrapper.sh", ApplicationParallelismType.SERIAL, "AmberStampede");
-// deployment.setAppDeploymentId(client.registerApplicationDeployment(deployment));
-//
-// client.addGatewayComputeResourcePreference(getGatewayResourceProfile().getGatewayID(), host.getComputeResourceId(), DocumentCreatorUtils.createComputeResourcePreference(host.getComputeResourceId(), "/oasis/scratch/trestles/ogce/temp_project/", "sds128", false, null, null, null));
-//
-//
-// return host.getComputeResourceId() + "," + application.getApplicationInterfaceId();
-//
-// }
-//
-//
-//}
-//
http://git-wip-us.apache.org/repos/asf/airavata/blob/32fff944/modules/airavata-client/src/main/java/org/apache/airavata/client/tools/DocumentCreatorUtils.java
----------------------------------------------------------------------
diff --git a/modules/airavata-client/src/main/java/org/apache/airavata/client/tools/DocumentCreatorUtils.java b/modules/airavata-client/src/main/java/org/apache/airavata/client/tools/DocumentCreatorUtils.java
deleted file mode 100644
index d27d8cf..0000000
--- a/modules/airavata-client/src/main/java/org/apache/airavata/client/tools/DocumentCreatorUtils.java
+++ /dev/null
@@ -1,165 +0,0 @@
-/*
- *
- * 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.client.tools;
-
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import org.airavata.appcatalog.cpi.AppCatalogException;
-import org.apache.airavata.model.appcatalog.appdeployment.ApplicationDeploymentDescription;
-import org.apache.airavata.model.appcatalog.appdeployment.ApplicationModule;
-import org.apache.airavata.model.appcatalog.appdeployment.ApplicationParallelismType;
-import org.apache.airavata.model.appcatalog.appinterface.InputDataObjectType;
-import org.apache.airavata.model.appcatalog.appinterface.OutputDataObjectType;
-import org.apache.airavata.model.appcatalog.computeresource.ComputeResourceDescription;
-import org.apache.airavata.model.appcatalog.computeresource.DataMovementInterface;
-import org.apache.airavata.model.appcatalog.computeresource.DataMovementProtocol;
-import org.apache.airavata.model.appcatalog.computeresource.JobManagerCommand;
-import org.apache.airavata.model.appcatalog.computeresource.JobSubmissionInterface;
-import org.apache.airavata.model.appcatalog.computeresource.JobSubmissionProtocol;
-import org.apache.airavata.model.appcatalog.computeresource.ResourceJobManager;
-import org.apache.airavata.model.appcatalog.computeresource.ResourceJobManagerType;
-import org.apache.airavata.model.appcatalog.gatewayprofile.ComputeResourcePreference;
-
-/**
- * This class has been moved to integration-tests module, use that instead of this
- */
-@Deprecated
-public class DocumentCreatorUtils {
-
- public static ComputeResourcePreference createComputeResourcePreference(String computeResourceId, String scratchLocation,
- String allocationProjectNumber, boolean overridebyAiravata,
- String preferredBatchQueue, String preferredJobSubmissionProtocol,
- String preferredDataMovementProtocol) throws AppCatalogException {
- ComputeResourcePreference computeResourcePreference = new ComputeResourcePreference();
- computeResourcePreference.setComputeResourceId(computeResourceId);
- computeResourcePreference.setOverridebyAiravata(overridebyAiravata);
- computeResourcePreference.setAllocationProjectNumber(allocationProjectNumber);
- computeResourcePreference.setPreferredBatchQueue(preferredBatchQueue);
- computeResourcePreference.setPreferredDataMovementProtocol(DataMovementProtocol.valueOf(preferredDataMovementProtocol));
- computeResourcePreference.setPreferredJobSubmissionProtocol(JobSubmissionProtocol.valueOf(preferredJobSubmissionProtocol));
- computeResourcePreference.setScratchLocation(scratchLocation);
- return computeResourcePreference;
- }
-
- public static ApplicationDeploymentDescription createApplicationDeployment(
- String computeResourceId, String appModuleId,
- String executablePath, ApplicationParallelismType parallelism, String appDeploymentDescription) {
- ApplicationDeploymentDescription deployment = new ApplicationDeploymentDescription();
-// deployment.setIsEmpty(false);
- deployment.setAppDeploymentDescription(appDeploymentDescription);
- deployment.setAppModuleId(appModuleId);
- deployment.setComputeHostId(computeResourceId);
- deployment.setExecutablePath(executablePath);
- deployment.setParallelism(parallelism);
- return deployment;
- }
-
- public static ApplicationModule createApplicationModule(String appModuleName,
- String appModuleVersion, String appModuleDescription) {
- ApplicationModule module = new ApplicationModule();
- module.setAppModuleDescription(appModuleDescription);
- module.setAppModuleName(appModuleName);
- module.setAppModuleVersion(appModuleVersion);
- return module;
- }
-
- public static DataMovementInterface createDataMovementInterface(
- String dataMovementInterfaceId,
- DataMovementProtocol dataMovementProtocolType, int priorityOrder) {
- DataMovementInterface dataMovementInterface = new DataMovementInterface();
- dataMovementInterface.setDataMovementInterfaceId(dataMovementInterfaceId);
- dataMovementInterface.setDataMovementProtocol(dataMovementProtocolType);
- dataMovementInterface.setPriorityOrder(priorityOrder);
- return dataMovementInterface;
- }
-
- public static JobSubmissionInterface createJobSubmissionInterface(
- String jobSubmissionInterfaceId,
- JobSubmissionProtocol jobSubmissionProtocolType, int priorityOrder) {
- JobSubmissionInterface jobSubmissionInterface = new JobSubmissionInterface();
- jobSubmissionInterface.setJobSubmissionInterfaceId(jobSubmissionInterfaceId);
- jobSubmissionInterface.setJobSubmissionProtocol(jobSubmissionProtocolType);
- jobSubmissionInterface.setPriorityOrder(priorityOrder);
- return jobSubmissionInterface;
- }
-
- public static ComputeResourceDescription createComputeResourceDescription(
- String hostName, List<String> hostAliases, List<String> ipAddresses) {
- ComputeResourceDescription host = new ComputeResourceDescription();
- host.setHostName(hostName);
- host.setIpAddresses(ipAddresses);
- host.setHostAliases(hostAliases);
- return host;
- }
-
- public static ResourceJobManager createResourceJobManager(
- ResourceJobManagerType resourceJobManagerType,
- String jobManagerBinPath,
- Map<JobManagerCommand, String> jobManagerCommands,
- String pushMonitoringEndpoint) {
- ResourceJobManager resourceJobManager=new ResourceJobManager();;
- resourceJobManager.setResourceJobManagerType(resourceJobManagerType);
- resourceJobManager.setJobManagerBinPath(jobManagerBinPath);
- resourceJobManager.setJobManagerCommands(jobManagerCommands);
- resourceJobManager.setPushMonitoringEndpoint(pushMonitoringEndpoint);
- return resourceJobManager;
- }
-
- public static InputDataObjectType createAppInput (String inputName, String argumentName, String description, String value, org.apache.airavata.model.appcatalog.appinterface.DataType type ){
- InputDataObjectType input = new InputDataObjectType();
-// input.setIsEmpty(false);
- if (inputName!=null) {
- input.setName(inputName);
- }
- if (value!=null) {
- input.setValue(value);
- }
- if (type!=null) {
- input.setType(type);
- }
- if (argumentName!=null) {
- input.setApplicationArgument(argumentName);
- }
- if (description!=null) {
- input.setUserFriendlyDescription(description);
- }
- return input;
- }
-
- public static OutputDataObjectType createAppOutput (String inputName, String value, org.apache.airavata.model.appcatalog.appinterface.DataType type ){
- OutputDataObjectType outputDataObjectType = new OutputDataObjectType();
-// outputDataObjectType.setIsEmpty(false);
- if (inputName!=null) {
- outputDataObjectType.setName(inputName);
- }
- if (value!=null) {
- outputDataObjectType.setValue(value);
- }
- if (type!=null) {
- outputDataObjectType.setType(type);
- }
- return outputDataObjectType;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/airavata/blob/32fff944/modules/airavata-client/src/main/java/org/apache/airavata/client/tools/NameValuePairType.java
----------------------------------------------------------------------
diff --git a/modules/airavata-client/src/main/java/org/apache/airavata/client/tools/NameValuePairType.java b/modules/airavata-client/src/main/java/org/apache/airavata/client/tools/NameValuePairType.java
deleted file mode 100644
index 5bf5cb5..0000000
--- a/modules/airavata-client/src/main/java/org/apache/airavata/client/tools/NameValuePairType.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- *
- * 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.client.tools;
-
-public class NameValuePairType {
-
- private String name;
- private String value;
- private String description;
- public String getName() {
- return name;
- }
- public void setName(String name) {
- this.name = name;
- }
- public String getValue() {
- return value;
- }
- public void setValue(String value) {
- this.value = value;
- }
- public String getDescription() {
- return description;
- }
- public void setDescription(String description) {
- this.description = description;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/airavata/blob/32fff944/modules/airavata-client/src/main/java/org/apache/airavata/client/tools/PeriodicExecutorThread.java
----------------------------------------------------------------------
diff --git a/modules/airavata-client/src/main/java/org/apache/airavata/client/tools/PeriodicExecutorThread.java b/modules/airavata-client/src/main/java/org/apache/airavata/client/tools/PeriodicExecutorThread.java
deleted file mode 100644
index 6a1a4ed..0000000
--- a/modules/airavata-client/src/main/java/org/apache/airavata/client/tools/PeriodicExecutorThread.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- *
- * 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.client.tools;
-
-import org.apache.airavata.client.api.AiravataAPI;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public abstract class PeriodicExecutorThread extends Thread {
-
- private AiravataAPI airavataAPI;
- public static final int URL_UPDATE_INTERVAL = 1000 * 60 * 60 * 3;
- public static final int JCR_AVAIALABILITY_WAIT_INTERVAL = 1000 * 10;
-
- private static final Logger log = LoggerFactory.getLogger(PeriodicExecutorThread.class);
-
- public PeriodicExecutorThread(AiravataAPI airavataAPI) {
- this.airavataAPI = airavataAPI;
- }
-
- public void run() {
- while (true) {
- try {
- updateRegistry(airavataAPI);
- Thread.sleep(URL_UPDATE_INTERVAL);
- } catch (InterruptedException e) {
- break;
- } catch (Exception e) {
- try {
- Thread.sleep(JCR_AVAIALABILITY_WAIT_INTERVAL);
- } catch (InterruptedException e1) {
- e1.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.
- return;
- }
- log.error(e.getMessage());
- log.error("Workflow Interpreter Service URL update thread is interrupted");
- }
- }
- }
-
- protected abstract void updateRegistry(AiravataAPI airavataAPI) throws Exception;
-}
http://git-wip-us.apache.org/repos/asf/airavata/blob/32fff944/modules/airavata-client/src/main/java/org/apache/airavata/client/tools/UltrascanDocumentCreator.java
----------------------------------------------------------------------
diff --git a/modules/airavata-client/src/main/java/org/apache/airavata/client/tools/UltrascanDocumentCreator.java b/modules/airavata-client/src/main/java/org/apache/airavata/client/tools/UltrascanDocumentCreator.java
deleted file mode 100644
index f4fceeb..0000000
--- a/modules/airavata-client/src/main/java/org/apache/airavata/client/tools/UltrascanDocumentCreator.java
+++ /dev/null
@@ -1,444 +0,0 @@
-///**
-// * 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.client.tools;
-//
-//import java.io.File;
-//import java.util.ArrayList;
-//import java.util.Date;
-//import java.util.List;
-//import java.util.UUID;
-//
-//import org.apache.airavata.client.api.AiravataAPI;
-//import org.apache.airavata.client.api.exception.AiravataAPIInvocationException;
-//import org.apache.airavata.commons.gfac.type.ApplicationDescription;
-//import org.apache.airavata.commons.gfac.type.HostDescription;
-//import org.apache.airavata.commons.gfac.type.ServiceDescription;
-//import org.apache.airavata.schemas.gfac.ApplicationDeploymentDescriptionType;
-//import org.apache.airavata.schemas.gfac.DataType;
-//import org.apache.airavata.schemas.gfac.GsisshHostType;
-//import org.apache.airavata.schemas.gfac.HpcApplicationDeploymentType;
-//import org.apache.airavata.schemas.gfac.InputParameterType;
-//import org.apache.airavata.schemas.gfac.JobTypeType;
-//import org.apache.airavata.schemas.gfac.OutputParameterType;
-//import org.apache.airavata.schemas.gfac.ParameterType;
-//import org.apache.airavata.schemas.gfac.ProjectAccountType;
-//import org.apache.airavata.schemas.gfac.QueueType;
-//
-//public class UltrascanDocumentCreator {
-//
-// private AiravataAPI airavataAPI = null;
-// private String hpcHostAddress = "trestles.sdsc.edu";
-// private String gsiSshHostNameTrestles = "gsissh-trestles";
-// private String gsiSshHostNameStampede = "gsissh-stampede";
-//
-//
-// public UltrascanDocumentCreator(AiravataAPI airavataAPI) {
-// this.airavataAPI = airavataAPI;
-// }
-//
-// public void createEchoPBSDocsforTestles() {
-// HostDescription host = new HostDescription(GsisshHostType.type);
-// host.getType().setHostAddress(hpcHostAddress);
-// host.getType().setHostName(gsiSshHostNameTrestles);
-// ((GsisshHostType) host.getType()).setPort(22);
-// ((GsisshHostType) host.getType()).setInstalledPath("/opt/torque/bin/");
-//
-// try {
-// airavataAPI.getApplicationManager().saveHostDescription(host);
-// } catch (AiravataAPIInvocationException e) {
-// e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.
-// }
-// /*
-// * Service Description creation and saving
-// */
-// String serviceName = "US3EchoTrestles";
-// ServiceDescription serv = new ServiceDescription();
-// serv.getType().setName(serviceName);
-//
-// List<InputParameterType> inputList = new ArrayList<InputParameterType>();
-// List<OutputParameterType> outputList = new ArrayList<OutputParameterType>();
-//
-//
-// InputParameterType input = InputParameterType.Factory.newInstance();
-// input.setParameterName("echo_input");
-// ParameterType parameterType = input.addNewParameterType();
-// parameterType.setType(DataType.STRING);
-// parameterType.setName("String");
-//
-// OutputParameterType output = OutputParameterType.Factory.newInstance();
-// output.setParameterName("echo_output");
-// ParameterType parameterType1 = output.addNewParameterType();
-// parameterType1.setType(DataType.STRING);
-// parameterType1.setName("String");
-//
-// inputList.add(input);
-// outputList.add(output);
-//
-// InputParameterType[] inputParamList = inputList.toArray(new InputParameterType[inputList.size()]);
-// OutputParameterType[] outputParamList = outputList.toArray(new OutputParameterType[outputList.size()]);
-//
-// serv.getType().setInputParametersArray(inputParamList);
-// serv.getType().setOutputParametersArray(outputParamList);
-// try {
-// airavataAPI.getApplicationManager().saveServiceDescription(serv);
-// } catch (AiravataAPIInvocationException e) {
-// e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.
-// }
-//
-// /*
-// Application descriptor creation and saving
-// */
-// ApplicationDescription appDesc = new ApplicationDescription(HpcApplicationDeploymentType.type);
-// HpcApplicationDeploymentType app = (HpcApplicationDeploymentType) appDesc.getType();
-// ApplicationDeploymentDescriptionType.ApplicationName name = ApplicationDeploymentDescriptionType.ApplicationName.Factory.newInstance();
-// name.setStringValue(serviceName);
-// app.setApplicationName(name);
-// ProjectAccountType projectAccountType = app.addNewProjectAccount();
-// projectAccountType.setProjectAccountNumber("uot111");
-//
-// QueueType queueType = app.addNewQueue();
-// queueType.setQueueName("normal");
-//
-// app.setCpuCount(1);
-// app.setJobType(JobTypeType.SERIAL);
-// app.setNodeCount(1);
-// app.setProcessorsPerNode(1);
-// app.setMaxWallTime(10);
-// /*
-// * Use bat file if it is compiled on Windows
-// */
-// app.setExecutableLocation("/bin/echo");
-//
-// /*
-// * Default tmp location
-// */
-// String tempDir = "/oasis/projects/nsf/uot111/us3/airavata-workdirs/";
-//
-// app.setScratchWorkingDirectory(tempDir);
-// app.setInstalledParentPath("/opt/torque/bin/");
-//
-// try {
-// airavataAPI.getApplicationManager().saveApplicationDescription(serviceName, gsiSshHostNameTrestles, appDesc);
-// } catch (AiravataAPIInvocationException e) {
-// e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.
-// }
-// }
-//
-// public void createMPIPBSDocsTrestles() {
-// HostDescription host = new HostDescription(GsisshHostType.type);
-// host.getType().setHostAddress(hpcHostAddress);
-// host.getType().setHostName(gsiSshHostNameTrestles);
-// ((GsisshHostType) host.getType()).setPort(22);
-// ((GsisshHostType) host.getType()).setInstalledPath("/opt/torque/bin/");
-//
-// try {
-// airavataAPI.getApplicationManager().saveHostDescription(host);
-// } catch (AiravataAPIInvocationException e) {
-// e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.
-// }
-// /*
-// * Service Description creation and saving
-// */
-// String serviceName = "US3AppTrestles";
-// ServiceDescription serv = new ServiceDescription();
-// serv.getType().setName(serviceName);
-//
-// List<InputParameterType> inputList = new ArrayList<InputParameterType>();
-// List<OutputParameterType> outputList = new ArrayList<OutputParameterType>();
-//
-//
-// InputParameterType input = InputParameterType.Factory.newInstance();
-// input.setParameterName("input");
-// ParameterType parameterType = input.addNewParameterType();
-// parameterType.setType(DataType.URI);
-// parameterType.setName("URI");
-//
-// OutputParameterType output = OutputParameterType.Factory.newInstance();
-// output.setParameterName("output");
-// ParameterType parameterType1 = output.addNewParameterType();
-// parameterType1.setType(DataType.URI);
-// parameterType1.setName("URI");
-//
-// OutputParameterType output1 = OutputParameterType.Factory.newInstance();
-// output1.setParameterName("stdout");
-// ParameterType parameterType2 = output1.addNewParameterType();
-// parameterType2.setType(DataType.STD_OUT);
-// parameterType2.setName("StdOut");
-//
-// OutputParameterType output2 = OutputParameterType.Factory.newInstance();
-// output2.setParameterName("stderr");
-// ParameterType parameterType3 = output2.addNewParameterType();
-// parameterType3.setType(DataType.STD_ERR);
-// parameterType3.setName("StdErr");
-//
-// inputList.add(input);
-// outputList.add(output);
-// outputList.add(output1);
-// outputList.add(output2);
-//
-// InputParameterType[] inputParamList = inputList.toArray(new InputParameterType[inputList.size()]);
-// OutputParameterType[] outputParamList = outputList.toArray(new OutputParameterType[outputList.size()]);
-//
-// serv.getType().setInputParametersArray(inputParamList);
-// serv.getType().setOutputParametersArray(outputParamList);
-// try {
-// airavataAPI.getApplicationManager().saveServiceDescription(serv);
-// } catch (AiravataAPIInvocationException e) {
-// e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.
-// }
-//
-// /*
-// Application descriptor creation and saving
-// */
-// ApplicationDescription appDesc = new ApplicationDescription(HpcApplicationDeploymentType.type);
-// HpcApplicationDeploymentType app = (HpcApplicationDeploymentType) appDesc.getType();
-// ApplicationDeploymentDescriptionType.ApplicationName name = ApplicationDeploymentDescriptionType.ApplicationName.Factory.newInstance();
-// name.setStringValue(serviceName);
-// app.setApplicationName(name);
-// ProjectAccountType projectAccountType = app.addNewProjectAccount();
-// projectAccountType.setProjectAccountNumber("uot111");
-//
-// QueueType queueType = app.addNewQueue();
-// queueType.setQueueName("normal");
-//
-// app.setCpuCount(1);
-// app.setJobType(JobTypeType.MPI);
-// app.setNodeCount(32);
-// app.setProcessorsPerNode(2);
-// app.setMaxWallTime(10);
-// /*
-// * Use bat file if it is compiled on Windows
-// */
-// app.setExecutableLocation("/home/us3/trestles/bin/us_mpi_analysis");
-//
-// /*
-// * Default tmp location
-// */
-// String tempDir = "/oasis/projects/nsf/uot111/us3/airavata-workdirs/";
-// app.setScratchWorkingDirectory(tempDir);
-// app.setInstalledParentPath("/opt/torque/bin/");
-// app.setJobSubmitterCommand("/opt/mvapich2/pgi/ib/bin/mpiexec");
-// try {
-// airavataAPI.getApplicationManager().saveApplicationDescription(serviceName, gsiSshHostNameTrestles, appDesc);
-// } catch (AiravataAPIInvocationException e) {
-// e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.
-// }
-// }
-// public void createMPISLURMDocsStampede() {
-// HostDescription host = new HostDescription(GsisshHostType.type);
-// host.getType().setHostAddress("stampede.tacc.xsede.org");
-// host.getType().setHostName("gsissh-stampede");
-// ((GsisshHostType) host.getType()).setJobManager("slurm");
-// ((GsisshHostType) host.getType()).setInstalledPath("/usr/bin/");
-// ((GsisshHostType) host.getType()).setPort(2222);
-//
-// try {
-// airavataAPI.getApplicationManager().saveHostDescription(host);
-// } catch (AiravataAPIInvocationException e) {
-// e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.
-// }
-// /*
-// * Service Description creation and saving
-// */
-// String serviceName = "US3AppStampede";
-// ServiceDescription serv = new ServiceDescription();
-// serv.getType().setName(serviceName);
-//
-// List<InputParameterType> inputList = new ArrayList<InputParameterType>();
-// List<OutputParameterType> outputList = new ArrayList<OutputParameterType>();
-//
-//
-// InputParameterType input = InputParameterType.Factory.newInstance();
-// input.setParameterName("input");
-// ParameterType parameterType = input.addNewParameterType();
-// parameterType.setType(DataType.URI);
-// parameterType.setName("URI");
-//
-// OutputParameterType output = OutputParameterType.Factory.newInstance();
-// output.setParameterName("output");
-// ParameterType parameterType1 = output.addNewParameterType();
-// parameterType1.setType(DataType.URI);
-// parameterType1.setName("URI");
-//
-// OutputParameterType output1 = OutputParameterType.Factory.newInstance();
-// output1.setParameterName("stdout");
-// ParameterType parameterType2 = output1.addNewParameterType();
-// parameterType2.setType(DataType.STD_OUT);
-// parameterType2.setName("StdOut");
-//
-// OutputParameterType output2 = OutputParameterType.Factory.newInstance();
-// output2.setParameterName("stderr");
-// ParameterType parameterType3 = output2.addNewParameterType();
-// parameterType3.setType(DataType.STD_ERR);
-// parameterType3.setName("StdErr");
-//
-// inputList.add(input);
-// outputList.add(output);
-// outputList.add(output1);
-// outputList.add(output2);
-//
-// InputParameterType[] inputParamList = inputList.toArray(new InputParameterType[inputList.size()]);
-// OutputParameterType[] outputParamList = outputList.toArray(new OutputParameterType[outputList.size()]);
-//
-// serv.getType().setInputParametersArray(inputParamList);
-// serv.getType().setOutputParametersArray(outputParamList);
-// try {
-// airavataAPI.getApplicationManager().saveServiceDescription(serv);
-// } catch (AiravataAPIInvocationException e) {
-// e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.
-// }
-//
-// /*
-// Application descriptor creation and saving
-// */
-// ApplicationDescription appDesc = new ApplicationDescription(HpcApplicationDeploymentType.type);
-// HpcApplicationDeploymentType app = (HpcApplicationDeploymentType) appDesc.getType();
-// ApplicationDeploymentDescriptionType.ApplicationName name = ApplicationDeploymentDescriptionType.ApplicationName.Factory.newInstance();
-// name.setStringValue(serviceName);
-// app.setApplicationName(name);
-// ProjectAccountType projectAccountType = app.addNewProjectAccount();
-// projectAccountType.setProjectAccountNumber("TG-MCB070039N");
-//
-// QueueType queueType = app.addNewQueue();
-// queueType.setQueueName("normal");
-//
-// app.setCpuCount(1);
-// app.setJobType(JobTypeType.MPI);
-// app.setNodeCount(32);
-// app.setProcessorsPerNode(2);
-// app.setMaxWallTime(10);
-// /*
-// * Use bat file if it is compiled on Windows
-// */
-// app.setExecutableLocation("/home1/01623/us3/bin/us_mpi_analysis");
-//
-// /*
-// * Default tmp location
-// */
-// String tempDir = "/home1/01623/us3";
-// app.setScratchWorkingDirectory(tempDir);
-// app.setInstalledParentPath("/usr/bin/");
-// app.setJobSubmitterCommand("/usr/local/bin/ibrun");
-// try {
-// airavataAPI.getApplicationManager().saveApplicationDescription(serviceName, gsiSshHostNameStampede, appDesc);
-// } catch (AiravataAPIInvocationException e) {
-// e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.
-// }
-// }
-// public void createEchoSlurmDocsofStampede() {
-// HostDescription host = new HostDescription(GsisshHostType.type);
-// host.getType().setHostAddress("stampede.tacc.xsede.org");
-// host.getType().setHostName("stampede-host");
-// ((GsisshHostType) host.getType()).setJobManager("slurm");
-// ((GsisshHostType) host.getType()).setInstalledPath("/usr/bin/");
-// ((GsisshHostType) host.getType()).setPort(2222);
-// ((GsisshHostType) host.getType()).setMonitorMode("push");
-//// ((GsisshHostType) host.getType()).setMo(2222);
-//
-//
-// try {
-// airavataAPI.getApplicationManager().saveHostDescription(host);
-// } catch (AiravataAPIInvocationException e) {
-// e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.
-// }
-// /*
-// * Service Description creation and saving
-// */
-// String serviceName = "US3EchoStampede";
-// ServiceDescription serv = new ServiceDescription();
-// serv.getType().setName(serviceName);
-//
-// List<InputParameterType> inputList = new ArrayList<InputParameterType>();
-// List<OutputParameterType> outputList = new ArrayList<OutputParameterType>();
-//
-//
-// InputParameterType input = InputParameterType.Factory.newInstance();
-// input.setParameterName("echo_input");
-// ParameterType parameterType = input.addNewParameterType();
-// parameterType.setType(DataType.STRING);
-// parameterType.setName("String");
-//
-// OutputParameterType output = OutputParameterType.Factory.newInstance();
-// output.setParameterName("echo_output");
-// ParameterType parameterType1 = output.addNewParameterType();
-// parameterType1.setType(DataType.STRING);
-// parameterType1.setName("String");
-//
-// inputList.add(input);
-// outputList.add(output);
-//
-// InputParameterType[] inputParamList = inputList.toArray(new InputParameterType[inputList.size()]);
-// OutputParameterType[] outputParamList = outputList.toArray(new OutputParameterType[outputList.size()]);
-//
-// serv.getType().setInputParametersArray(inputParamList);
-// serv.getType().setOutputParametersArray(outputParamList);
-// try {
-// airavataAPI.getApplicationManager().saveServiceDescription(serv);
-// } catch (AiravataAPIInvocationException e) {
-// e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.
-// }
-//
-// /*
-// Application descriptor creation and saving
-// */
-// ApplicationDescription appDesc = new ApplicationDescription(HpcApplicationDeploymentType.type);
-// HpcApplicationDeploymentType app = (HpcApplicationDeploymentType) appDesc.getType();
-// ApplicationDeploymentDescriptionType.ApplicationName name = ApplicationDeploymentDescriptionType.ApplicationName.Factory.newInstance();
-// name.setStringValue(serviceName);
-// app.setApplicationName(name);
-// ProjectAccountType projectAccountType = app.addNewProjectAccount();
-// projectAccountType.setProjectAccountNumber("TG-MCB070039N");
-//
-// QueueType queueType = app.addNewQueue();
-// queueType.setQueueName("normal");
-//
-// app.setCpuCount(1);
-// app.setJobType(JobTypeType.SERIAL);
-// app.setNodeCount(1);
-// app.setProcessorsPerNode(1);
-// app.setMaxWallTime(10);
-// /*
-// * Use bat file if it is compiled on Windows
-// */
-// app.setExecutableLocation("/bin/echo");
-//
-// /*
-// * Default tmp location
-// */
-// String tempDir = "/home1/01623/us3";
-//
-// app.setScratchWorkingDirectory(tempDir);
-// app.setInstalledParentPath("/usr/bin/");
-//
-// try {
-// airavataAPI.getApplicationManager().saveApplicationDescription(serviceName, gsiSshHostNameStampede, appDesc);
-// } catch (AiravataAPIInvocationException e) {
-// e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.
-// }
-// }
-//
-// public AiravataAPI getAiravataAPI() {
-// return airavataAPI;
-// }
-//
-// public void setAiravataAPI(AiravataAPI airavataAPI) {
-// this.airavataAPI = airavataAPI;
-// }
-//}
[5/9] airavata git commit: removing previous airavata client API -
AIRAVATA-1371
Posted by ch...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/32fff944/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/WorkflowManagerImpl.java
----------------------------------------------------------------------
diff --git a/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/WorkflowManagerImpl.java b/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/WorkflowManagerImpl.java
deleted file mode 100644
index 4596e42..0000000
--- a/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/WorkflowManagerImpl.java
+++ /dev/null
@@ -1,535 +0,0 @@
-/*
- *
- * 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.client.impl;
-
-import org.apache.airavata.client.AiravataClient;
-import org.apache.airavata.client.api.WorkflowManager;
-import org.apache.airavata.client.api.exception.AiravataAPIInvocationException;
-import org.apache.airavata.client.api.exception.WorkflowAlreadyExistsException;
-import org.apache.airavata.common.utils.XMLUtil;
-import org.apache.airavata.workflow.model.wf.Workflow;
-import org.apache.airavata.workflow.model.wf.WorkflowData;
-import org.apache.airavata.workflow.model.wf.WorkflowInput;
-
-import java.net.URI;
-import java.util.List;
-import java.util.Map;
-
-public class WorkflowManagerImpl implements WorkflowManager {
- private AiravataClient client;
-
- public WorkflowManagerImpl(AiravataClient client) {
- setClient(client);
- }
-
- public AiravataClient getClient() {
- return client;
- }
-
- public void setClient(AiravataClient client) {
- this.client = client;
- }
-
- @Override
- public boolean saveWorkflow(String workflowAsString, String owner)
- throws AiravataAPIInvocationException {
- return saveWorkflow(getWorkflowFromString(workflowAsString), workflowAsString, owner);
- }
-
- @Override
- public void addOwnerWorkflow (String workflowAsString, String owner)
- throws AiravataAPIInvocationException, WorkflowAlreadyExistsException {
- addWorkflow(getWorkflowFromString(workflowAsString), workflowAsString, owner);
- }
-
- @Override
- public void updateOwnerWorkflow (String workflowAsString, String owner)
- throws AiravataAPIInvocationException {
- updateWorkflow(getWorkflowFromString(workflowAsString), workflowAsString, owner);
- }
-
- @Override
- public void addOwnerWorkflow (URI workflowPath, String owner)
- throws AiravataAPIInvocationException, WorkflowAlreadyExistsException {
- Workflow workflow = getWorkflowFromURI(workflowPath);
- addWorkflow(workflow, XMLUtil.xmlElementToString(workflow.toXML()), owner);
- }
-
- @Override
- public void updateOwnerWorkflow (URI workflowPath, String owner)
- throws AiravataAPIInvocationException {
- Workflow workflow = getWorkflowFromURI(workflowPath);
- updateWorkflow(workflow, XMLUtil.xmlElementToString(workflow.toXML()), owner);
- }
-
- @Override
- public boolean saveWorkflow(Workflow workflow, String owner)
- throws AiravataAPIInvocationException {
- return saveWorkflow(workflow, XMLUtil.xmlElementToString(workflow.toXML()), owner);
- }
-
- @Override
- public void addOwnerWorkflow (Workflow workflow, String owner) throws WorkflowAlreadyExistsException,
- AiravataAPIInvocationException{
- addWorkflow(workflow, XMLUtil.xmlElementToString(workflow.toXML()), owner);
- }
-
- @Override
- public void updateOwnerWorkflow (Workflow workflow, String owner) throws AiravataAPIInvocationException {
- updateWorkflow(workflow, XMLUtil.xmlElementToString(workflow.toXML()), owner);
- }
-
- private void addWorkflow(Workflow workflow, String workflowAsString, String owner)
- throws WorkflowAlreadyExistsException, AiravataAPIInvocationException {
-// try {
-// getClient().getRegistryClient().addWorkflow(workflow.getName(), workflowAsString);
-// } catch (UserWorkflowAlreadyExistsException e) {
-// throw new WorkflowAlreadyExistsException("Workflow " +
-// workflow.getName()
-// + " already exists in the system.", e);
-// } catch (RegException e) {
-// throw new AiravataAPIInvocationException("An internal error occurred while adding workflow " +
-// workflow.getName(), e);
-// } catch (AiravataConfigurationException e) {
-// throw new AiravataAPIInvocationException("Error retrieving registry client for workflow " +
-// workflow.getName(), e);
-// }
-
-// if (owner == null) {
-// try {
-// getClient().getRegistryClient().publishWorkflow(workflow.getName());
-// } catch (RegException e) {
-// throw new AiravataAPIInvocationException("An internal error occurred while adding workflow " +
-// workflow.getName(), e);
-// } catch (AiravataConfigurationException e) {
-// throw new AiravataAPIInvocationException("Error retrieving registry client for workflow " +
-// workflow.getName(), e);
-// }
-// }
- }
-
- private void updateWorkflow(Workflow workflow, String workflowAsString, String owner)
- throws AiravataAPIInvocationException {
-// try {
-// getClient().getRegistryClient().updateWorkflow(workflow.getName(), workflowAsString);
-// } catch (RegException e) {
-// throw new AiravataAPIInvocationException("An internal error occurred while adding workflow " +
-// workflow.getName(), e);
-// } catch (AiravataConfigurationException e) {
-// throw new AiravataAPIInvocationException("Error retrieving registry client for workflow " +
-// workflow.getName(), e);
-// }
-//
-// if (owner == null) {
-// try {
-// getClient().getRegistryClient().publishWorkflow(workflow.getName());
-// } catch (RegException e) {
-// throw new AiravataAPIInvocationException("An internal error occurred while adding workflow " +
-// workflow.getName(), e);
-// } catch (AiravataConfigurationException e) {
-// throw new AiravataAPIInvocationException("Error retrieving registry client for workflow " +
-// workflow.getName(), e);
-// }
-// }
- }
-
- // Remove once deprecated methods are removed from the API
- @Deprecated
- private boolean saveWorkflow(Workflow workflow, String workflowAsString,String owner)
- throws AiravataAPIInvocationException {
-// try {
-//
-// if (getClient().getRegistryClient().isWorkflowExists(workflow.getName())) {
-// getClient().getRegistryClient().updateWorkflow(workflow.getName(),workflowAsString);
-// }else{
-// getClient().getRegistryClient().addWorkflow(workflow.getName(),workflowAsString);
-// }
-// if (owner==null){
-// getClient().getRegistryClient().publishWorkflow(workflow.getName());
-// }
-// return true;
-// } catch (Exception e) {
-// throw new AiravataAPIInvocationException(e);
-// }
- return false;
- }
-
- @Override
- public List<Workflow> getWorkflows(String owner)
- throws AiravataAPIInvocationException {
-// try {
-// List<Workflow> workflows=new ArrayList<Workflow>();
-// Map<String, String> workflowMap = getClient().getRegistryClient().getWorkflows();
-// for(String workflowStr:workflowMap.values()){
-// workflows.add(getWorkflowFromString(workflowStr));
-// }
-// return workflows;
-// } catch (Exception e) {
-// throw new AiravataAPIInvocationException(e);
-// }
- return null;
- }
-
- @Override
- public List<String> getWorkflowTemplateIds(String owner)
- throws AiravataAPIInvocationException {
-// try {
-// List<String> workflowList = new ArrayList<String>();
-// Map<String, String> workflows;
-// workflows = getClient().getRegistryClient().getWorkflows();
-// for (String name : workflows.keySet()) {
-// workflowList.add(name);
-// }
-// return workflowList;
-// } catch (Exception e) {
-// throw new AiravataAPIInvocationException(e);
-// }
- return null;
- }
-
- @Override
- public Workflow getWorkflow(String workflowName, String owner)
- throws AiravataAPIInvocationException {
- return getWorkflowFromString(getWorkflowAsString(workflowName, owner));
- }
-
- @Override
- public String getWorkflowAsString(String workflowName, String owner)
- throws AiravataAPIInvocationException {
-// try {
-// return getClient().getRegistryClient().getWorkflowGraphXML(workflowName);
-// } catch (Exception e) {
-// throw new AiravataAPIInvocationException(e);
-// }
- return null;
- }
-
- @Override
- public boolean deleteWorkflow(String workflowName, String owner)
- throws AiravataAPIInvocationException {
-// try {
-// getClient().getRegistryClient().removeWorkflow(workflowName);
-// return true;
-// } catch (Exception e) {
-// throw new AiravataAPIInvocationException(e);
-// }
- return false;
- }
-
- @Override
- public boolean saveWorkflow(String workflowAsString)
- throws AiravataAPIInvocationException {
- return saveWorkflow(workflowAsString, getCurrentUser());
- }
-
- @Override
- public void addWorkflow (String workflowAsString) throws WorkflowAlreadyExistsException,
- AiravataAPIInvocationException {
- addOwnerWorkflow(workflowAsString, getCurrentUser());
- }
-
- @Override
- public void updateWorkflow (String workflowAsString) throws AiravataAPIInvocationException {
- updateOwnerWorkflow(workflowAsString, getCurrentUser());
- }
-
- @Override
- public boolean saveWorkflowAsPublic(String workflowAsString)
- throws AiravataAPIInvocationException {
- return saveWorkflow(workflowAsString, null);
- }
-
- @Override
- public void addWorkflowAsPublic (String workflowAsString) throws AiravataAPIInvocationException,
- WorkflowAlreadyExistsException {
- addOwnerWorkflow (workflowAsString, null);
- }
-
- @Override
- public void updateWorkflowAsPublic (String workflowAsString) throws AiravataAPIInvocationException {
- updateOwnerWorkflow(workflowAsString, null);
- }
-
- @Override
- public void addWorkflowAsPublic (URI workflowPath) throws AiravataAPIInvocationException,
- WorkflowAlreadyExistsException {
- addOwnerWorkflow (getWorkflowFromURI(workflowPath), null);
- }
-
- @Override
- public void updateWorkflowAsPublic (URI workflowPath) throws AiravataAPIInvocationException {
- updateOwnerWorkflow(getWorkflowFromURI(workflowPath), null);
- }
-
- @Override
- public boolean saveWorkflow(Workflow workflow)
- throws AiravataAPIInvocationException {
- return saveWorkflow(workflow, getCurrentUser());
- }
-
- @Override
- public void addWorkflow (Workflow workflow) throws WorkflowAlreadyExistsException,
- AiravataAPIInvocationException{
- addOwnerWorkflow(workflow, getCurrentUser());
- }
-
- @Override
- public void updateWorkflow (Workflow workflow) throws AiravataAPIInvocationException {
- updateOwnerWorkflow(workflow, getCurrentUser());
- }
-
- @Override
- public void addWorkflow (URI workflowPath) throws AiravataAPIInvocationException,
- WorkflowAlreadyExistsException {
- addOwnerWorkflow(getWorkflowFromURI(workflowPath), getCurrentUser());
- }
-
- @Override
- public void updateWorkflow (URI workflowPath) throws AiravataAPIInvocationException {
- updateOwnerWorkflow(getWorkflowFromURI(workflowPath), getCurrentUser());
- }
-
- private String getCurrentUser() {
- return getClient().getCurrentUser();
- }
-
- @Override
- public boolean saveWorkflowAsPublic(Workflow workflow)
- throws AiravataAPIInvocationException {
- return saveWorkflow(workflow, null);
- }
-
- @Override
- public List<Workflow> getWorkflows() throws AiravataAPIInvocationException {
- return getWorkflows(getCurrentUser());
- }
-
- @Override
- public List<String> getWorkflowTemplateIds()
- throws AiravataAPIInvocationException {
- return getWorkflowTemplateIds(getCurrentUser());
- }
-
- @Override
- public Workflow getWorkflow(String workflowName)
- throws AiravataAPIInvocationException {
- return getWorkflow(workflowName, getCurrentUser());
- }
-
- @Override
- public String getWorkflowAsString(String workflowName)
- throws AiravataAPIInvocationException {
- return getWorkflowAsString(workflowName, getCurrentUser());
- }
-
- @Override
- public boolean deleteWorkflow(String workflowName)
- throws AiravataAPIInvocationException {
- return deleteWorkflow(workflowName, getCurrentUser());
- }
-
- @Override
- public Workflow getWorkflowFromString(String workflowAsString)
- throws AiravataAPIInvocationException {
- try {
- return new Workflow(workflowAsString);
- } catch (Exception e) {
- throw new AiravataAPIInvocationException(e);
- }
- }
-
- @Override
- public Workflow getWorkflowFromURI(URI workflowPath) throws AiravataAPIInvocationException {
- try {
- return new Workflow(workflowPath);
- } catch (Exception e) {
- throw new AiravataAPIInvocationException(e);
- }
- }
-
- @Override
- public String getWorkflowAsString(Workflow workflow)
- throws AiravataAPIInvocationException {
- return XMLUtil.xmlElementToString(workflow.toXML());
- }
-
- @Override
- public List<String> getWorkflowServiceNodeIDs(String templateID) throws AiravataAPIInvocationException{
- return getWorkflow(templateID).getWorkflowServiceNodeIDs();
- }
-
- @Override
- public boolean isPublishedWorkflowExists(String workflowName)
- throws AiravataAPIInvocationException {
-// try {
-// return getClient().getRegistryClient().isPublishedWorkflowExists(workflowName);
-// } catch (Exception e) {
-// throw new AiravataAPIInvocationException(e);
-// }
- return false;
- }
-
- @Override
- public void publishWorkflow(String workflowName, String publishWorkflowName)
- throws AiravataAPIInvocationException {
-// try {
-// getClient().getRegistryClient().publishWorkflow(workflowName, publishWorkflowName);
-// } catch (Exception e) {
-// throw new AiravataAPIInvocationException(e);
-// }
- }
-
- @Override
- public void publishWorkflow(String workflowName)
- throws AiravataAPIInvocationException {
-// try {
-// getClient().getRegistryClient().publishWorkflow(workflowName);
-// } catch (Exception e) {
-// throw new AiravataAPIInvocationException(e);
-// }
- }
-
- @Override
- public String getPublishedWorkflowGraphXML(String workflowName)
- throws AiravataAPIInvocationException {
-// try {
-// return getClient().getRegistryClient().getPublishedWorkflowGraphXML(workflowName);
-// } catch (Exception e) {
-// throw new AiravataAPIInvocationException(e);
-// }
- return null;
- }
-
- @Override
- public Workflow getPublishedWorkflow(String workflowName)
- throws AiravataAPIInvocationException {
- return getWorkflowFromString(getPublishedWorkflowGraphXML(workflowName));
- }
-
- @Override
- public List<String> getPublishedWorkflowNames()
- throws AiravataAPIInvocationException {
-// try {
-// return getClient().getRegistryClient().getPublishedWorkflowNames();
-// } catch (Exception e) {
-// throw new AiravataAPIInvocationException(e);
-// }
- return null;
- }
-
- @Override
- public Map<String, Workflow> getPublishedWorkflows()
- throws AiravataAPIInvocationException {
-// try {
-// Map<String, Workflow> workflows=new HashMap<String, Workflow>();
-// Map<String, String> publishedWorkflows = getClient().getRegistryClient().getPublishedWorkflows();
-// for (String name : publishedWorkflows.keySet()) {
-// workflows.put(name, getWorkflowFromString(publishedWorkflows.get(name)));
-// }
-// return workflows;
-// } catch (Exception e) {
-// throw new AiravataAPIInvocationException(e);
-// }
- return null;
- }
-
- @Override
- public void removePublishedWorkflow(String workflowName)
- throws AiravataAPIInvocationException {
-// try {
-// getClient().getRegistryClient().removePublishedWorkflow(workflowName);
-// } catch (Exception e) {
-// throw new AiravataAPIInvocationException(e);
-// }
- }
-
- @Override
- public List<WorkflowInput> getWorkflowInputs(String workflowName) throws AiravataAPIInvocationException {
- try {
- return getWorkflow(workflowName).getWorkflowInputs();
- } catch (Exception e) {
- throw new AiravataAPIInvocationException(e);
- }
- }
-
- @Override
- public List<WorkflowInput> getWorkflowInputs(WorkflowData workflowData) throws AiravataAPIInvocationException {
-// try {
-// if (workflowData.isPublished()){
-// return getWorkflowFromString(getClient().getRegistryClient().getPublishedWorkflowGraphXML(workflowData.getName())).getWorkflowInputs();
-// }else{
-// return getWorkflowInputs(workflowData.getName());
-// }
-// } catch (Exception e) {
-// throw new AiravataAPIInvocationException(e);
-// }
- return null;
- }
-
- @Override
- public List<WorkflowData> getAllWorkflows() throws AiravataAPIInvocationException {
-// List<WorkflowData> list = new ArrayList<WorkflowData>();
-// List<String> workflowTemplateIds = getWorkflowTemplateIds();
-// try {
-// for (String id : workflowTemplateIds) {
-// list.add(new WorkflowData(id,null,false));
-// }
-// List<String> publishedWorkflowNames = getClient().getRegistryClient().getPublishedWorkflowNames();
-// for (String id : publishedWorkflowNames) {
-// list.add(new WorkflowData(id,null,false));
-// }
-// return list;
-// } catch (Exception e) {
-// throw new AiravataAPIInvocationException(e);
-// }
- return null;
- }
-
- @Override
- public boolean isWorkflowExists(String workflowName) throws AiravataAPIInvocationException {
-// try {
-// return getClient().getRegistryClient().isWorkflowExists(workflowName);
-// } catch (Exception e) {
-// throw new AiravataAPIInvocationException(e);
-// }
- return false;
- }
-
- @Override
- public void updateWorkflow(String workflowName, String workflowGraphXml) throws AiravataAPIInvocationException {
-// try {
-// getClient().getRegistryClient().updateWorkflow(workflowName, workflowGraphXml);
-// } catch (Exception e) {
-// throw new AiravataAPIInvocationException(e);
-// }
- }
-
- @Override
- public void removeWorkflow(String workflowName) throws AiravataAPIInvocationException {
-// try {
-// getClient().getRegistryClient().removeWorkflow(workflowName);
-// } catch (Exception e) {
-// throw new AiravataAPIInvocationException(e);
-// }
- }
-
-}
http://git-wip-us.apache.org/repos/asf/airavata/blob/32fff944/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/WorkflowOutputDataSettingsImpl.java
----------------------------------------------------------------------
diff --git a/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/WorkflowOutputDataSettingsImpl.java b/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/WorkflowOutputDataSettingsImpl.java
deleted file mode 100644
index 98e24ea..0000000
--- a/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/WorkflowOutputDataSettingsImpl.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- *
- * 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.client.impl;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-import org.apache.airavata.client.api.OutputDataSettings;
-import org.apache.airavata.client.api.WorkflowOutputDataSettings;
-
-public class WorkflowOutputDataSettingsImpl implements
- WorkflowOutputDataSettings {
- private List<OutputDataSettings> outputDataSettingsList;
-
- private List<OutputDataSettings> getOutputDataSettingsListArray(){
- if (outputDataSettingsList==null){
- outputDataSettingsList=new ArrayList<OutputDataSettings>();
- }
- return outputDataSettingsList;
- }
-
- @Override
- public OutputDataSettings[] getOutputDataSettingsList() {
- return getOutputDataSettingsListArray().toArray(new OutputDataSettings[]{});
- }
-
- @Override
- public OutputDataSettings addNewOutputDataSettings(String nodeId,
- String outputDataDirectory, String dataRegistryURL,
- Boolean isDataPersistent) {
- addNewOutputDataSettings(new ApplicationOutputDataSettingsImpl(nodeId, outputDataDirectory, dataRegistryURL, isDataPersistent));
- return getOutputDataSettingsListArray().get(getOutputDataSettingsListArray().size()-1);
- }
-
- @Override
- public void addNewOutputDataSettings(
- OutputDataSettings... outputDataSettings) {
- getOutputDataSettingsListArray().addAll(Arrays.asList(outputDataSettings));
- }
-
- @Override
- public void removeOutputDataSettings(OutputDataSettings outputDataSettings) {
- if (getOutputDataSettingsListArray().contains(outputDataSettings)){
- getOutputDataSettingsListArray().remove(outputDataSettings);
- }
- }
-
- @Override
- public void removeAllOutputDataSettings() {
- getOutputDataSettingsListArray().clear();
- }
-
- @Override
- public OutputDataSettings addNewOutputDataSettings(String nodeId) {
- return addNewOutputDataSettings(nodeId,null,null,null);
- }
-
-}
http://git-wip-us.apache.org/repos/asf/airavata/blob/32fff944/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/WorkflowSchedulingSettingsImpl.java
----------------------------------------------------------------------
diff --git a/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/WorkflowSchedulingSettingsImpl.java b/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/WorkflowSchedulingSettingsImpl.java
deleted file mode 100644
index a439066..0000000
--- a/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/WorkflowSchedulingSettingsImpl.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
- *
- * 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.client.impl;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-import org.apache.airavata.client.api.NodeSettings;
-import org.apache.airavata.client.api.WorkflowSchedulingSettings;
-
-public class WorkflowSchedulingSettingsImpl implements
- WorkflowSchedulingSettings {
-
- private List<NodeSettings> nodeSettingsList;
-
- private List<NodeSettings> getNodeSettingsListArray(){
- if (nodeSettingsList==null){
- nodeSettingsList=new ArrayList<NodeSettings>();
- }
- return nodeSettingsList;
- }
-
- @Override
- public NodeSettings[] getNodeSettingsList() {
- return getNodeSettingsListArray().toArray(new NodeSettings[]{});
- }
-
- @Override
- public NodeSettings addNewNodeSettings(String nodeId) {
- getNodeSettingsListArray().add(new NodeSettingsImpl(nodeId));
- return getNodeSettingsListArray().get(getNodeSettingsListArray().size()-1);
- }
-
- @Override
- public NodeSettings addNewNodeSettings(String nodeId, String serviceId,
- int cpuCount, int nodeCount) {
- NodeSettingsImpl nodeSettings = new NodeSettingsImpl(nodeId, serviceId);
- nodeSettings.getHPCSettings().setCPUCount(cpuCount);
- nodeSettings.getHPCSettings().setNodeCount(nodeCount);
- addNewNodeSettings(nodeSettings);
- return nodeSettings;
- }
-
- @Override
- public void addNewNodeSettings(NodeSettings... newNodeSettingsList) {
- getNodeSettingsListArray().addAll(Arrays.asList(newNodeSettingsList));
- }
-
- @Override
- public boolean hasNodeSettings(String nodeId) {
- return getNodeSettings(nodeId)!=null;
- }
-
- @Override
- public NodeSettings getNodeSettings(String nodeId) {
- for(NodeSettings nodeSettings:getNodeSettingsList()){
- if (nodeSettings.getNodeId().equals(nodeId)){
- return nodeSettings;
- }
- }
- return null;
- }
-
- @Override
- public void removeNodeSettings(String nodeId) {
- if (hasNodeSettings(nodeId)){
- getNodeSettingsListArray().remove(getNodeSettings(nodeId));
- }
-
- }
-
- @Override
- public void removeAllNodeSettings() {
- getNodeSettingsListArray().clear();
- }
-
-}
http://git-wip-us.apache.org/repos/asf/airavata/blob/32fff944/modules/airavata-client/src/main/java/org/apache/airavata/client/stub/interpretor/NameValue.java
----------------------------------------------------------------------
diff --git a/modules/airavata-client/src/main/java/org/apache/airavata/client/stub/interpretor/NameValue.java b/modules/airavata-client/src/main/java/org/apache/airavata/client/stub/interpretor/NameValue.java
deleted file mode 100644
index 5faeb10..0000000
--- a/modules/airavata-client/src/main/java/org/apache/airavata/client/stub/interpretor/NameValue.java
+++ /dev/null
@@ -1,559 +0,0 @@
-/*
- *
- * 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.client.stub.interpretor;
-
-
-// http://silktree.cs.indiana.edu:18080/axis2/services/WorkflowInterpretor
-public class NameValue implements org.apache.axis2.databinding.ADBBean {
- /*
- * This type was generated from the piece of schema that had name = NameValue Namespace URI =
- * http://interpretor.xbaya.airavata.apache.org Namespace Prefix = ns1
- */
-
- private static String generatePrefix(String namespace) {
- if (namespace.equals("http://interpretor.xbaya.airavata.apache.org")) {
- return "ns1";
- }
- return org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();
- }
-
- /**
- * field for Name
- */
-
- protected String localName;
-
- /*
- * This tracker boolean wil be used to detect whether the user called the set method for this attribute. It will be
- * used to determine whether to include this field in the serialized XML
- */
- protected boolean localNameTracker = false;
-
- /**
- * Auto generated getter method
- *
- * @return java.lang.String
- */
- public String getName() {
- return localName;
- }
-
- /**
- * Auto generated setter method
- *
- * @param param
- * Name
- */
- public void setName(String param) {
-
- if (param != null) {
- // update the setting tracker
- localNameTracker = true;
- } else {
- localNameTracker = true;
-
- }
-
- this.localName = param;
-
- }
-
- /**
- * field for Value
- */
-
- protected String localValue;
-
- /*
- * This tracker boolean wil be used to detect whether the user called the set method for this attribute. It will be
- * used to determine whether to include this field in the serialized XML
- */
- protected boolean localValueTracker = false;
-
- /**
- * Auto generated getter method
- *
- * @return java.lang.String
- */
- public String getValue() {
- return localValue;
- }
-
- /**
- * Auto generated setter method
- *
- * @param param
- * Value
- */
- public void setValue(String param) {
-
- if (param != null) {
- // update the setting tracker
- localValueTracker = true;
- } else {
- localValueTracker = true;
-
- }
-
- this.localValue = param;
-
- }
-
- /**
- * isReaderMTOMAware
- *
- * @return true if the reader supports MTOM
- */
- public static boolean isReaderMTOMAware(javax.xml.stream.XMLStreamReader reader) {
- boolean isReaderMTOMAware = false;
-
- try {
- isReaderMTOMAware = Boolean.TRUE.equals(reader
- .getProperty(org.apache.axiom.om.OMConstants.IS_DATA_HANDLERS_AWARE));
- } catch (IllegalArgumentException e) {
- isReaderMTOMAware = false;
- }
- return isReaderMTOMAware;
- }
-
- /**
- *
- * @param parentQName
- * @param factory
- * @return org.apache.axiom.om.OMElement
- */
- public org.apache.axiom.om.OMElement getOMElement(final javax.xml.namespace.QName parentQName,
- final org.apache.axiom.om.OMFactory factory) throws org.apache.axis2.databinding.ADBException {
-
- org.apache.axiom.om.OMDataSource dataSource = new org.apache.axis2.databinding.ADBDataSource(this, parentQName) {
-
- public void serialize(org.apache.axis2.databinding.utils.writer.MTOMAwareXMLStreamWriter xmlWriter)
- throws javax.xml.stream.XMLStreamException {
- NameValue.this.serialize(parentQName, factory, xmlWriter);
- }
- };
- return new org.apache.axiom.om.impl.llom.OMSourcedElementImpl(parentQName, factory, dataSource);
-
- }
-
- public void serialize(final javax.xml.namespace.QName parentQName, final org.apache.axiom.om.OMFactory factory,
- org.apache.axis2.databinding.utils.writer.MTOMAwareXMLStreamWriter xmlWriter)
- throws javax.xml.stream.XMLStreamException, org.apache.axis2.databinding.ADBException {
- serialize(parentQName, factory, xmlWriter, false);
- }
-
- public void serialize(final javax.xml.namespace.QName parentQName, final org.apache.axiom.om.OMFactory factory,
- org.apache.axis2.databinding.utils.writer.MTOMAwareXMLStreamWriter xmlWriter, boolean serializeType)
- throws javax.xml.stream.XMLStreamException, org.apache.axis2.databinding.ADBException {
-
- String prefix = null;
- String namespace = null;
-
- prefix = parentQName.getPrefix();
- namespace = parentQName.getNamespaceURI();
-
- if ((namespace != null) && (namespace.trim().length() > 0)) {
- String writerPrefix = xmlWriter.getPrefix(namespace);
- if (writerPrefix != null) {
- xmlWriter.writeStartElement(namespace, parentQName.getLocalPart());
- } else {
- if (prefix == null) {
- prefix = generatePrefix(namespace);
- }
-
- xmlWriter.writeStartElement(prefix, parentQName.getLocalPart(), namespace);
- xmlWriter.writeNamespace(prefix, namespace);
- xmlWriter.setPrefix(prefix, namespace);
- }
- } else {
- xmlWriter.writeStartElement(parentQName.getLocalPart());
- }
-
- if (serializeType) {
-
- String namespacePrefix = registerPrefix(xmlWriter, "http://interpretor.xbaya.airavata.apache.org");
- if ((namespacePrefix != null) && (namespacePrefix.trim().length() > 0)) {
- writeAttribute("xsi", "http://www.w3.org/2001/XMLSchema-instance", "type", namespacePrefix
- + ":NameValue", xmlWriter);
- } else {
- writeAttribute("xsi", "http://www.w3.org/2001/XMLSchema-instance", "type", "NameValue", xmlWriter);
- }
-
- }
- if (localNameTracker) {
- namespace = "";
- if (!namespace.equals("")) {
- prefix = xmlWriter.getPrefix(namespace);
-
- if (prefix == null) {
- prefix = generatePrefix(namespace);
-
- xmlWriter.writeStartElement(prefix, "name", namespace);
- xmlWriter.writeNamespace(prefix, namespace);
- xmlWriter.setPrefix(prefix, namespace);
-
- } else {
- xmlWriter.writeStartElement(namespace, "name");
- }
-
- } else {
- xmlWriter.writeStartElement("name");
- }
-
- if (localName == null) {
- // write the nil attribute
-
- writeAttribute("xsi", "http://www.w3.org/2001/XMLSchema-instance", "nil", "1", xmlWriter);
-
- } else {
-
- xmlWriter.writeCharacters(localName);
-
- }
-
- xmlWriter.writeEndElement();
- }
- if (localValueTracker) {
- namespace = "";
- if (!namespace.equals("")) {
- prefix = xmlWriter.getPrefix(namespace);
-
- if (prefix == null) {
- prefix = generatePrefix(namespace);
-
- xmlWriter.writeStartElement(prefix, "value", namespace);
- xmlWriter.writeNamespace(prefix, namespace);
- xmlWriter.setPrefix(prefix, namespace);
-
- } else {
- xmlWriter.writeStartElement(namespace, "value");
- }
-
- } else {
- xmlWriter.writeStartElement("value");
- }
-
- if (localValue == null) {
- // write the nil attribute
-
- writeAttribute("xsi", "http://www.w3.org/2001/XMLSchema-instance", "nil", "1", xmlWriter);
-
- } else {
-
- xmlWriter.writeCharacters(localValue);
-
- }
-
- xmlWriter.writeEndElement();
- }
- xmlWriter.writeEndElement();
-
- }
-
- /**
- * Util method to write an attribute with the ns prefix
- */
- private void writeAttribute(String prefix, String namespace, String attName, String attValue,
- javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
- if (xmlWriter.getPrefix(namespace) == null) {
- xmlWriter.writeNamespace(prefix, namespace);
- xmlWriter.setPrefix(prefix, namespace);
-
- }
-
- xmlWriter.writeAttribute(namespace, attName, attValue);
-
- }
-
- /**
- * Util method to write an attribute without the ns prefix
- */
- private void writeAttribute(String namespace, String attName, String attValue,
- javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
- if (namespace.equals("")) {
- xmlWriter.writeAttribute(attName, attValue);
- } else {
- registerPrefix(xmlWriter, namespace);
- xmlWriter.writeAttribute(namespace, attName, attValue);
- }
- }
-
- /**
- * Util method to write an attribute without the ns prefix
- */
- private void writeQNameAttribute(String namespace, String attName, javax.xml.namespace.QName qname,
- javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
-
- String attributeNamespace = qname.getNamespaceURI();
- String attributePrefix = xmlWriter.getPrefix(attributeNamespace);
- if (attributePrefix == null) {
- attributePrefix = registerPrefix(xmlWriter, attributeNamespace);
- }
- String attributeValue;
- if (attributePrefix.trim().length() > 0) {
- attributeValue = attributePrefix + ":" + qname.getLocalPart();
- } else {
- attributeValue = qname.getLocalPart();
- }
-
- if (namespace.equals("")) {
- xmlWriter.writeAttribute(attName, attributeValue);
- } else {
- registerPrefix(xmlWriter, namespace);
- xmlWriter.writeAttribute(namespace, attName, attributeValue);
- }
- }
-
- /**
- * method to handle Qnames
- */
-
- private void writeQName(javax.xml.namespace.QName qname, javax.xml.stream.XMLStreamWriter xmlWriter)
- throws javax.xml.stream.XMLStreamException {
- String namespaceURI = qname.getNamespaceURI();
- if (namespaceURI != null) {
- String prefix = xmlWriter.getPrefix(namespaceURI);
- if (prefix == null) {
- prefix = generatePrefix(namespaceURI);
- xmlWriter.writeNamespace(prefix, namespaceURI);
- xmlWriter.setPrefix(prefix, namespaceURI);
- }
-
- if (prefix.trim().length() > 0) {
- xmlWriter.writeCharacters(prefix + ":"
- + org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname));
- } else {
- // i.e this is the default namespace
- xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname));
- }
-
- } else {
- xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname));
- }
- }
-
- private void writeQNames(javax.xml.namespace.QName[] qnames, javax.xml.stream.XMLStreamWriter xmlWriter)
- throws javax.xml.stream.XMLStreamException {
-
- if (qnames != null) {
- // we have to store this data until last moment since it is not
- // possible to write any
- // namespace data after writing the charactor data
- StringBuffer stringToWrite = new StringBuffer();
- String namespaceURI = null;
- String prefix = null;
-
- for (int i = 0; i < qnames.length; i++) {
- if (i > 0) {
- stringToWrite.append(" ");
- }
- namespaceURI = qnames[i].getNamespaceURI();
- if (namespaceURI != null) {
- prefix = xmlWriter.getPrefix(namespaceURI);
- if ((prefix == null) || (prefix.length() == 0)) {
- prefix = generatePrefix(namespaceURI);
- xmlWriter.writeNamespace(prefix, namespaceURI);
- xmlWriter.setPrefix(prefix, namespaceURI);
- }
-
- if (prefix.trim().length() > 0) {
- stringToWrite.append(prefix).append(":")
- .append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qnames[i]));
- } else {
- stringToWrite.append(org.apache.axis2.databinding.utils.ConverterUtil
- .convertToString(qnames[i]));
- }
- } else {
- stringToWrite.append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qnames[i]));
- }
- }
- xmlWriter.writeCharacters(stringToWrite.toString());
- }
-
- }
-
- /**
- * Register a namespace prefix
- */
- private String registerPrefix(javax.xml.stream.XMLStreamWriter xmlWriter, String namespace)
- throws javax.xml.stream.XMLStreamException {
- String prefix = xmlWriter.getPrefix(namespace);
-
- if (prefix == null) {
- prefix = generatePrefix(namespace);
-
- while (xmlWriter.getNamespaceContext().getNamespaceURI(prefix) != null) {
- prefix = org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();
- }
-
- xmlWriter.writeNamespace(prefix, namespace);
- xmlWriter.setPrefix(prefix, namespace);
- }
-
- return prefix;
- }
-
- /**
- * databinding method to get an XML representation of this object
- *
- */
- public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)
- throws org.apache.axis2.databinding.ADBException {
-
- java.util.ArrayList elementList = new java.util.ArrayList();
- java.util.ArrayList attribList = new java.util.ArrayList();
-
- if (localNameTracker) {
- elementList.add(new javax.xml.namespace.QName("", "name"));
-
- elementList.add(localName == null ? null : org.apache.axis2.databinding.utils.ConverterUtil
- .convertToString(localName));
- }
- if (localValueTracker) {
- elementList.add(new javax.xml.namespace.QName("", "value"));
-
- elementList.add(localValue == null ? null : org.apache.axis2.databinding.utils.ConverterUtil
- .convertToString(localValue));
- }
-
- return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(),
- attribList.toArray());
-
- }
-
- /**
- * Factory class that keeps the parse method
- */
- public static class Factory {
-
- /**
- * static method to create the object Precondition: If this object is an element, the current or next start
- * element starts this object and any intervening reader events are ignorable If this object is not an element,
- * it is a complex type and the reader is at the event just after the outer start element Postcondition: If this
- * object is an element, the reader is positioned at its end element If this object is a complex type, the
- * reader is positioned at the end element of its outer element
- */
- public static NameValue parse(javax.xml.stream.XMLStreamReader reader) throws Exception {
- NameValue object = new NameValue();
-
- String nillableValue = null;
- try {
-
- while (!reader.isStartElement() && !reader.isEndElement())
- reader.next();
-
- if (reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance", "type") != null) {
- String fullTypeName = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance", "type");
- if (fullTypeName != null) {
- String nsPrefix = null;
- if (fullTypeName.indexOf(":") > -1) {
- nsPrefix = fullTypeName.substring(0, fullTypeName.indexOf(":"));
- }
- nsPrefix = nsPrefix == null ? "" : nsPrefix;
-
- String type = fullTypeName.substring(fullTypeName.indexOf(":") + 1);
-
- if (!"NameValue".equals(type)) {
- // find namespace for the prefix
- String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);
- return (NameValue) WorkflowInterpretorStub.ExtensionMapper.getTypeObject(nsUri, type,
- reader);
- }
-
- }
-
- }
-
- new java.util.Vector();
-
- reader.next();
-
- while (!reader.isStartElement() && !reader.isEndElement())
- reader.next();
-
- if (reader.isStartElement() && new javax.xml.namespace.QName("", "name").equals(reader.getName())) {
-
- nillableValue = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance", "nil");
- if (!"true".equals(nillableValue) && !"1".equals(nillableValue)) {
-
- String content = reader.getElementText();
-
- object.setName(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content));
-
- } else {
-
- reader.getElementText(); // throw away text nodes if
- // any.
- }
-
- reader.next();
-
- } // End of if for expected property start element
-
- else {
-
- }
-
- while (!reader.isStartElement() && !reader.isEndElement())
- reader.next();
-
- if (reader.isStartElement() && new javax.xml.namespace.QName("", "value").equals(reader.getName())) {
-
- nillableValue = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance", "nil");
- if (!"true".equals(nillableValue) && !"1".equals(nillableValue)) {
-
- String content = reader.getElementText();
-
- object.setValue(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content));
-
- } else {
-
- reader.getElementText(); // throw away text nodes if
- // any.
- }
-
- reader.next();
-
- } // End of if for expected property start element
-
- else {
-
- }
-
- while (!reader.isStartElement() && !reader.isEndElement())
- reader.next();
-
- if (reader.isStartElement())
- // A start element we are not expecting indicates a
- // trailing invalid property
- throw new org.apache.axis2.databinding.ADBException("Unexpected subelement "
- + reader.getLocalName());
-
- } catch (javax.xml.stream.XMLStreamException e) {
- throw new Exception(e);
- }
-
- return object;
- }
-
- }// end of factory class
-
-}
http://git-wip-us.apache.org/repos/asf/airavata/blob/32fff944/modules/airavata-client/src/main/java/org/apache/airavata/client/stub/interpretor/WorkflowInterpretorCallbackHandler.java
----------------------------------------------------------------------
diff --git a/modules/airavata-client/src/main/java/org/apache/airavata/client/stub/interpretor/WorkflowInterpretorCallbackHandler.java b/modules/airavata-client/src/main/java/org/apache/airavata/client/stub/interpretor/WorkflowInterpretorCallbackHandler.java
deleted file mode 100644
index bf0a4ed..0000000
--- a/modules/airavata-client/src/main/java/org/apache/airavata/client/stub/interpretor/WorkflowInterpretorCallbackHandler.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- *
- * 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.client.stub.interpretor;
-
-/**
- * WorkflowInterpretorCallbackHandler Callback class, Users can extend this class and implement their own receiveResult
- * and receiveError methods.
- */
-public abstract class WorkflowInterpretorCallbackHandler {
-
- protected Object clientData;
-
- /**
- * User can pass in any object that needs to be accessed once the NonBlocking Web service call is finished and
- * appropriate method of this CallBack is called.
- *
- * @param clientData
- * Object mechanism by which the user can pass in user data that will be avilable at the time this
- * callback is called.
- */
- public WorkflowInterpretorCallbackHandler(Object clientData) {
- this.clientData = clientData;
- }
-
- /**
- * Please use this constructor if you don't want to set any clientData
- */
- public WorkflowInterpretorCallbackHandler() {
- this.clientData = null;
- }
-
- /**
- * Get the client data
- */
-
- public Object getClientData() {
- return clientData;
- }
-
- /**
- * auto generated Axis2 call back method for launchWorkflow method override this method for handling normal response
- * from launchWorkflow operation
- */
- public void receiveResultlaunchWorkflow(java.lang.String result) {
- }
-
- /**
- * auto generated Axis2 Error handler override this method for handling error response from launchWorkflow operation
- */
- public void receiveErrorlaunchWorkflow(java.lang.Exception e) {
- }
-
-}
[3/9] airavata git commit: removing previous airavata client API -
AIRAVATA-1371
Posted by ch...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/32fff944/modules/airavata-client/src/main/java/org/apache/airavata/client/tools/DocumentCreator.java
----------------------------------------------------------------------
diff --git a/modules/airavata-client/src/main/java/org/apache/airavata/client/tools/DocumentCreator.java b/modules/airavata-client/src/main/java/org/apache/airavata/client/tools/DocumentCreator.java
deleted file mode 100644
index a2be524..0000000
--- a/modules/airavata-client/src/main/java/org/apache/airavata/client/tools/DocumentCreator.java
+++ /dev/null
@@ -1,898 +0,0 @@
-///*
-// *
-// * 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.client.tools;
-//
-//import java.io.File;
-//import java.util.ArrayList;
-//import java.util.Date;
-//import java.util.List;
-//import java.util.UUID;
-//
-//import org.apache.airavata.client.api.AiravataAPI;
-//import org.apache.airavata.client.api.exception.AiravataAPIInvocationException;
-//import org.apache.airavata.commons.gfac.type.ApplicationDescription;
-//import org.apache.airavata.commons.gfac.type.HostDescription;
-//import org.apache.airavata.commons.gfac.type.ServiceDescription;
-//import org.apache.airavata.schemas.gfac.*;
-//
-//public class DocumentCreator {
-//
-// private AiravataAPI airavataAPI = null;
-// private String trestleshpcHostAddress = "trestles.sdsc.edu";
-// private String lonestarHostAddress = "lonestar.tacc.utexas.edu";
-// private String stampedeHostAddress = "stampede.tacc.xsede.org";
-// private String gridftpAddress = "gsiftp://trestles-dm1.sdsc.edu:2811";
-// private String gramAddress = "trestles-login1.sdsc.edu:2119/jobmanager-pbstest2";
-// private String bigRed2HostAddress = "bigred2.uits.iu.edu";
-//
-//
-// public DocumentCreator(AiravataAPI airavataAPI) {
-// this.airavataAPI = airavataAPI;
-// }
-//
-// public void createLocalHostDocs() {
-// HostDescription descriptor = new HostDescription();
-// descriptor.getType().setHostName("localhost");
-// descriptor.getType().setHostAddress("127.0.0.1");
-// try {
-// airavataAPI.getApplicationManager().saveHostDescription(descriptor);
-// } catch (AiravataAPIInvocationException e) {
-// e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.
-// }
-//
-// String serviceName = "SimpleEcho0";
-// ServiceDescription serviceDescription = new ServiceDescription();
-// List<InputParameterType> inputParameters = new ArrayList<InputParameterType>();
-// List<OutputParameterType> outputParameters = new ArrayList<OutputParameterType>();
-// serviceDescription.getType().setName(serviceName);
-// serviceDescription.getType().setDescription("Echo service");
-// // Creating input parameters
-// InputParameterType parameter = InputParameterType.Factory.newInstance();
-// parameter.setParameterName("echo_input");
-// parameter.setParameterDescription("echo input");
-// ParameterType parameterType = parameter.addNewParameterType();
-// parameterType.setType(DataType.STRING);
-// parameterType.setName("String");
-// inputParameters.add(parameter);
-//
-// // Creating output parameters
-// OutputParameterType outputParameter = OutputParameterType.Factory.newInstance();
-// outputParameter.setParameterName("echo_output");
-// outputParameter.setParameterDescription("Echo output");
-// ParameterType outputParaType = outputParameter.addNewParameterType();
-// outputParaType.setType(DataType.STRING);
-// outputParaType.setName("String");
-// outputParameters.add(outputParameter);
-//
-// // Setting input and output parameters to serviceDescriptor
-// serviceDescription.getType().setInputParametersArray(inputParameters.toArray(new InputParameterType[]{}));
-// serviceDescription.getType().setOutputParametersArray(outputParameters.toArray(new OutputParameterType[]{}));
-//
-// try {
-// airavataAPI.getApplicationManager().saveServiceDescription(serviceDescription);
-// } catch (AiravataAPIInvocationException e) {
-// e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.
-// }
-//
-// ApplicationDescription applicationDeploymentDescription = new ApplicationDescription();
-// ApplicationDeploymentDescriptionType applicationDeploymentDescriptionType = applicationDeploymentDescription
-// .getType();
-// applicationDeploymentDescriptionType.addNewApplicationName().setStringValue("EchoApplication");
-// applicationDeploymentDescriptionType.setExecutableLocation("/bin/echo");
-// applicationDeploymentDescriptionType.setScratchWorkingDirectory("/tmp");
-//
-// try {
-// airavataAPI.getApplicationManager().saveApplicationDescription(serviceName, "localhost", applicationDeploymentDescription);
-// } catch (AiravataAPIInvocationException e) {
-// e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.
-// }
-// }
-//
-//
-// public void createSSHHostDocs() {
-// HostDescription descriptor = new HostDescription(SSHHostType.type);
-// descriptor.getType().setHostName("gw111.iu.xsede.org");
-// descriptor.getType().setHostAddress("gw111.iu.xsede.org");
-// try {
-// airavataAPI.getApplicationManager().saveHostDescription(descriptor);
-// } catch (AiravataAPIInvocationException e) {
-// e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.
-// }
-//
-// String serviceName = "SSHEcho1";
-// ServiceDescription serviceDescription = new ServiceDescription();
-// List<InputParameterType> inputParameters = new ArrayList<InputParameterType>();
-// List<OutputParameterType> outputParameters = new ArrayList<OutputParameterType>();
-// serviceDescription.getType().setName(serviceName);
-// serviceDescription.getType().setDescription("Echo service");
-// // Creating input parameters
-// InputParameterType parameter = InputParameterType.Factory.newInstance();
-// parameter.setParameterName("echo_input");
-// parameter.setParameterDescription("echo input");
-// ParameterType parameterType = parameter.addNewParameterType();
-// parameterType.setType(DataType.STRING);
-// parameterType.setName("String");
-// inputParameters.add(parameter);
-//
-// // Creating output parameters
-// OutputParameterType outputParameter = OutputParameterType.Factory.newInstance();
-// outputParameter.setParameterName("echo_output");
-// outputParameter.setParameterDescription("Echo output");
-// ParameterType outputParaType = outputParameter.addNewParameterType();
-// outputParaType.setType(DataType.STRING);
-// outputParaType.setName("String");
-// outputParameters.add(outputParameter);
-//
-// // Setting input and output parameters to serviceDescriptor
-// serviceDescription.getType().setInputParametersArray(inputParameters.toArray(new InputParameterType[]{}));
-// serviceDescription.getType().setOutputParametersArray(outputParameters.toArray(new OutputParameterType[]{}));
-//
-// try {
-// airavataAPI.getApplicationManager().saveServiceDescription(serviceDescription);
-// } catch (AiravataAPIInvocationException e) {
-// e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.
-// }
-//
-// ApplicationDescription applicationDeploymentDescription = new ApplicationDescription();
-// ApplicationDeploymentDescriptionType applicationDeploymentDescriptionType = applicationDeploymentDescription
-// .getType();
-// applicationDeploymentDescriptionType.addNewApplicationName().setStringValue("SSHEchoApplication");
-// applicationDeploymentDescriptionType.setExecutableLocation("/bin/echo");
-// applicationDeploymentDescriptionType.setScratchWorkingDirectory("/tmp");
-//
-// try {
-// airavataAPI.getApplicationManager().saveApplicationDescription(serviceName, "gw111.iu.xsede.org", applicationDeploymentDescription);
-// } catch (AiravataAPIInvocationException e) {
-// e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.
-// }
-//
-// }
-//
-// public void createGramDocs() {
-// /*
-// creating host descriptor for gram
-// */
-// HostDescription host = new HostDescription(GlobusHostType.type);
-// host.getType().setHostAddress(trestleshpcHostAddress);
-// host.getType().setHostName(trestleshpcHostAddress);
-// ((GlobusHostType) host.getType()).setGlobusGateKeeperEndPointArray(new String[]{gramAddress});
-// ((GlobusHostType) host.getType()).setGridFTPEndPointArray(new String[]{gridftpAddress});
-// try {
-// airavataAPI.getApplicationManager().saveHostDescription(host);
-// } catch (AiravataAPIInvocationException e) {
-// e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.
-// }
-//
-//
-// /*
-// * Service Description creation and saving
-// */
-// String serviceName = "SimpleEcho1";
-// ServiceDescription serv = new ServiceDescription();
-// serv.getType().setName(serviceName);
-//
-// List<InputParameterType> inputList = new ArrayList<InputParameterType>();
-// List<OutputParameterType> outputList = new ArrayList<OutputParameterType>();
-//
-// InputParameterType input = InputParameterType.Factory.newInstance();
-// input.setParameterName("echo_input");
-// ParameterType parameterType = input.addNewParameterType();
-// parameterType.setType(DataType.STRING);
-// parameterType.setName("String");
-//
-// OutputParameterType output = OutputParameterType.Factory.newInstance();
-// output.setParameterName("echo_output");
-// ParameterType parameterType1 = output.addNewParameterType();
-// parameterType1.setType(DataType.STRING);
-// parameterType1.setName("String");
-//
-// inputList.add(input);
-// outputList.add(output);
-//
-// InputParameterType[] inputParamList = inputList.toArray(new InputParameterType[inputList.size()]);
-// OutputParameterType[] outputParamList = outputList.toArray(new OutputParameterType[outputList.size()]);
-//
-// serv.getType().setInputParametersArray(inputParamList);
-// serv.getType().setOutputParametersArray(outputParamList);
-// try {
-// airavataAPI.getApplicationManager().saveServiceDescription(serv);
-// } catch (AiravataAPIInvocationException e) {
-// e.printStackTrace();
-// }
-//
-// /*
-// Application descriptor creation and saving
-// */
-// ApplicationDescription appDesc = new ApplicationDescription(HpcApplicationDeploymentType.type);
-// HpcApplicationDeploymentType app = (HpcApplicationDeploymentType) appDesc.getType();
-// ApplicationDeploymentDescriptionType.ApplicationName name = ApplicationDeploymentDescriptionType.ApplicationName.Factory.newInstance();
-// name.setStringValue("EchoLocal");
-// app.setApplicationName(name);
-// ProjectAccountType projectAccountType = app.addNewProjectAccount();
-// projectAccountType.setProjectAccountNumber("sds128");
-//
-// QueueType queueType = app.addNewQueue();
-// queueType.setQueueName("normal");
-//
-// app.setCpuCount(1);
-// app.setJobType(JobTypeType.SERIAL);
-// app.setNodeCount(1);
-// app.setProcessorsPerNode(1);
-//
-// /*
-// * Use bat file if it is compiled on Windows
-// */
-// app.setExecutableLocation("/bin/echo");
-//
-// /*
-// * Default tmp location
-// */
-// String tempDir = "/home/ogce/scratch";
-// app.setScratchWorkingDirectory(tempDir);
-// app.setMaxMemory(10);
-//
-//
-// try {
-// airavataAPI.getApplicationManager().saveApplicationDescription(serviceName, trestleshpcHostAddress, appDesc);
-// } catch (AiravataAPIInvocationException e) {
-// e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.
-// }
-// }
-//
-// public void createPBSDocsForOGCE() {
-// HostDescription host = new HostDescription(GsisshHostType.type);
-// host.getType().setHostAddress(trestleshpcHostAddress);
-// host.getType().setHostName(trestleshpcHostAddress);
-// ((GsisshHostType) host.getType()).setPort(22);
-// ((GsisshHostType) host.getType()).setInstalledPath("/opt/torque/bin/");
-//
-// try {
-// airavataAPI.getApplicationManager().saveHostDescription(host);
-// } catch (AiravataAPIInvocationException e) {
-// e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.
-// }
-// /*
-// * Service Description creation and saving
-// */
-// String serviceName = "SimpleEcho2";
-// ServiceDescription serv = new ServiceDescription();
-// serv.getType().setName(serviceName);
-//
-// List<InputParameterType> inputList = new ArrayList<InputParameterType>();
-// List<OutputParameterType> outputList = new ArrayList<OutputParameterType>();
-//
-//
-// InputParameterType input = InputParameterType.Factory.newInstance();
-// input.setParameterName("echo_input");
-// ParameterType parameterType = input.addNewParameterType();
-// parameterType.setType(DataType.STRING);
-// parameterType.setName("String");
-//
-// OutputParameterType output = OutputParameterType.Factory.newInstance();
-// output.setParameterName("echo_output");
-// ParameterType parameterType1 = output.addNewParameterType();
-// parameterType1.setType(DataType.STRING);
-// parameterType1.setName("String");
-//
-// inputList.add(input);
-// outputList.add(output);
-//
-// InputParameterType[] inputParamList = inputList.toArray(new InputParameterType[inputList.size()]);
-// OutputParameterType[] outputParamList = outputList.toArray(new OutputParameterType[outputList.size()]);
-//
-// serv.getType().setInputParametersArray(inputParamList);
-// serv.getType().setOutputParametersArray(outputParamList);
-// try {
-// airavataAPI.getApplicationManager().saveServiceDescription(serv);
-// } catch (AiravataAPIInvocationException e) {
-// e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.
-// }
-//
-// /*
-// Application descriptor creation and saving
-// */
-// ApplicationDescription appDesc = new ApplicationDescription(HpcApplicationDeploymentType.type);
-// HpcApplicationDeploymentType app = (HpcApplicationDeploymentType) appDesc.getType();
-// ApplicationDeploymentDescriptionType.ApplicationName name = ApplicationDeploymentDescriptionType.ApplicationName.Factory.newInstance();
-// name.setStringValue("EchoLocal");
-// app.setApplicationName(name);
-// ProjectAccountType projectAccountType = app.addNewProjectAccount();
-// projectAccountType.setProjectAccountNumber("sds128");
-//
-// QueueType queueType = app.addNewQueue();
-// queueType.setQueueName("normal");
-//
-// app.setCpuCount(1);
-// app.setJobType(JobTypeType.SERIAL);
-// app.setNodeCount(1);
-// app.setProcessorsPerNode(1);
-// app.setMaxWallTime(10);
-// /*
-// * Use bat file if it is compiled on Windows
-// */
-// app.setExecutableLocation("/bin/echo");
-//
-// /*
-// * Default tmp location
-// */
-// String tempDir = "/oasis/scratch/trestles/ogce/temp_project/";
-//
-//
-// app.setScratchWorkingDirectory(tempDir);
-// app.setInstalledParentPath("/opt/torque/bin/");
-//
-// try {
-// airavataAPI.getApplicationManager().saveApplicationDescription(serviceName, trestleshpcHostAddress, appDesc);
-// } catch (AiravataAPIInvocationException e) {
-// e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.
-// }
-//
-// /*
-// * Service Description creation and saving
-// */
-// String wrfserviceName = "WRF";
-// ServiceDescription wrfServ = new ServiceDescription();
-// wrfServ.getType().setName(wrfserviceName);
-//
-// List<InputParameterType> wrfinputList = new ArrayList<InputParameterType>();
-// List<OutputParameterType> wrfoutputList = new ArrayList<OutputParameterType>();
-//
-//
-// InputParameterType wrfinput1 = InputParameterType.Factory.newInstance();
-// wrfinput1.setParameterName("WRF_Namelist");
-// ParameterType wrfparameterType1 = wrfinput1.addNewParameterType();
-// wrfparameterType1.setType(DataType.URI);
-// wrfparameterType1.setName("URI");
-//
-// InputParameterType wrfinput2 = InputParameterType.Factory.newInstance();
-// wrfinput2.setParameterName("WRF_Input_File");
-// ParameterType wrfparameterType2 = wrfinput2.addNewParameterType();
-// wrfparameterType2.setType(DataType.URI);
-// wrfparameterType2.setName("URI");
-//
-// InputParameterType wrfinput3 = InputParameterType.Factory.newInstance();
-// wrfinput3.setParameterName("WRF_Boundary_File");
-// ParameterType wrfparameterType3 = wrfinput3.addNewParameterType();
-// wrfparameterType3.setType(DataType.URI);
-// wrfparameterType3.setName("URI");
-//
-// OutputParameterType wrfOutput1 = OutputParameterType.Factory.newInstance();
-// wrfOutput1.setParameterName("WRF_Output");
-// ParameterType wrfoutparameterType1 = wrfOutput1.addNewParameterType();
-// wrfoutparameterType1.setType(DataType.URI);
-// wrfoutparameterType1.setName("URI");
-//
-// OutputParameterType wrfOutput2 = OutputParameterType.Factory.newInstance();
-// wrfOutput2.setParameterName("WRF_Execution_Log");
-// ParameterType wrfoutparameterType2 = wrfOutput2.addNewParameterType();
-// wrfoutparameterType2.setType(DataType.URI);
-// wrfoutparameterType2.setName("URI");
-//
-// wrfinputList.add(wrfinput1);
-// wrfinputList.add(wrfinput2);
-// wrfinputList.add(wrfinput3);
-// wrfoutputList.add(wrfOutput1);
-// wrfoutputList.add(wrfOutput2);
-//
-// InputParameterType[] wrfinputParamList = wrfinputList.toArray(new InputParameterType[wrfinputList.size()]);
-// OutputParameterType[] wrfoutputParamList = wrfoutputList.toArray(new OutputParameterType[wrfoutputList.size()]);
-//
-// wrfServ.getType().setInputParametersArray(wrfinputParamList);
-// wrfServ.getType().setOutputParametersArray(wrfoutputParamList);
-// try {
-// airavataAPI.getApplicationManager().saveServiceDescription(wrfServ);
-// } catch (AiravataAPIInvocationException e) {
-// e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.
-// }
-//
-// /*
-// Application descriptor creation and saving
-// */
-// ApplicationDescription wrfAppDesc = new ApplicationDescription(HpcApplicationDeploymentType.type);
-// HpcApplicationDeploymentType wrfApp = (HpcApplicationDeploymentType) wrfAppDesc.getType();
-// ApplicationDeploymentDescriptionType.ApplicationName wrfName = ApplicationDeploymentDescriptionType.ApplicationName.Factory.newInstance();
-// wrfName.setStringValue("WRF");
-// wrfApp.setApplicationName(wrfName);
-// ProjectAccountType wrfprojectAccountType = wrfApp.addNewProjectAccount();
-// wrfprojectAccountType.setProjectAccountNumber("sds128");
-//
-// QueueType wrfQueueType = wrfApp.addNewQueue();
-// wrfQueueType.setQueueName("normal");
-//
-// wrfApp.setCpuCount(32);
-// wrfApp.setJobType(JobTypeType.MPI);
-// wrfApp.setNodeCount(2);
-// wrfApp.setProcessorsPerNode(1);
-// wrfApp.setMaxWallTime(30);
-// /*
-// * Use bat file if it is compiled on Windows
-// */
-// wrfApp.setExecutableLocation("/home/ogce/apps/wrf_wrapper.sh");
-//
-// /*
-// * Default tmp location
-// */
-// String wrfTempDir = "/oasis/scratch/trestles/ogce/temp_project/";
-//
-// wrfApp.setScratchWorkingDirectory(wrfTempDir);
-// wrfApp.setInstalledParentPath("/opt/torque/bin/");
-//
-// try {
-// airavataAPI.getApplicationManager().saveApplicationDescription(wrfserviceName, trestleshpcHostAddress, wrfAppDesc);
-// } catch (AiravataAPIInvocationException e) {
-// e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.
-// }
-// }
-//
-//
-// public void createSlurmDocs() {
-// HostDescription host = new HostDescription(GsisshHostType.type);
-// host.getType().setHostAddress(stampedeHostAddress);
-// host.getType().setHostName(stampedeHostAddress);
-// ((GsisshHostType) host.getType()).setJobManager("slurm");
-// ((GsisshHostType) host.getType()).setInstalledPath("/usr/bin/");
-// ((GsisshHostType) host.getType()).setPort(2222);
-// ((GsisshHostType) host.getType()).setMonitorMode("push");
-//
-//
-// try {
-// airavataAPI.getApplicationManager().saveHostDescription(host);
-// } catch (AiravataAPIInvocationException e) {
-// e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.
-// }
-// /*
-// * Service Description creation and saving
-// */
-// String serviceName = "SimpleEcho3";
-// ServiceDescription serv = new ServiceDescription();
-// serv.getType().setName(serviceName);
-//
-// List<InputParameterType> inputList = new ArrayList<InputParameterType>();
-// List<OutputParameterType> outputList = new ArrayList<OutputParameterType>();
-//
-//
-// InputParameterType input = InputParameterType.Factory.newInstance();
-// input.setParameterName("echo_input");
-// ParameterType parameterType = input.addNewParameterType();
-// parameterType.setType(DataType.STRING);
-// parameterType.setName("String");
-//
-// OutputParameterType output = OutputParameterType.Factory.newInstance();
-// output.setParameterName("echo_output");
-// ParameterType parameterType1 = output.addNewParameterType();
-// parameterType1.setType(DataType.STRING);
-// parameterType1.setName("String");
-//
-// inputList.add(input);
-// outputList.add(output);
-//
-// InputParameterType[] inputParamList = inputList.toArray(new InputParameterType[inputList.size()]);
-// OutputParameterType[] outputParamList = outputList.toArray(new OutputParameterType[outputList.size()]);
-//
-// serv.getType().setInputParametersArray(inputParamList);
-// serv.getType().setOutputParametersArray(outputParamList);
-// try {
-// airavataAPI.getApplicationManager().saveServiceDescription(serv);
-// } catch (AiravataAPIInvocationException e) {
-// e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.
-// }
-//
-// /*
-// Application descriptor creation and saving
-// */
-// ApplicationDescription appDesc = new ApplicationDescription(HpcApplicationDeploymentType.type);
-// HpcApplicationDeploymentType app = (HpcApplicationDeploymentType) appDesc.getType();
-// ApplicationDeploymentDescriptionType.ApplicationName name = ApplicationDeploymentDescriptionType.ApplicationName.Factory.newInstance();
-// name.setStringValue("EchoLocal");
-// app.setApplicationName(name);
-// ProjectAccountType projectAccountType = app.addNewProjectAccount();
-// projectAccountType.setProjectAccountNumber("TG-STA110014S");
-//
-// QueueType queueType = app.addNewQueue();
-// queueType.setQueueName("normal");
-//
-// app.setCpuCount(1);
-// app.setJobType(JobTypeType.SERIAL);
-// app.setNodeCount(1);
-// app.setProcessorsPerNode(1);
-// app.setMaxWallTime(10);
-// /*
-// * Use bat file if it is compiled on Windows
-// */
-// app.setExecutableLocation("/bin/echo");
-//
-// /*
-// * Default tmp location
-// */
-// String tempDir = "/home1/01437/ogce";
-//
-//
-// app.setScratchWorkingDirectory(tempDir);
-// app.setInstalledParentPath("/usr/bin/");
-//
-// try {
-// airavataAPI.getApplicationManager().saveApplicationDescription(serviceName, stampedeHostAddress, appDesc);
-// } catch (AiravataAPIInvocationException e) {
-// e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.
-// }
-// }
-//
-// public void createSGEDocs() {
-// HostDescription host = new HostDescription(GsisshHostType.type);
-// host.getType().setHostAddress(lonestarHostAddress);
-// host.getType().setHostName(lonestarHostAddress);
-// ((GsisshHostType) host.getType()).setJobManager("sge");
-// ((GsisshHostType) host.getType()).setInstalledPath("/opt/sge6.2/bin/lx24-amd64/");
-// ((GsisshHostType) host.getType()).setPort(22);
-// try {
-// airavataAPI.getApplicationManager().saveHostDescription(host);
-// } catch (AiravataAPIInvocationException e) {
-// e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.
-// }
-// /*
-// * Service Description creation and saving
-// */
-// String serviceName = "SimpleEcho4";
-// ServiceDescription serv = new ServiceDescription();
-// serv.getType().setName(serviceName);
-//
-// List<InputParameterType> inputList = new ArrayList<InputParameterType>();
-// List<OutputParameterType> outputList = new ArrayList<OutputParameterType>();
-//
-//
-// InputParameterType input = InputParameterType.Factory.newInstance();
-// input.setParameterName("echo_input");
-// ParameterType parameterType = input.addNewParameterType();
-// parameterType.setType(DataType.STRING);
-// parameterType.setName("String");
-//
-// OutputParameterType output = OutputParameterType.Factory.newInstance();
-// output.setParameterName("echo_output");
-// ParameterType parameterType1 = output.addNewParameterType();
-// parameterType1.setType(DataType.STRING);
-// parameterType1.setName("String");
-//
-// inputList.add(input);
-// outputList.add(output);
-//
-// InputParameterType[] inputParamList = inputList.toArray(new InputParameterType[inputList.size()]);
-// OutputParameterType[] outputParamList = outputList.toArray(new OutputParameterType[outputList.size()]);
-//
-// serv.getType().setInputParametersArray(inputParamList);
-// serv.getType().setOutputParametersArray(outputParamList);
-// try {
-// airavataAPI.getApplicationManager().saveServiceDescription(serv);
-// } catch (AiravataAPIInvocationException e) {
-// e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.
-// }
-//
-// /*
-// Application descriptor creation and saving
-// */
-// ApplicationDescription appDesc = new ApplicationDescription(HpcApplicationDeploymentType.type);
-// HpcApplicationDeploymentType app = (HpcApplicationDeploymentType) appDesc.getType();
-// ApplicationDeploymentDescriptionType.ApplicationName name = ApplicationDeploymentDescriptionType.ApplicationName.Factory.newInstance();
-// name.setStringValue("EchoLocal");
-// app.setApplicationName(name);
-// ProjectAccountType projectAccountType = app.addNewProjectAccount();
-// projectAccountType.setProjectAccountNumber("TG-STA110014S");
-//
-// QueueType queueType = app.addNewQueue();
-// queueType.setQueueName("normal");
-//
-// app.setCpuCount(1);
-// app.setJobType(JobTypeType.SERIAL);
-// app.setNodeCount(1);
-// app.setProcessorsPerNode(1);
-// app.setMaxWallTime(10);
-// /*
-// * Use bat file if it is compiled on Windows
-// */
-// app.setExecutableLocation("/bin/echo");
-//
-// /*
-// * Default tmp location
-// */
-// String tempDir = "/home1/01437/ogce";
-//
-//
-// app.setScratchWorkingDirectory(tempDir);
-// app.setInstalledParentPath("/opt/sge6.2/bin/lx24-amd64/");
-//
-// try {
-// airavataAPI.getApplicationManager().saveApplicationDescription(serviceName, lonestarHostAddress, appDesc);
-// } catch (AiravataAPIInvocationException e) {
-// e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.
-// }
-// }
-//
-// public void createEchoHostDocs() {
-// String serviceName = "Echo";
-// ServiceDescription serviceDescription = new ServiceDescription();
-// List<InputParameterType> inputParameters = new ArrayList<InputParameterType>();
-// List<OutputParameterType> outputParameters = new ArrayList<OutputParameterType>();
-// serviceDescription.getType().setName(serviceName);
-// serviceDescription.getType().setDescription("Echo service");
-// // Creating input parameters
-// InputParameterType parameter = InputParameterType.Factory.newInstance();
-// parameter.setParameterName("echo_input");
-// parameter.setParameterDescription("echo input");
-// ParameterType parameterType = parameter.addNewParameterType();
-// parameterType.setType(DataType.STRING);
-// parameterType.setName("String");
-// inputParameters.add(parameter);
-//
-// // Creating output parameters
-// OutputParameterType outputParameter = OutputParameterType.Factory.newInstance();
-// outputParameter.setParameterName("echo_output");
-// outputParameter.setParameterDescription("Echo output");
-// ParameterType outputParaType = outputParameter.addNewParameterType();
-// outputParaType.setType(DataType.STRING);
-// outputParaType.setName("String");
-// outputParameters.add(outputParameter);
-//
-// // Setting input and output parameters to serviceDescriptor
-// serviceDescription.getType().setInputParametersArray(inputParameters.toArray(new InputParameterType[]{}));
-// serviceDescription.getType().setOutputParametersArray(outputParameters.toArray(new OutputParameterType[]{}));
-//
-// try {
-// airavataAPI.getApplicationManager().saveServiceDescription(serviceDescription);
-// } catch (AiravataAPIInvocationException e) {
-// e.printStackTrace(); // To change body of catch statement use File |
-// // Settings | File Templates.
-// }
-// // Localhost
-// ApplicationDescription applicationDeploymentDescription = new ApplicationDescription();
-// ApplicationDeploymentDescriptionType applicationDeploymentDescriptionType = applicationDeploymentDescription.getType();
-// applicationDeploymentDescriptionType.addNewApplicationName().setStringValue(serviceName);
-// applicationDeploymentDescriptionType.setExecutableLocation("/bin/echo");
-// applicationDeploymentDescriptionType.setScratchWorkingDirectory("/tmp");
-//
-// try {
-// airavataAPI.getApplicationManager().saveApplicationDescription(serviceName, "localhost", applicationDeploymentDescription);
-// } catch (AiravataAPIInvocationException e) {
-// e.printStackTrace(); // To change body of catch statement use File |
-// // Settings | File Templates.
-// }
-// // Stampede
-// /*
-// * Application descriptor creation and saving
-// */
-// ApplicationDescription appDesc1 = new ApplicationDescription(HpcApplicationDeploymentType.type);
-// HpcApplicationDeploymentType app1 = (HpcApplicationDeploymentType) appDesc1.getType();
-// ApplicationDeploymentDescriptionType.ApplicationName name = ApplicationDeploymentDescriptionType.ApplicationName.Factory.newInstance();
-// name.setStringValue(serviceName);
-// app1.setApplicationName(name);
-// ProjectAccountType projectAccountType = app1.addNewProjectAccount();
-// projectAccountType.setProjectAccountNumber("TG-STA110014S");
-//
-// QueueType queueType = app1.addNewQueue();
-// queueType.setQueueName("normal");
-//
-// app1.setCpuCount(1);
-// app1.setJobType(JobTypeType.SERIAL);
-// app1.setNodeCount(1);
-// app1.setProcessorsPerNode(1);
-// app1.setMaxWallTime(10);
-// /*
-// * Use bat file if it is compiled on Windows
-// */
-// app1.setExecutableLocation("/bin/echo");
-//
-// /*
-// * Default tmp location
-// */
-// String tempDir = "/home1/01437/ogce";
-//
-// app1.setScratchWorkingDirectory(tempDir);
-// app1.setInstalledParentPath("/usr/bin/");
-//
-// try {
-// airavataAPI.getApplicationManager().saveApplicationDescription(serviceName, stampedeHostAddress, appDesc1);
-// } catch (AiravataAPIInvocationException e) {
-// e.printStackTrace(); // To change body of catch statement use File |
-// // Settings | File Templates.
-// }
-// // Trestles
-// /*
-// * Application descriptor creation and saving
-// */
-// ApplicationDescription appDesc2 = new ApplicationDescription(HpcApplicationDeploymentType.type);
-// HpcApplicationDeploymentType app2 = (HpcApplicationDeploymentType) appDesc2.getType();
-// ApplicationDeploymentDescriptionType.ApplicationName name2 = ApplicationDeploymentDescriptionType.ApplicationName.Factory.newInstance();
-// name2.setStringValue(serviceName);
-// app2.setApplicationName(name);
-// ProjectAccountType projectAccountType2 = app2.addNewProjectAccount();
-// projectAccountType2.setProjectAccountNumber("sds128");
-//
-// QueueType queueType2 = app2.addNewQueue();
-// queueType2.setQueueName("normal");
-//
-// app2.setCpuCount(1);
-// app2.setJobType(JobTypeType.SERIAL);
-// app2.setNodeCount(1);
-// app2.setProcessorsPerNode(1);
-// app2.setMaxWallTime(10);
-// /*
-// * Use bat file if it is compiled on Windows
-// */
-// app2.setExecutableLocation("/bin/echo");
-//
-// /*
-// * Default tmp location
-// */
-// String tempDir2 = "/home/ogce/scratch";
-//
-// app2.setScratchWorkingDirectory(tempDir2);
-// app2.setInstalledParentPath("/opt/torque/bin/");
-//
-// try {
-// airavataAPI.getApplicationManager().saveApplicationDescription(serviceName, trestleshpcHostAddress, appDesc2);
-// } catch (AiravataAPIInvocationException e) {
-// e.printStackTrace(); // To change body of catch statement use File |
-// // Settings | File Templates.
-// }
-// // Lonestar
-// /*
-// * Application descriptor creation and saving
-// */
-// ApplicationDescription appDesc3 = new ApplicationDescription(HpcApplicationDeploymentType.type);
-// HpcApplicationDeploymentType app3 = (HpcApplicationDeploymentType) appDesc3.getType();
-// ApplicationDeploymentDescriptionType.ApplicationName name3 = ApplicationDeploymentDescriptionType.ApplicationName.Factory.newInstance();
-// name3.setStringValue(serviceName);
-// app3.setApplicationName(name);
-// ProjectAccountType projectAccountType3 = app3.addNewProjectAccount();
-// projectAccountType3.setProjectAccountNumber("TG-STA110014S");
-//
-// QueueType queueType3 = app3.addNewQueue();
-// queueType3.setQueueName("normal");
-//
-// app3.setCpuCount(1);
-// app3.setJobType(JobTypeType.SERIAL);
-// app3.setNodeCount(1);
-// app3.setProcessorsPerNode(1);
-// app3.setMaxWallTime(10);
-// /*
-// * Use bat file if it is compiled on Windows
-// */
-// app3.setExecutableLocation("/bin/echo");
-//
-// /*
-// * Default tmp location
-// */
-// String tempDir3 = "/home1/01437/ogce";
-//
-// app3.setScratchWorkingDirectory(tempDir3);
-// app3.setInstalledParentPath("/opt/sge6.2/bin/lx24-amd64/");
-//
-// try {
-// airavataAPI.getApplicationManager().saveApplicationDescription(serviceName, lonestarHostAddress, appDesc3);
-// } catch (AiravataAPIInvocationException e) {
-// e.printStackTrace(); // To change body of catch statement use File |
-// // Settings | File Templates.
-// }
-//
-// }
-//
-// public void createBigRedDocs() {
-// /*
-// * Host
-// */
-// HostDescription host = new HostDescription(SSHHostType.type);
-// host.getType().setHostAddress(bigRed2HostAddress);
-// host.getType().setHostName("bigred2");
-// ((SSHHostType) host.getType()).setHpcResource(true);
-// try {
-// airavataAPI.getApplicationManager().saveHostDescription(host);
-// } catch (AiravataAPIInvocationException e) {
-// e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.
-// }
-// /*
-// * App
-// */
-// ApplicationDescription appDesc = new ApplicationDescription(HpcApplicationDeploymentType.type);
-// HpcApplicationDeploymentType app = (HpcApplicationDeploymentType) appDesc.getType();
-// ApplicationDeploymentDescriptionType.ApplicationName name = ApplicationDeploymentDescriptionType.ApplicationName.Factory.newInstance();
-// name.setStringValue("EchoLocal");
-// app.setApplicationName(name);
-//
-// app.setCpuCount(1);
-// app.setJobType(JobTypeType.SERIAL);
-// app.setNodeCount(1);
-// app.setProcessorsPerNode(1);
-//
-// /*
-// * Use bat file if it is compiled on Windows
-// */
-// app.setExecutableLocation("/bin/echo");
-//
-// /*
-// * Default tmp location
-// */
-// String tempDir = "/tmp";
-// String date = (new Date()).toString();
-// date = date.replaceAll(" ", "_");
-// date = date.replaceAll(":", "_");
-//
-// tempDir = tempDir + File.separator
-// + "SimpleEcho" + "_" + date + "_" + UUID.randomUUID();
-//
-// System.out.println(tempDir);
-// app.setScratchWorkingDirectory(tempDir);
-// app.setStaticWorkingDirectory(tempDir);
-// app.setInputDataDirectory(tempDir + File.separator + "inputData");
-// app.setOutputDataDirectory(tempDir + File.separator + "outputData");
-// app.setStandardOutput(tempDir + File.separator + app.getApplicationName().getStringValue() + ".stdout");
-// app.setStandardError(tempDir + File.separator + app.getApplicationName().getStringValue() + ".stderr");
-// app.setMaxWallTime(5);
-// app.setJobSubmitterCommand("aprun -n 1");
-// app.setInstalledParentPath("/opt/torque/torque-4.2.3.1/bin/");
-//
-// /*
-// * Service
-// */
-// ServiceDescription serv = new ServiceDescription();
-// serv.getType().setName("SimpleEchoBR");
-//
-// List<InputParameterType> inputList = new ArrayList<InputParameterType>();
-//
-// InputParameterType input = InputParameterType.Factory.newInstance();
-// input.setParameterName("echo_input");
-// input.setParameterType(StringParameterType.Factory.newInstance());
-// inputList.add(input);
-//
-// InputParameterType[] inputParamList = inputList.toArray(new InputParameterType[inputList
-//
-// .size()]);
-// List<OutputParameterType> outputList = new ArrayList<OutputParameterType>();
-// OutputParameterType output = OutputParameterType.Factory.newInstance();
-// output.setParameterName("echo_output");
-// output.setParameterType(StringParameterType.Factory.newInstance());
-// outputList.add(output);
-//
-// OutputParameterType[] outputParamList = outputList
-// .toArray(new OutputParameterType[outputList.size()]);
-//
-// serv.getType().setInputParametersArray(inputParamList);
-// serv.getType().setOutputParametersArray(outputParamList);
-// try {
-// airavataAPI.getApplicationManager().saveServiceDescription(serv);
-// } catch (AiravataAPIInvocationException e) {
-// e.printStackTrace(); // To change body of catch statement use File |
-// // Settings | File Templates.
-// }
-// try {
-// airavataAPI.getApplicationManager().saveApplicationDescription("SimpleEchoBR", trestleshpcHostAddress, appDesc);
-// } catch (AiravataAPIInvocationException e) {
-// e.printStackTrace(); // To change body of catch statement use File |
-// // Settings | File Templates.
-// }
-// }
-//
-// public AiravataAPI getAiravataAPI() {
-// return airavataAPI;
-// }
-//
-// public void setAiravataAPI(AiravataAPI airavataAPI) {
-// this.airavataAPI = airavataAPI;
-// }
-//}
-//
[4/9] airavata git commit: removing previous airavata client API -
AIRAVATA-1371
Posted by ch...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/32fff944/modules/airavata-client/src/main/java/org/apache/airavata/client/stub/interpretor/WorkflowInterpretorStub.java
----------------------------------------------------------------------
diff --git a/modules/airavata-client/src/main/java/org/apache/airavata/client/stub/interpretor/WorkflowInterpretorStub.java b/modules/airavata-client/src/main/java/org/apache/airavata/client/stub/interpretor/WorkflowInterpretorStub.java
deleted file mode 100644
index 4d9322d..0000000
--- a/modules/airavata-client/src/main/java/org/apache/airavata/client/stub/interpretor/WorkflowInterpretorStub.java
+++ /dev/null
@@ -1,2152 +0,0 @@
-/*
- *
- * 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.client.stub.interpretor;
-
-/*
- * WorkflowInterpretorStub java implementation
- */
-
-import org.apache.airavata.client.stub.interpretor.NameValue.Factory;
-import org.apache.axis2.AxisFault;
-import org.apache.axis2.Constants;
-import org.apache.axis2.transport.http.HTTPConstants;
-import org.apache.commons.httpclient.HostConfiguration;
-import org.apache.commons.httpclient.HttpClient;
-import org.apache.commons.httpclient.MultiThreadedHttpConnectionManager;
-
-public class WorkflowInterpretorStub extends org.apache.axis2.client.Stub {
- protected org.apache.axis2.description.AxisOperation[] _operations;
-
- // hashmaps to keep the fault mapping
- private java.util.HashMap faultExceptionNameMap = new java.util.HashMap();
- private java.util.HashMap faultExceptionClassNameMap = new java.util.HashMap();
- private java.util.HashMap faultMessageMap = new java.util.HashMap();
-
- private static int counter = 0;
-
- private static synchronized String getUniqueSuffix() {
- // reset the counter if it is greater than 99999
- if (counter > 99999) {
- counter = 0;
- }
- counter = counter + 1;
- return Long.toString(System.currentTimeMillis()) + "_" + counter;
- }
-
- private void populateAxisService() throws org.apache.axis2.AxisFault {
-
- // creating the Service with a unique name
- _service = new org.apache.axis2.description.AxisService("WorkflowInterpretor" + getUniqueSuffix());
- addAnonymousOperations();
-
- // creating the operations
- org.apache.axis2.description.AxisOperation __operation;
-
- _operations = new org.apache.axis2.description.AxisOperation[1];
-
- __operation = new org.apache.axis2.description.OutInAxisOperation();
-
- __operation.setName(new javax.xml.namespace.QName("http://interpretor.xbaya.airavata.apache.org",
- "launchWorkflow"));
- _service.addOperation(__operation);
-
- _operations[0] = __operation;
-
- }
-
- // populates the faults
- private void populateFaults() {
-
- }
-
- /**
- * Constructor that takes in a configContext
- */
-
- public WorkflowInterpretorStub(org.apache.axis2.context.ConfigurationContext configurationContext,
- java.lang.String targetEndpoint) throws org.apache.axis2.AxisFault {
- this(configurationContext, targetEndpoint, false);
- }
-
- /**
- * Constructor that takes in a configContext and useseperate listner
- */
- public WorkflowInterpretorStub(org.apache.axis2.context.ConfigurationContext configurationContext,
- java.lang.String targetEndpoint, boolean useSeparateListener) throws org.apache.axis2.AxisFault {
- // To populate AxisService
- populateAxisService();
- populateFaults();
- MultiThreadedHttpConnectionManager httpConnectionManager = new MultiThreadedHttpConnectionManager();
- httpConnectionManager.getParams().setMaxTotalConnections(10000);
- httpConnectionManager.getParams().setMaxConnectionsPerHost(HostConfiguration.ANY_HOST_CONFIGURATION, 100);
- httpConnectionManager.getParams().setDefaultMaxConnectionsPerHost(200);
- HttpClient httpClient = new HttpClient(httpConnectionManager);
- _serviceClient = new org.apache.axis2.client.ServiceClient(configurationContext, _service);
-
- configurationContext = _serviceClient.getServiceContext().getConfigurationContext();
- configurationContext.setProperty(HTTPConstants.REUSE_HTTP_CLIENT, true);
- configurationContext.setProperty(HTTPConstants.CACHED_HTTP_CLIENT, httpClient);
- configurationContext.setProperty(HTTPConstants.AUTO_RELEASE_CONNECTION, true);
- _serviceClient.getOptions().setTo(new org.apache.axis2.addressing.EndpointReference(targetEndpoint));
- _serviceClient.getOptions().setUseSeparateListener(useSeparateListener);
- }
-
- /**
- * Default Constructor
- */
- public WorkflowInterpretorStub(org.apache.axis2.context.ConfigurationContext configurationContext)
- throws org.apache.axis2.AxisFault {
-
- this(configurationContext, "http://silktree.cs.indiana.edu:18080/axis2/services/WorkflowInterpretor");
-
- }
-
- /**
- * Default Constructor
- */
- public WorkflowInterpretorStub() throws org.apache.axis2.AxisFault {
-
- this("http://silktree.cs.indiana.edu:18080/axis2/services/WorkflowInterpretor");
-
- }
-
- /**
- * Constructor taking the target endpoint
- */
- public WorkflowInterpretorStub(java.lang.String targetEndpoint) throws org.apache.axis2.AxisFault {
- this(null, targetEndpoint);
- }
-
- /**
- * Auto generated method signature
- *
- * @see org.apache.airavata.xbaya.WorkflowInterpretor#launchWorkflow
- * @param launchWorkflow0
- */
-
- public java.lang.String launchWorkflow(
-
- java.lang.String workflowAsString1, java.lang.String topic2, NameValue[] inputs5)
-
- throws java.rmi.RemoteException
-
- {
- org.apache.axis2.context.MessageContext _messageContext = null;
- try {
- org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[0]
- .getName());
- _operationClient.getOptions().setAction("urn:launchWorkflow");
- _operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(true);
-
- addPropertyToOperationClient(_operationClient,
- org.apache.axis2.description.WSDL2Constants.ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR, "&");
-
- // create a message context
- _messageContext = new org.apache.axis2.context.MessageContext();
-
- // create SOAP envelope with that payload
- org.apache.axiom.soap.SOAPEnvelope env = null;
- WorkflowInterpretorStub.LaunchWorkflow dummyWrappedType = null;
- env = toEnvelope(getFactory(_operationClient.getOptions().getSoapVersionURI()), workflowAsString1, topic2,
- inputs5, dummyWrappedType,
- optimizeContent(new javax.xml.namespace.QName("http://interpretor.xbaya.airavata.apache.org",
- "launchWorkflow")));
-
- // adding SOAP soap_headers
- _serviceClient.addHeadersToEnvelope(env);
- _serviceClient.getOptions().setTimeOutInMilliSeconds(90000000);
- // set the message context with that soap envelope
- _messageContext.setEnvelope(env);
-
- // add the message contxt to the operation client
- _operationClient.addMessageContext(_messageContext);
-
- // execute the operation client
- _operationClient.execute(true);
-
- org.apache.axis2.context.MessageContext _returnMessageContext = _operationClient
- .getMessageContext(org.apache.axis2.wsdl.WSDLConstants.MESSAGE_LABEL_IN_VALUE);
- org.apache.axiom.soap.SOAPEnvelope _returnEnv = _returnMessageContext.getEnvelope();
-
- java.lang.Object object = fromOM(_returnEnv.getBody().getFirstElement(),
- WorkflowInterpretorStub.LaunchWorkflowResponse.class, getEnvelopeNamespaces(_returnEnv));
-
- return getLaunchWorkflowResponse_return((WorkflowInterpretorStub.LaunchWorkflowResponse) object);
-
- } catch (AxisFault f) {
- org.apache.axiom.om.OMElement faultElt = f.getDetail();
- if (faultElt != null) {
- if (faultExceptionNameMap.containsKey(faultElt.getQName())) {
- // make the fault by reflection
- try {
- java.lang.String exceptionClassName = (java.lang.String) faultExceptionClassNameMap
- .get(faultElt.getQName());
- java.lang.Class exceptionClass = java.lang.Class.forName(exceptionClassName);
- java.lang.Exception ex = (java.lang.Exception) exceptionClass.newInstance();
- // message class
- java.lang.String messageClassName = (java.lang.String) faultMessageMap.get(faultElt.getQName());
- java.lang.Class messageClass = java.lang.Class.forName(messageClassName);
- java.lang.Object messageObject = fromOM(faultElt, messageClass, null);
- java.lang.reflect.Method m = exceptionClass.getMethod("setFaultMessage",
- new java.lang.Class[]{messageClass});
- m.invoke(ex, new java.lang.Object[]{messageObject});
-
- throw new java.rmi.RemoteException(ex.getMessage(), ex);
- } catch (java.lang.ClassCastException e) {
- // we cannot intantiate the class - throw the original
- // Axis fault
- throw f;
- } catch (java.lang.ClassNotFoundException e) {
- // we cannot intantiate the class - throw the original
- // Axis fault
- throw f;
- } catch (java.lang.NoSuchMethodException e) {
- // we cannot intantiate the class - throw the original
- // Axis fault
- throw f;
- } catch (java.lang.reflect.InvocationTargetException e) {
- // we cannot intantiate the class - throw the original
- // Axis fault
- throw f;
- } catch (java.lang.IllegalAccessException e) {
- // we cannot intantiate the class - throw the original
- // Axis fault
- throw f;
- } catch (java.lang.InstantiationException e) {
- // we cannot intantiate the class - throw the original
- // Axis fault
- throw f;
- }
- } else {
- throw f;
- }
- } else {
- throw f;
- }
- } finally {
- _serviceClient.cleanup();
- _serviceClient.cleanupTransport();
- _messageContext.getTransportOut().getSender().cleanup(_messageContext);
- }
- }
-
- /**
- * Auto generated method signature for Asynchronous Invocations
- *
- * @see org.apache.airavata.xbaya.WorkflowInterpretor#startlaunchWorkflow
- * @param launchWorkflow0
- */
- public void startlaunchWorkflow(
-
- java.lang.String workflowAsString1, java.lang.String topic2, java.lang.String password3,
- java.lang.String username4, NameValue[] inputs5, NameValue[] configurations6,
-
- final WorkflowInterpretorCallbackHandler callback)
-
- throws java.rmi.RemoteException {
-
- org.apache.axis2.client.OperationClient _operationClient = _serviceClient
- .createClient(_operations[0].getName());
- _operationClient.getOptions().setAction("urn:launchWorkflow");
- _operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(true);
-
- addPropertyToOperationClient(_operationClient,
- org.apache.axis2.description.WSDL2Constants.ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR, "&");
-
- // create SOAP envelope with that payload
- org.apache.axiom.soap.SOAPEnvelope env = null;
- final org.apache.axis2.context.MessageContext _messageContext = new org.apache.axis2.context.MessageContext();
-
- // Style is Doc.
- WorkflowInterpretorStub.LaunchWorkflow dummyWrappedType = null;
- env = toEnvelope(getFactory(_operationClient.getOptions().getSoapVersionURI()), workflowAsString1, topic2,
- inputs5, dummyWrappedType,
- optimizeContent(new javax.xml.namespace.QName("http://interpretor.xbaya.airavata.apache.org",
- "launchWorkflow")));
-
- // adding SOAP soap_headers
- _serviceClient.addHeadersToEnvelope(env);
- // create message context with that soap envelope
- _messageContext.setEnvelope(env);
-
- // add the message context to the operation client
- _operationClient.addMessageContext(_messageContext);
-
- _operationClient.setCallback(new org.apache.axis2.client.async.AxisCallback() {
- public void onMessage(org.apache.axis2.context.MessageContext resultContext) {
- try {
- org.apache.axiom.soap.SOAPEnvelope resultEnv = resultContext.getEnvelope();
-
- java.lang.Object object = fromOM(resultEnv.getBody().getFirstElement(),
- WorkflowInterpretorStub.LaunchWorkflowResponse.class, getEnvelopeNamespaces(resultEnv));
- callback.receiveResultlaunchWorkflow(getLaunchWorkflowResponse_return((WorkflowInterpretorStub.LaunchWorkflowResponse) object));
-
- } catch (org.apache.axis2.AxisFault e) {
- callback.receiveErrorlaunchWorkflow(e);
- }
- }
-
- public void onError(java.lang.Exception error) {
- if (error instanceof org.apache.axis2.AxisFault) {
- org.apache.axis2.AxisFault f = (org.apache.axis2.AxisFault) error;
- org.apache.axiom.om.OMElement faultElt = f.getDetail();
- if (faultElt != null) {
- if (faultExceptionNameMap.containsKey(faultElt.getQName())) {
- // make the fault by reflection
- try {
- java.lang.String exceptionClassName = (java.lang.String) faultExceptionClassNameMap
- .get(faultElt.getQName());
- java.lang.Class exceptionClass = java.lang.Class.forName(exceptionClassName);
- java.lang.Exception ex = (java.lang.Exception) exceptionClass.newInstance();
- // message class
- java.lang.String messageClassName = (java.lang.String) faultMessageMap.get(faultElt
- .getQName());
- java.lang.Class messageClass = java.lang.Class.forName(messageClassName);
- java.lang.Object messageObject = fromOM(faultElt, messageClass, null);
- java.lang.reflect.Method m = exceptionClass.getMethod("setFaultMessage",
- new java.lang.Class[] { messageClass });
- m.invoke(ex, new java.lang.Object[] { messageObject });
-
- callback.receiveErrorlaunchWorkflow(new java.rmi.RemoteException(ex.getMessage(), ex));
- } catch (java.lang.ClassCastException e) {
- // we cannot intantiate the class -
- // throw the original Axis fault
- callback.receiveErrorlaunchWorkflow(f);
- } catch (java.lang.ClassNotFoundException e) {
- // we cannot intantiate the class -
- // throw the original Axis fault
- callback.receiveErrorlaunchWorkflow(f);
- } catch (java.lang.NoSuchMethodException e) {
- // we cannot intantiate the class -
- // throw the original Axis fault
- callback.receiveErrorlaunchWorkflow(f);
- } catch (java.lang.reflect.InvocationTargetException e) {
- // we cannot intantiate the class -
- // throw the original Axis fault
- callback.receiveErrorlaunchWorkflow(f);
- } catch (java.lang.IllegalAccessException e) {
- // we cannot intantiate the class -
- // throw the original Axis fault
- callback.receiveErrorlaunchWorkflow(f);
- } catch (java.lang.InstantiationException e) {
- // we cannot intantiate the class -
- // throw the original Axis fault
- callback.receiveErrorlaunchWorkflow(f);
- } catch (org.apache.axis2.AxisFault e) {
- // we cannot intantiate the class -
- // throw the original Axis fault
- callback.receiveErrorlaunchWorkflow(f);
- }
- } else {
- callback.receiveErrorlaunchWorkflow(f);
- }
- } else {
- callback.receiveErrorlaunchWorkflow(f);
- }
- } else {
- callback.receiveErrorlaunchWorkflow(error);
- }
- }
-
- public void onFault(org.apache.axis2.context.MessageContext faultContext) {
- org.apache.axis2.AxisFault fault = org.apache.axis2.util.Utils
- .getInboundFaultFromMessageContext(faultContext);
- onError(fault);
- }
-
- public void onComplete() {
- try {
- _messageContext.getTransportOut().getSender().cleanup(_messageContext);
- } catch (org.apache.axis2.AxisFault axisFault) {
- callback.receiveErrorlaunchWorkflow(axisFault);
- }
- }
- });
-
- org.apache.axis2.util.CallbackReceiver _callbackReceiver = null;
- if (_operations[0].getMessageReceiver() == null && _operationClient.getOptions().isUseSeparateListener()) {
- _callbackReceiver = new org.apache.axis2.util.CallbackReceiver();
- _operations[0].setMessageReceiver(_callbackReceiver);
- }
-
- // execute the operation client
- _operationClient.execute(false);
-
- }
-
- /**
- * A utility method that copies the namepaces from the SOAPEnvelope
- */
- private java.util.Map getEnvelopeNamespaces(org.apache.axiom.soap.SOAPEnvelope env) {
- java.util.Map returnMap = new java.util.HashMap();
- java.util.Iterator namespaceIterator = env.getAllDeclaredNamespaces();
- while (namespaceIterator.hasNext()) {
- org.apache.axiom.om.OMNamespace ns = (org.apache.axiom.om.OMNamespace) namespaceIterator.next();
- returnMap.put(ns.getPrefix(), ns.getNamespaceURI());
- }
- return returnMap;
- }
-
- private javax.xml.namespace.QName[] opNameArray = null;
-
- private boolean optimizeContent(javax.xml.namespace.QName opName) {
-
- if (opNameArray == null) {
- return false;
- }
- for (int i = 0; i < opNameArray.length; i++) {
- if (opName.equals(opNameArray[i])) {
- return true;
- }
- }
- return false;
- }
-
- public static class ExtensionMapper {
-
- public static java.lang.Object getTypeObject(java.lang.String namespaceURI, java.lang.String typeName,
- javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception {
-
- if ("http://interpretor.xbaya.airavata.apache.org".equals(namespaceURI) && "NameValue".equals(typeName)) {
-
- return NameValue.Factory.parse(reader);
-
- }
-
- throw new org.apache.axis2.databinding.ADBException("Unsupported type " + namespaceURI + " " + typeName);
- }
-
- }
-
- public static class LaunchWorkflowResponse implements org.apache.axis2.databinding.ADBBean {
-
- public static final javax.xml.namespace.QName MY_QNAME = new javax.xml.namespace.QName(
- "http://interpretor.xbaya.airavata.apache.org", "launchWorkflowResponse", "ns1");
-
- private static java.lang.String generatePrefix(java.lang.String namespace) {
- if (namespace.equals("http://interpretor.xbaya.airavata.apache.org")) {
- return "ns1";
- }
- return org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();
- }
-
- /**
- * field for _return
- */
-
- protected java.lang.String local_return;
-
- /*
- * This tracker boolean wil be used to detect whether the user called the set method for this attribute. It will
- * be used to determine whether to include this field in the serialized XML
- */
- protected boolean local_returnTracker = false;
-
- /**
- * Auto generated getter method
- *
- * @return java.lang.String
- */
- public java.lang.String get_return() {
- return local_return;
- }
-
- /**
- * Auto generated setter method
- *
- * @param param
- * _return
- */
- public void set_return(java.lang.String param) {
-
- if (param != null) {
- // update the setting tracker
- local_returnTracker = true;
- } else {
- local_returnTracker = true;
-
- }
-
- this.local_return = param;
-
- }
-
- /**
- * isReaderMTOMAware
- *
- * @return true if the reader supports MTOM
- */
- public static boolean isReaderMTOMAware(javax.xml.stream.XMLStreamReader reader) {
- boolean isReaderMTOMAware = false;
-
- try {
- isReaderMTOMAware = java.lang.Boolean.TRUE.equals(reader
- .getProperty(org.apache.axiom.om.OMConstants.IS_DATA_HANDLERS_AWARE));
- } catch (java.lang.IllegalArgumentException e) {
- isReaderMTOMAware = false;
- }
- return isReaderMTOMAware;
- }
-
- /**
- *
- * @param parentQName
- * @param factory
- * @return org.apache.axiom.om.OMElement
- */
- public org.apache.axiom.om.OMElement getOMElement(final javax.xml.namespace.QName parentQName,
- final org.apache.axiom.om.OMFactory factory) throws org.apache.axis2.databinding.ADBException {
-
- org.apache.axiom.om.OMDataSource dataSource = new org.apache.axis2.databinding.ADBDataSource(this, MY_QNAME) {
-
- public void serialize(org.apache.axis2.databinding.utils.writer.MTOMAwareXMLStreamWriter xmlWriter)
- throws javax.xml.stream.XMLStreamException {
- LaunchWorkflowResponse.this.serialize(MY_QNAME, factory, xmlWriter);
- }
- };
- return new org.apache.axiom.om.impl.llom.OMSourcedElementImpl(MY_QNAME, factory, dataSource);
-
- }
-
- public void serialize(final javax.xml.namespace.QName parentQName, final org.apache.axiom.om.OMFactory factory,
- org.apache.axis2.databinding.utils.writer.MTOMAwareXMLStreamWriter xmlWriter)
- throws javax.xml.stream.XMLStreamException, org.apache.axis2.databinding.ADBException {
- serialize(parentQName, factory, xmlWriter, false);
- }
-
- public void serialize(final javax.xml.namespace.QName parentQName, final org.apache.axiom.om.OMFactory factory,
- org.apache.axis2.databinding.utils.writer.MTOMAwareXMLStreamWriter xmlWriter, boolean serializeType)
- throws javax.xml.stream.XMLStreamException, org.apache.axis2.databinding.ADBException {
-
- java.lang.String prefix = null;
- java.lang.String namespace = null;
-
- prefix = parentQName.getPrefix();
- namespace = parentQName.getNamespaceURI();
-
- if ((namespace != null) && (namespace.trim().length() > 0)) {
- java.lang.String writerPrefix = xmlWriter.getPrefix(namespace);
- if (writerPrefix != null) {
- xmlWriter.writeStartElement(namespace, parentQName.getLocalPart());
- } else {
- if (prefix == null) {
- prefix = generatePrefix(namespace);
- }
-
- xmlWriter.writeStartElement(prefix, parentQName.getLocalPart(), namespace);
- xmlWriter.writeNamespace(prefix, namespace);
- xmlWriter.setPrefix(prefix, namespace);
- }
- } else {
- xmlWriter.writeStartElement(parentQName.getLocalPart());
- }
-
- if (serializeType) {
-
- java.lang.String namespacePrefix = registerPrefix(xmlWriter,
- "http://interpretor.xbaya.airavata.apache.org");
- if ((namespacePrefix != null) && (namespacePrefix.trim().length() > 0)) {
- writeAttribute("xsi", "http://www.w3.org/2001/XMLSchema-instance", "type", namespacePrefix
- + ":launchWorkflowResponse", xmlWriter);
- } else {
- writeAttribute("xsi", "http://www.w3.org/2001/XMLSchema-instance", "type",
- "launchWorkflowResponse", xmlWriter);
- }
-
- }
- if (local_returnTracker) {
- namespace = "";
- if (!namespace.equals("")) {
- prefix = xmlWriter.getPrefix(namespace);
-
- if (prefix == null) {
- prefix = generatePrefix(namespace);
-
- xmlWriter.writeStartElement(prefix, "return", namespace);
- xmlWriter.writeNamespace(prefix, namespace);
- xmlWriter.setPrefix(prefix, namespace);
-
- } else {
- xmlWriter.writeStartElement(namespace, "return");
- }
-
- } else {
- xmlWriter.writeStartElement("return");
- }
-
- if (local_return == null) {
- // write the nil attribute
-
- writeAttribute("xsi", "http://www.w3.org/2001/XMLSchema-instance", "nil", "1", xmlWriter);
-
- } else {
-
- xmlWriter.writeCharacters(local_return);
-
- }
-
- xmlWriter.writeEndElement();
- }
- xmlWriter.writeEndElement();
-
- }
-
- /**
- * Util method to write an attribute with the ns prefix
- */
- private void writeAttribute(java.lang.String prefix, java.lang.String namespace, java.lang.String attName,
- java.lang.String attValue, javax.xml.stream.XMLStreamWriter xmlWriter)
- throws javax.xml.stream.XMLStreamException {
- if (xmlWriter.getPrefix(namespace) == null) {
- xmlWriter.writeNamespace(prefix, namespace);
- xmlWriter.setPrefix(prefix, namespace);
-
- }
-
- xmlWriter.writeAttribute(namespace, attName, attValue);
-
- }
-
- /**
- * Util method to write an attribute without the ns prefix
- */
- private void writeAttribute(java.lang.String namespace, java.lang.String attName, java.lang.String attValue,
- javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
- if (namespace.equals("")) {
- xmlWriter.writeAttribute(attName, attValue);
- } else {
- registerPrefix(xmlWriter, namespace);
- xmlWriter.writeAttribute(namespace, attName, attValue);
- }
- }
-
- /**
- * Util method to write an attribute without the ns prefix
- */
- private void writeQNameAttribute(java.lang.String namespace, java.lang.String attName,
- javax.xml.namespace.QName qname, javax.xml.stream.XMLStreamWriter xmlWriter)
- throws javax.xml.stream.XMLStreamException {
-
- java.lang.String attributeNamespace = qname.getNamespaceURI();
- java.lang.String attributePrefix = xmlWriter.getPrefix(attributeNamespace);
- if (attributePrefix == null) {
- attributePrefix = registerPrefix(xmlWriter, attributeNamespace);
- }
- java.lang.String attributeValue;
- if (attributePrefix.trim().length() > 0) {
- attributeValue = attributePrefix + ":" + qname.getLocalPart();
- } else {
- attributeValue = qname.getLocalPart();
- }
-
- if (namespace.equals("")) {
- xmlWriter.writeAttribute(attName, attributeValue);
- } else {
- registerPrefix(xmlWriter, namespace);
- xmlWriter.writeAttribute(namespace, attName, attributeValue);
- }
- }
-
- /**
- * method to handle Qnames
- */
-
- private void writeQName(javax.xml.namespace.QName qname, javax.xml.stream.XMLStreamWriter xmlWriter)
- throws javax.xml.stream.XMLStreamException {
- java.lang.String namespaceURI = qname.getNamespaceURI();
- if (namespaceURI != null) {
- java.lang.String prefix = xmlWriter.getPrefix(namespaceURI);
- if (prefix == null) {
- prefix = generatePrefix(namespaceURI);
- xmlWriter.writeNamespace(prefix, namespaceURI);
- xmlWriter.setPrefix(prefix, namespaceURI);
- }
-
- if (prefix.trim().length() > 0) {
- xmlWriter.writeCharacters(prefix + ":"
- + org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname));
- } else {
- // i.e this is the default namespace
- xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname));
- }
-
- } else {
- xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname));
- }
- }
-
- private void writeQNames(javax.xml.namespace.QName[] qnames, javax.xml.stream.XMLStreamWriter xmlWriter)
- throws javax.xml.stream.XMLStreamException {
-
- if (qnames != null) {
- // we have to store this data until last moment since it is not
- // possible to write any
- // namespace data after writing the charactor data
- java.lang.StringBuffer stringToWrite = new java.lang.StringBuffer();
- java.lang.String namespaceURI = null;
- java.lang.String prefix = null;
-
- for (int i = 0; i < qnames.length; i++) {
- if (i > 0) {
- stringToWrite.append(" ");
- }
- namespaceURI = qnames[i].getNamespaceURI();
- if (namespaceURI != null) {
- prefix = xmlWriter.getPrefix(namespaceURI);
- if ((prefix == null) || (prefix.length() == 0)) {
- prefix = generatePrefix(namespaceURI);
- xmlWriter.writeNamespace(prefix, namespaceURI);
- xmlWriter.setPrefix(prefix, namespaceURI);
- }
-
- if (prefix.trim().length() > 0) {
- stringToWrite
- .append(prefix)
- .append(":")
- .append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qnames[i]));
- } else {
- stringToWrite.append(org.apache.axis2.databinding.utils.ConverterUtil
- .convertToString(qnames[i]));
- }
- } else {
- stringToWrite.append(org.apache.axis2.databinding.utils.ConverterUtil
- .convertToString(qnames[i]));
- }
- }
- xmlWriter.writeCharacters(stringToWrite.toString());
- }
-
- }
-
- /**
- * Register a namespace prefix
- */
- private java.lang.String registerPrefix(javax.xml.stream.XMLStreamWriter xmlWriter, java.lang.String namespace)
- throws javax.xml.stream.XMLStreamException {
- java.lang.String prefix = xmlWriter.getPrefix(namespace);
-
- if (prefix == null) {
- prefix = generatePrefix(namespace);
-
- while (xmlWriter.getNamespaceContext().getNamespaceURI(prefix) != null) {
- prefix = org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();
- }
-
- xmlWriter.writeNamespace(prefix, namespace);
- xmlWriter.setPrefix(prefix, namespace);
- }
-
- return prefix;
- }
-
- /**
- * databinding method to get an XML representation of this object
- *
- */
- public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)
- throws org.apache.axis2.databinding.ADBException {
-
- java.util.ArrayList elementList = new java.util.ArrayList();
- java.util.ArrayList attribList = new java.util.ArrayList();
-
- if (local_returnTracker) {
- elementList.add(new javax.xml.namespace.QName("", "return"));
-
- elementList.add(local_return == null ? null : org.apache.axis2.databinding.utils.ConverterUtil
- .convertToString(local_return));
- }
-
- return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(),
- attribList.toArray());
-
- }
-
- /**
- * Factory class that keeps the parse method
- */
- public static class Factory {
-
- /**
- * static method to create the object Precondition: If this object is an element, the current or next start
- * element starts this object and any intervening reader events are ignorable If this object is not an
- * element, it is a complex type and the reader is at the event just after the outer start element
- * Postcondition: If this object is an element, the reader is positioned at its end element If this object
- * is a complex type, the reader is positioned at the end element of its outer element
- */
- public static LaunchWorkflowResponse parse(javax.xml.stream.XMLStreamReader reader)
- throws java.lang.Exception {
- LaunchWorkflowResponse object = new LaunchWorkflowResponse();
-
- java.lang.String nillableValue = null;
- try {
-
- while (!reader.isStartElement() && !reader.isEndElement())
- reader.next();
-
- if (reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance", "type") != null) {
- java.lang.String fullTypeName = reader.getAttributeValue(
- "http://www.w3.org/2001/XMLSchema-instance", "type");
- if (fullTypeName != null) {
- java.lang.String nsPrefix = null;
- if (fullTypeName.indexOf(":") > -1) {
- nsPrefix = fullTypeName.substring(0, fullTypeName.indexOf(":"));
- }
- nsPrefix = nsPrefix == null ? "" : nsPrefix;
-
- java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(":") + 1);
-
- if (!"launchWorkflowResponse".equals(type)) {
- // find namespace for the prefix
- java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);
- return (LaunchWorkflowResponse) ExtensionMapper.getTypeObject(nsUri, type, reader);
- }
-
- }
-
- }
-
- new java.util.Vector();
-
- reader.next();
-
- while (!reader.isStartElement() && !reader.isEndElement())
- reader.next();
-
- if (reader.isStartElement() && new javax.xml.namespace.QName("", "return").equals(reader.getName())) {
-
- nillableValue = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance", "nil");
- if (!"true".equals(nillableValue) && !"1".equals(nillableValue)) {
-
- java.lang.String content = reader.getElementText();
-
- object.set_return(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content));
-
- } else {
-
- reader.getElementText(); // throw away text nodes if
- // any.
- }
-
- reader.next();
-
- } // End of if for expected property start element
-
- else {
-
- }
-
- while (!reader.isStartElement() && !reader.isEndElement())
- reader.next();
-
- if (reader.isStartElement())
- // A start element we are not expecting indicates a
- // trailing invalid property
- throw new org.apache.axis2.databinding.ADBException("Unexpected subelement "
- + reader.getLocalName());
-
- } catch (javax.xml.stream.XMLStreamException e) {
- throw new java.lang.Exception(e);
- }
-
- return object;
- }
-
- }// end of factory class
-
- }
-
- public static class LaunchWorkflow implements org.apache.axis2.databinding.ADBBean {
-
- public static final javax.xml.namespace.QName MY_QNAME = new javax.xml.namespace.QName(
- "http://interpretor.xbaya.airavata.apache.org", "launchWorkflow", "ns1");
-
- private static java.lang.String generatePrefix(java.lang.String namespace) {
- if (namespace.equals("http://interpretor.xbaya.airavata.apache.org")) {
- return "ns1";
- }
- return org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();
- }
-
- /**
- * field for WorkflowAsString
- */
-
- protected java.lang.String localWorkflowAsString;
-
- /*
- * This tracker boolean wil be used to detect whether the user called the set method for this attribute. It will
- * be used to determine whether to include this field in the serialized XML
- */
- protected boolean localWorkflowAsStringTracker = false;
-
- /**
- * Auto generated getter method
- *
- * @return java.lang.String
- */
- public java.lang.String getWorkflowAsString() {
- return localWorkflowAsString;
- }
-
- /**
- * Auto generated setter method
- *
- * @param param
- * WorkflowAsString
- */
- public void setWorkflowAsString(java.lang.String param) {
-
- if (param != null) {
- // update the setting tracker
- localWorkflowAsStringTracker = true;
- } else {
- localWorkflowAsStringTracker = true;
-
- }
-
- this.localWorkflowAsString = param;
-
- }
-
- /**
- * field for Topic
- */
-
- protected java.lang.String localTopic;
-
- /*
- * This tracker boolean wil be used to detect whether the user called the set method for this attribute. It will
- * be used to determine whether to include this field in the serialized XML
- */
- protected boolean localTopicTracker = false;
-
- /**
- * Auto generated getter method
- *
- * @return java.lang.String
- */
- public java.lang.String getTopic() {
- return localTopic;
- }
-
- /**
- * Auto generated setter method
- *
- * @param param
- * Topic
- */
- public void setTopic(java.lang.String param) {
-
- if (param != null) {
- // update the setting tracker
- localTopicTracker = true;
- } else {
- localTopicTracker = true;
-
- }
-
- this.localTopic = param;
-
- }
-
- /**
- * field for Password
- */
-
- protected java.lang.String localPassword;
-
- /*
- * This tracker boolean wil be used to detect whether the user called the set method for this attribute. It will
- * be used to determine whether to include this field in the serialized XML
- */
- protected boolean localPasswordTracker = false;
-
- /**
- * Auto generated getter method
- *
- * @return java.lang.String
- */
- public java.lang.String getPassword() {
- return localPassword;
- }
-
- /**
- * Auto generated setter method
- *
- * @param param
- * Password
- */
- public void setPassword(java.lang.String param) {
-
- if (param != null) {
- // update the setting tracker
- localPasswordTracker = true;
- } else {
- localPasswordTracker = true;
-
- }
-
- this.localPassword = param;
-
- }
-
- /**
- * field for Username
- */
-
- protected java.lang.String localUsername;
-
- /*
- * This tracker boolean wil be used to detect whether the user called the set method for this attribute. It will
- * be used to determine whether to include this field in the serialized XML
- */
- protected boolean localUsernameTracker = false;
-
- /**
- * Auto generated getter method
- *
- * @return java.lang.String
- */
- public java.lang.String getUsername() {
- return localUsername;
- }
-
- /**
- * Auto generated setter method
- *
- * @param param
- * Username
- */
- public void setUsername(java.lang.String param) {
-
- if (param != null) {
- // update the setting tracker
- localUsernameTracker = true;
- } else {
- localUsernameTracker = true;
-
- }
-
- this.localUsername = param;
-
- }
-
- /**
- * field for Inputs This was an Array!
- */
-
- protected NameValue[] localInputs;
-
- /*
- * This tracker boolean wil be used to detect whether the user called the set method for this attribute. It will
- * be used to determine whether to include this field in the serialized XML
- */
- protected boolean localInputsTracker = false;
-
- /**
- * Auto generated getter method
- *
- * @return NameValue[]
- */
- public NameValue[] getInputs() {
- return localInputs;
- }
-
- /**
- * validate the array for Inputs
- */
- protected void validateInputs(NameValue[] param) {
-
- }
-
- /**
- * Auto generated setter method
- *
- * @param param
- * Inputs
- */
- public void setInputs(NameValue[] param) {
-
- validateInputs(param);
-
- if (param != null) {
- // update the setting tracker
- localInputsTracker = true;
- } else {
- localInputsTracker = true;
-
- }
-
- this.localInputs = param;
- }
-
- /**
- * Auto generated add method for the array for convenience
- *
- * @param param
- * NameValue
- */
- public void addInputs(NameValue param) {
- if (localInputs == null) {
- localInputs = new NameValue[] {};
- }
-
- // update the setting tracker
- localInputsTracker = true;
-
- java.util.List list = org.apache.axis2.databinding.utils.ConverterUtil.toList(localInputs);
- list.add(param);
- this.localInputs = (NameValue[]) list.toArray(new NameValue[list.size()]);
-
- }
-
- /**
- * field for Configurations This was an Array!
- */
-
- protected NameValue[] localConfigurations;
-
- /*
- * This tracker boolean wil be used to detect whether the user called the set method for this attribute. It will
- * be used to determine whether to include this field in the serialized XML
- */
- protected boolean localConfigurationsTracker = false;
-
- /**
- * Auto generated getter method
- *
- * @return NameValue[]
- */
- public NameValue[] getConfigurations() {
- return localConfigurations;
- }
-
- /**
- * validate the array for Configurations
- */
- protected void validateConfigurations(NameValue[] param) {
-
- }
-
- /**
- * Auto generated setter method
- *
- * @param param
- * Configurations
- */
- public void setConfigurations(NameValue[] param) {
-
- validateConfigurations(param);
-
- if (param != null) {
- // update the setting tracker
- localConfigurationsTracker = true;
- } else {
- localConfigurationsTracker = true;
-
- }
-
- this.localConfigurations = param;
- }
-
- /**
- * Auto generated add method for the array for convenience
- *
- * @param param
- * NameValue
- */
- public void addConfigurations(NameValue param) {
- if (localConfigurations == null) {
- localConfigurations = new NameValue[] {};
- }
-
- // update the setting tracker
- localConfigurationsTracker = true;
-
- java.util.List list = org.apache.axis2.databinding.utils.ConverterUtil.toList(localConfigurations);
- list.add(param);
- this.localConfigurations = (NameValue[]) list.toArray(new NameValue[list.size()]);
-
- }
-
- /**
- * isReaderMTOMAware
- *
- * @return true if the reader supports MTOM
- */
- public static boolean isReaderMTOMAware(javax.xml.stream.XMLStreamReader reader) {
- boolean isReaderMTOMAware = false;
-
- try {
- isReaderMTOMAware = java.lang.Boolean.TRUE.equals(reader
- .getProperty(org.apache.axiom.om.OMConstants.IS_DATA_HANDLERS_AWARE));
- } catch (java.lang.IllegalArgumentException e) {
- isReaderMTOMAware = false;
- }
- return isReaderMTOMAware;
- }
-
- /**
- *
- * @param parentQName
- * @param factory
- * @return org.apache.axiom.om.OMElement
- */
- public org.apache.axiom.om.OMElement getOMElement(final javax.xml.namespace.QName parentQName,
- final org.apache.axiom.om.OMFactory factory) throws org.apache.axis2.databinding.ADBException {
-
- org.apache.axiom.om.OMDataSource dataSource = new org.apache.axis2.databinding.ADBDataSource(this, MY_QNAME) {
-
- public void serialize(org.apache.axis2.databinding.utils.writer.MTOMAwareXMLStreamWriter xmlWriter)
- throws javax.xml.stream.XMLStreamException {
- LaunchWorkflow.this.serialize(MY_QNAME, factory, xmlWriter);
- }
- };
- return new org.apache.axiom.om.impl.llom.OMSourcedElementImpl(MY_QNAME, factory, dataSource);
-
- }
-
- public void serialize(final javax.xml.namespace.QName parentQName, final org.apache.axiom.om.OMFactory factory,
- org.apache.axis2.databinding.utils.writer.MTOMAwareXMLStreamWriter xmlWriter)
- throws javax.xml.stream.XMLStreamException, org.apache.axis2.databinding.ADBException {
- serialize(parentQName, factory, xmlWriter, false);
- }
-
- public void serialize(final javax.xml.namespace.QName parentQName, final org.apache.axiom.om.OMFactory factory,
- org.apache.axis2.databinding.utils.writer.MTOMAwareXMLStreamWriter xmlWriter, boolean serializeType)
- throws javax.xml.stream.XMLStreamException, org.apache.axis2.databinding.ADBException {
-
- java.lang.String prefix = null;
- java.lang.String namespace = null;
-
- prefix = parentQName.getPrefix();
- namespace = parentQName.getNamespaceURI();
-
- if ((namespace != null) && (namespace.trim().length() > 0)) {
- java.lang.String writerPrefix = xmlWriter.getPrefix(namespace);
- if (writerPrefix != null) {
- xmlWriter.writeStartElement(namespace, parentQName.getLocalPart());
- } else {
- if (prefix == null) {
- prefix = generatePrefix(namespace);
- }
-
- xmlWriter.writeStartElement(prefix, parentQName.getLocalPart(), namespace);
- xmlWriter.writeNamespace(prefix, namespace);
- xmlWriter.setPrefix(prefix, namespace);
- }
- } else {
- xmlWriter.writeStartElement(parentQName.getLocalPart());
- }
-
- if (serializeType) {
-
- java.lang.String namespacePrefix = registerPrefix(xmlWriter,
- "http://interpretor.xbaya.airavata.apache.org");
- if ((namespacePrefix != null) && (namespacePrefix.trim().length() > 0)) {
- writeAttribute("xsi", "http://www.w3.org/2001/XMLSchema-instance", "type", namespacePrefix
- + ":launchWorkflow", xmlWriter);
- } else {
- writeAttribute("xsi", "http://www.w3.org/2001/XMLSchema-instance", "type", "launchWorkflow",
- xmlWriter);
- }
-
- }
- if (localWorkflowAsStringTracker) {
- namespace = "";
- if (!namespace.equals("")) {
- prefix = xmlWriter.getPrefix(namespace);
-
- if (prefix == null) {
- prefix = generatePrefix(namespace);
-
- xmlWriter.writeStartElement(prefix, "workflowAsString", namespace);
- xmlWriter.writeNamespace(prefix, namespace);
- xmlWriter.setPrefix(prefix, namespace);
-
- } else {
- xmlWriter.writeStartElement(namespace, "workflowAsString");
- }
-
- } else {
- xmlWriter.writeStartElement("workflowAsString");
- }
-
- if (localWorkflowAsString == null) {
- // write the nil attribute
-
- writeAttribute("xsi", "http://www.w3.org/2001/XMLSchema-instance", "nil", "1", xmlWriter);
-
- } else {
-
- xmlWriter.writeCharacters(localWorkflowAsString);
-
- }
-
- xmlWriter.writeEndElement();
- }
- if (localTopicTracker) {
- namespace = "";
- if (!namespace.equals("")) {
- prefix = xmlWriter.getPrefix(namespace);
-
- if (prefix == null) {
- prefix = generatePrefix(namespace);
-
- xmlWriter.writeStartElement(prefix, "topic", namespace);
- xmlWriter.writeNamespace(prefix, namespace);
- xmlWriter.setPrefix(prefix, namespace);
-
- } else {
- xmlWriter.writeStartElement(namespace, "topic");
- }
-
- } else {
- xmlWriter.writeStartElement("topic");
- }
-
- if (localTopic == null) {
- // write the nil attribute
-
- writeAttribute("xsi", "http://www.w3.org/2001/XMLSchema-instance", "nil", "1", xmlWriter);
-
- } else {
-
- xmlWriter.writeCharacters(localTopic);
-
- }
-
- xmlWriter.writeEndElement();
- }
- if (localPasswordTracker) {
- namespace = "";
- if (!namespace.equals("")) {
- prefix = xmlWriter.getPrefix(namespace);
-
- if (prefix == null) {
- prefix = generatePrefix(namespace);
-
- xmlWriter.writeStartElement(prefix, "password", namespace);
- xmlWriter.writeNamespace(prefix, namespace);
- xmlWriter.setPrefix(prefix, namespace);
-
- } else {
- xmlWriter.writeStartElement(namespace, "password");
- }
-
- } else {
- xmlWriter.writeStartElement("password");
- }
-
- if (localPassword == null) {
- // write the nil attribute
-
- writeAttribute("xsi", "http://www.w3.org/2001/XMLSchema-instance", "nil", "1", xmlWriter);
-
- } else {
-
- xmlWriter.writeCharacters(localPassword);
-
- }
-
- xmlWriter.writeEndElement();
- }
- if (localUsernameTracker) {
- namespace = "";
- if (!namespace.equals("")) {
- prefix = xmlWriter.getPrefix(namespace);
-
- if (prefix == null) {
- prefix = generatePrefix(namespace);
-
- xmlWriter.writeStartElement(prefix, "username", namespace);
- xmlWriter.writeNamespace(prefix, namespace);
- xmlWriter.setPrefix(prefix, namespace);
-
- } else {
- xmlWriter.writeStartElement(namespace, "username");
- }
-
- } else {
- xmlWriter.writeStartElement("username");
- }
-
- if (localUsername == null) {
- // write the nil attribute
-
- writeAttribute("xsi", "http://www.w3.org/2001/XMLSchema-instance", "nil", "1", xmlWriter);
-
- } else {
-
- xmlWriter.writeCharacters(localUsername);
-
- }
-
- xmlWriter.writeEndElement();
- }
- if (localInputsTracker) {
- if (localInputs != null) {
- for (int i = 0; i < localInputs.length; i++) {
- if (localInputs[i] != null) {
- localInputs[i].serialize(new javax.xml.namespace.QName("", "inputs"), factory, xmlWriter);
- } else {
-
- // write null attribute
- java.lang.String namespace2 = "";
- if (!namespace2.equals("")) {
- java.lang.String prefix2 = xmlWriter.getPrefix(namespace2);
-
- if (prefix2 == null) {
- prefix2 = generatePrefix(namespace2);
-
- xmlWriter.writeStartElement(prefix2, "inputs", namespace2);
- xmlWriter.writeNamespace(prefix2, namespace2);
- xmlWriter.setPrefix(prefix2, namespace2);
-
- } else {
- xmlWriter.writeStartElement(namespace2, "inputs");
- }
-
- } else {
- xmlWriter.writeStartElement("inputs");
- }
-
- // write the nil attribute
- writeAttribute("xsi", "http://www.w3.org/2001/XMLSchema-instance", "nil", "1", xmlWriter);
- xmlWriter.writeEndElement();
-
- }
-
- }
- } else {
-
- // write null attribute
- java.lang.String namespace2 = "";
- if (!namespace2.equals("")) {
- java.lang.String prefix2 = xmlWriter.getPrefix(namespace2);
-
- if (prefix2 == null) {
- prefix2 = generatePrefix(namespace2);
-
- xmlWriter.writeStartElement(prefix2, "inputs", namespace2);
- xmlWriter.writeNamespace(prefix2, namespace2);
- xmlWriter.setPrefix(prefix2, namespace2);
-
- } else {
- xmlWriter.writeStartElement(namespace2, "inputs");
- }
-
- } else {
- xmlWriter.writeStartElement("inputs");
- }
-
- // write the nil attribute
- writeAttribute("xsi", "http://www.w3.org/2001/XMLSchema-instance", "nil", "1", xmlWriter);
- xmlWriter.writeEndElement();
-
- }
- }
- if (localConfigurationsTracker) {
- if (localConfigurations != null) {
- for (int i = 0; i < localConfigurations.length; i++) {
- if (localConfigurations[i] != null) {
- localConfigurations[i].serialize(new javax.xml.namespace.QName("", "configurations"),
- factory, xmlWriter);
- } else {
-
- // write null attribute
- java.lang.String namespace2 = "";
- if (!namespace2.equals("")) {
- java.lang.String prefix2 = xmlWriter.getPrefix(namespace2);
-
- if (prefix2 == null) {
- prefix2 = generatePrefix(namespace2);
-
- xmlWriter.writeStartElement(prefix2, "configurations", namespace2);
- xmlWriter.writeNamespace(prefix2, namespace2);
- xmlWriter.setPrefix(prefix2, namespace2);
-
- } else {
- xmlWriter.writeStartElement(namespace2, "configurations");
- }
-
- } else {
- xmlWriter.writeStartElement("configurations");
- }
-
- // write the nil attribute
- writeAttribute("xsi", "http://www.w3.org/2001/XMLSchema-instance", "nil", "1", xmlWriter);
- xmlWriter.writeEndElement();
-
- }
-
- }
- } else {
-
- // write null attribute
- java.lang.String namespace2 = "";
- if (!namespace2.equals("")) {
- java.lang.String prefix2 = xmlWriter.getPrefix(namespace2);
-
- if (prefix2 == null) {
- prefix2 = generatePrefix(namespace2);
-
- xmlWriter.writeStartElement(prefix2, "configurations", namespace2);
- xmlWriter.writeNamespace(prefix2, namespace2);
- xmlWriter.setPrefix(prefix2, namespace2);
-
- } else {
- xmlWriter.writeStartElement(namespace2, "configurations");
- }
-
- } else {
- xmlWriter.writeStartElement("configurations");
- }
-
- // write the nil attribute
- writeAttribute("xsi", "http://www.w3.org/2001/XMLSchema-instance", "nil", "1", xmlWriter);
- xmlWriter.writeEndElement();
-
- }
- }
- xmlWriter.writeEndElement();
-
- }
-
- /**
- * Util method to write an attribute with the ns prefix
- */
- private void writeAttribute(java.lang.String prefix, java.lang.String namespace, java.lang.String attName,
- java.lang.String attValue, javax.xml.stream.XMLStreamWriter xmlWriter)
- throws javax.xml.stream.XMLStreamException {
- if (xmlWriter.getPrefix(namespace) == null) {
- xmlWriter.writeNamespace(prefix, namespace);
- xmlWriter.setPrefix(prefix, namespace);
-
- }
-
- xmlWriter.writeAttribute(namespace, attName, attValue);
-
- }
-
- /**
- * Util method to write an attribute without the ns prefix
- */
- private void writeAttribute(java.lang.String namespace, java.lang.String attName, java.lang.String attValue,
- javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
- if (namespace.equals("")) {
- xmlWriter.writeAttribute(attName, attValue);
- } else {
- registerPrefix(xmlWriter, namespace);
- xmlWriter.writeAttribute(namespace, attName, attValue);
- }
- }
-
- /**
- * Util method to write an attribute without the ns prefix
- */
- private void writeQNameAttribute(java.lang.String namespace, java.lang.String attName,
- javax.xml.namespace.QName qname, javax.xml.stream.XMLStreamWriter xmlWriter)
- throws javax.xml.stream.XMLStreamException {
-
- java.lang.String attributeNamespace = qname.getNamespaceURI();
- java.lang.String attributePrefix = xmlWriter.getPrefix(attributeNamespace);
- if (attributePrefix == null) {
- attributePrefix = registerPrefix(xmlWriter, attributeNamespace);
- }
- java.lang.String attributeValue;
- if (attributePrefix.trim().length() > 0) {
- attributeValue = attributePrefix + ":" + qname.getLocalPart();
- } else {
- attributeValue = qname.getLocalPart();
- }
-
- if (namespace.equals("")) {
- xmlWriter.writeAttribute(attName, attributeValue);
- } else {
- registerPrefix(xmlWriter, namespace);
- xmlWriter.writeAttribute(namespace, attName, attributeValue);
- }
- }
-
- /**
- * method to handle Qnames
- */
-
- private void writeQName(javax.xml.namespace.QName qname, javax.xml.stream.XMLStreamWriter xmlWriter)
- throws javax.xml.stream.XMLStreamException {
- java.lang.String namespaceURI = qname.getNamespaceURI();
- if (namespaceURI != null) {
- java.lang.String prefix = xmlWriter.getPrefix(namespaceURI);
- if (prefix == null) {
- prefix = generatePrefix(namespaceURI);
- xmlWriter.writeNamespace(prefix, namespaceURI);
- xmlWriter.setPrefix(prefix, namespaceURI);
- }
-
- if (prefix.trim().length() > 0) {
- xmlWriter.writeCharacters(prefix + ":"
- + org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname));
- } else {
- // i.e this is the default namespace
- xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname));
- }
-
- } else {
- xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname));
- }
- }
-
- private void writeQNames(javax.xml.namespace.QName[] qnames, javax.xml.stream.XMLStreamWriter xmlWriter)
- throws javax.xml.stream.XMLStreamException {
-
- if (qnames != null) {
- // we have to store this data until last moment since it is not
- // possible to write any
- // namespace data after writing the charactor data
- java.lang.StringBuffer stringToWrite = new java.lang.StringBuffer();
- java.lang.String namespaceURI = null;
- java.lang.String prefix = null;
-
- for (int i = 0; i < qnames.length; i++) {
- if (i > 0) {
- stringToWrite.append(" ");
- }
- namespaceURI = qnames[i].getNamespaceURI();
- if (namespaceURI != null) {
- prefix = xmlWriter.getPrefix(namespaceURI);
- if ((prefix == null) || (prefix.length() == 0)) {
- prefix = generatePrefix(namespaceURI);
- xmlWriter.writeNamespace(prefix, namespaceURI);
- xmlWriter.setPrefix(prefix, namespaceURI);
- }
-
- if (prefix.trim().length() > 0) {
- stringToWrite
- .append(prefix)
- .append(":")
- .append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qnames[i]));
- } else {
- stringToWrite.append(org.apache.axis2.databinding.utils.ConverterUtil
- .convertToString(qnames[i]));
- }
- } else {
- stringToWrite.append(org.apache.axis2.databinding.utils.ConverterUtil
- .convertToString(qnames[i]));
- }
- }
- xmlWriter.writeCharacters(stringToWrite.toString());
- }
-
- }
-
- /**
- * Register a namespace prefix
- */
- private java.lang.String registerPrefix(javax.xml.stream.XMLStreamWriter xmlWriter, java.lang.String namespace)
- throws javax.xml.stream.XMLStreamException {
- java.lang.String prefix = xmlWriter.getPrefix(namespace);
-
- if (prefix == null) {
- prefix = generatePrefix(namespace);
-
- while (xmlWriter.getNamespaceContext().getNamespaceURI(prefix) != null) {
- prefix = org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();
- }
-
- xmlWriter.writeNamespace(prefix, namespace);
- xmlWriter.setPrefix(prefix, namespace);
- }
-
- return prefix;
- }
-
- /**
- * databinding method to get an XML representation of this object
- *
- */
- public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)
- throws org.apache.axis2.databinding.ADBException {
-
- java.util.ArrayList elementList = new java.util.ArrayList();
- java.util.ArrayList attribList = new java.util.ArrayList();
-
- if (localWorkflowAsStringTracker) {
- elementList.add(new javax.xml.namespace.QName("", "workflowAsString"));
-
- elementList.add(localWorkflowAsString == null ? null : org.apache.axis2.databinding.utils.ConverterUtil
- .convertToString(localWorkflowAsString));
- }
- if (localTopicTracker) {
- elementList.add(new javax.xml.namespace.QName("", "topic"));
-
- elementList.add(localTopic == null ? null : org.apache.axis2.databinding.utils.ConverterUtil
- .convertToString(localTopic));
- }
- if (localPasswordTracker) {
- elementList.add(new javax.xml.namespace.QName("", "password"));
-
- elementList.add(localPassword == null ? null : org.apache.axis2.databinding.utils.ConverterUtil
- .convertToString(localPassword));
- }
- if (localUsernameTracker) {
- elementList.add(new javax.xml.namespace.QName("", "username"));
-
- elementList.add(localUsername == null ? null : org.apache.axis2.databinding.utils.ConverterUtil
- .convertToString(localUsername));
- }
- if (localInputsTracker) {
- if (localInputs != null) {
- for (int i = 0; i < localInputs.length; i++) {
-
- if (localInputs[i] != null) {
- elementList.add(new javax.xml.namespace.QName("", "inputs"));
- elementList.add(localInputs[i]);
- } else {
-
- elementList.add(new javax.xml.namespace.QName("", "inputs"));
- elementList.add(null);
-
- }
-
- }
- } else {
-
- elementList.add(new javax.xml.namespace.QName("", "inputs"));
- elementList.add(localInputs);
-
- }
-
- }
- if (localConfigurationsTracker) {
- if (localConfigurations != null) {
- for (int i = 0; i < localConfigurations.length; i++) {
-
- if (localConfigurations[i] != null) {
- elementList.add(new javax.xml.namespace.QName("", "configurations"));
- elementList.add(localConfigurations[i]);
- } else {
-
- elementList.add(new javax.xml.namespace.QName("", "configurations"));
- elementList.add(null);
-
- }
-
- }
- } else {
-
- elementList.add(new javax.xml.namespace.QName("", "configurations"));
- elementList.add(localConfigurations);
-
- }
-
- }
-
- return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(),
- attribList.toArray());
-
- }
-
- /**
- * Factory class that keeps the parse method
- */
- public static class Factory {
-
- /**
- * static method to create the object Precondition: If this object is an element, the current or next start
- * element starts this object and any intervening reader events are ignorable If this object is not an
- * element, it is a complex type and the reader is at the event just after the outer start element
- * Postcondition: If this object is an element, the reader is positioned at its end element If this object
- * is a complex type, the reader is positioned at the end element of its outer element
- */
- public static LaunchWorkflow parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception {
- LaunchWorkflow object = new LaunchWorkflow();
-
- java.lang.String nillableValue = null;
- try {
-
- while (!reader.isStartElement() && !reader.isEndElement())
- reader.next();
-
- if (reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance", "type") != null) {
- java.lang.String fullTypeName = reader.getAttributeValue(
- "http://www.w3.org/2001/XMLSchema-instance", "type");
- if (fullTypeName != null) {
- java.lang.String nsPrefix = null;
- if (fullTypeName.indexOf(":") > -1) {
- nsPrefix = fullTypeName.substring(0, fullTypeName.indexOf(":"));
- }
- nsPrefix = nsPrefix == null ? "" : nsPrefix;
-
- java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(":") + 1);
-
- if (!"launchWorkflow".equals(type)) {
- // find namespace for the prefix
- java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);
- return (LaunchWorkflow) ExtensionMapper.getTypeObject(nsUri, type, reader);
- }
-
- }
-
- }
-
- new java.util.Vector();
-
- reader.next();
-
- java.util.ArrayList list5 = new java.util.ArrayList();
-
- java.util.ArrayList list6 = new java.util.ArrayList();
-
- while (!reader.isStartElement() && !reader.isEndElement())
- reader.next();
-
- if (reader.isStartElement()
- && new javax.xml.namespace.QName("", "workflowAsString").equals(reader.getName())) {
-
- nillableValue = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance", "nil");
- if (!"true".equals(nillableValue) && !"1".equals(nillableValue)) {
-
- java.lang.String content = reader.getElementText();
-
- object.setWorkflowAsString(org.apache.axis2.databinding.utils.ConverterUtil
- .convertToString(content));
-
- } else {
-
- reader.getElementText(); // throw away text nodes if
- // any.
- }
-
- reader.next();
-
- } // End of if for expected property start element
-
- else {
-
- }
-
- while (!reader.isStartElement() && !reader.isEndElement())
- reader.next();
-
- if (reader.isStartElement() && new javax.xml.namespace.QName("", "topic").equals(reader.getName())) {
-
- nillableValue = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance", "nil");
- if (!"true".equals(nillableValue) && !"1".equals(nillableValue)) {
-
- java.lang.String content = reader.getElementText();
-
- object.setTopic(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content));
-
- } else {
-
- reader.getElementText(); // throw away text nodes if
- // any.
- }
-
- reader.next();
-
- } // End of if for expected property start element
-
- else {
-
- }
-
- while (!reader.isStartElement() && !reader.isEndElement())
- reader.next();
-
- if (reader.isStartElement()
- && new javax.xml.namespace.QName("", "password").equals(reader.getName())) {
-
- nillableValue = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance", "nil");
- if (!"true".equals(nillableValue) && !"1".equals(nillableValue)) {
-
- java.lang.String content = reader.getElementText();
-
- object.setPassword(org.apache.axis2.databinding.utils.ConverterUtil
- .convertToString(content));
-
- } else {
-
- reader.getElementText(); // throw away text nodes if
- // any.
- }
-
- reader.next();
-
- } // End of if for expected property start element
-
- else {
-
- }
-
- while (!reader.isStartElement() && !reader.isEndElement())
- reader.next();
-
- if (reader.isStartElement()
- && new javax.xml.namespace.QName("", "username").equals(reader.getName())) {
-
- nillableValue = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance", "nil");
- if (!"true".equals(nillableValue) && !"1".equals(nillableValue)) {
-
- java.lang.String content = reader.getElementText();
-
- object.setUsername(org.apache.axis2.databinding.utils.ConverterUtil
- .convertToString(content));
-
- } else {
-
- reader.getElementText(); // throw away text nodes if
- // any.
- }
-
- reader.next();
-
- } // End of if for expected property start element
-
- else {
-
- }
-
- while (!reader.isStartElement() && !reader.isEndElement())
- reader.next();
-
- if (reader.isStartElement() && new javax.xml.namespace.QName("", "inputs").equals(reader.getName())) {
-
- // Process the array and step past its final element's
- // end.
-
- nillableValue = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance", "nil");
- if ("true".equals(nillableValue) || "1".equals(nillableValue)) {
- list5.add(null);
- reader.next();
- } else {
- list5.add(NameValue.Factory.parse(reader));
- }
- // loop until we find a start element that is not part
- // of this array
- boolean loopDone5 = false;
- while (!loopDone5) {
- // We should be at the end element, but make sure
- while (!reader.isEndElement())
- reader.next();
- // Step out of this element
- reader.next();
- // Step to next element event.
- while (!reader.isStartElement() && !reader.isEndElement())
- reader.next();
- if (reader.isEndElement()) {
- // two continuous end elements means we are
- // exiting the xml structure
- loopDone5 = true;
- } else {
- if (new javax.xml.namespace.QName("", "inputs").equals(reader.getName())) {
-
- nillableValue = reader.getAttributeValue(
- "http://www.w3.org/2001/XMLSchema-instance", "nil");
- if ("true".equals(nillableValue) || "1".equals(nillableValue)) {
- list5.add(null);
- reader.next();
- } else {
- list5.add(NameValue.Factory.parse(reader));
- }
- } else {
- loopDone5 = true;
- }
- }
- }
- // call the converter utility to convert and set the
- // array
-
- object.setInputs((NameValue[]) org.apache.axis2.databinding.utils.ConverterUtil.convertToArray(
- NameValue.class, list5));
-
- } // End of if for expected property start element
-
- else {
-
- }
-
- while (!reader.isStartElement() && !reader.isEndElement())
- reader.next();
-
- if (reader.isStartElement()
- && new javax.xml.namespace.QName("", "configurations").equals(reader.getName())) {
-
- // Process the array and step past its final element's
- // end.
-
- nillableValue = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance", "nil");
- if ("true".equals(nillableValue) || "1".equals(nillableValue)) {
- list6.add(null);
- reader.next();
- } else {
- list6.add(NameValue.Factory.parse(reader));
- }
- // loop until we find a start element that is not part
- // of this array
- boolean loopDone6 = false;
- while (!loopDone6) {
- // We should be at the end element, but make sure
- while (!reader.isEndElement())
- reader.next();
- // Step out of this element
- reader.next();
- // Step to next element event.
- while (!reader.isStartElement() && !reader.isEndElement())
- reader.next();
- if (reader.isEndElement()) {
- // two continuous end elements means we are
- // exiting the xml structure
- loopDone6 = true;
- } else {
- if (new javax.xml.namespace.QName("", "configurations").equals(reader.getName())) {
-
- nillableValue = reader.getAttributeValue(
- "http://www.w3.org/2001/XMLSchema-instance", "nil");
- if ("true".equals(nillableValue) || "1".equals(nillableValue)) {
- list6.add(null);
- reader.next();
- } else {
- list6.add(NameValue.Factory.parse(reader));
- }
- } else {
- loopDone6 = true;
- }
- }
- }
- // call the converter utility to convert and set the
- // array
-
- object.setConfigurations((NameValue[]) org.apache.axis2.databinding.utils.ConverterUtil
- .convertToArray(NameValue.class, list6));
-
- } // End of if for expected property start element
-
- else {
-
- }
-
- while (!reader.isStartElement() && !reader.isEndElement())
- reader.next();
-
- if (reader.isStartElement())
- // A start element we are not expecting indicates a
- // trailing invalid property
- throw new org.apache.axis2.databinding.ADBException("Unexpected subelement "
- + reader.getLocalName());
-
- } catch (javax.xml.stream.XMLStreamException e) {
- throw new java.lang.Exception(e);
- }
-
- return object;
- }
-
- }// end of factory class
-
- }
-
- private org.apache.axiom.om.OMElement toOM(WorkflowInterpretorStub.LaunchWorkflow param, boolean optimizeContent)
- throws org.apache.axis2.AxisFault {
-
- try {
- return param.getOMElement(WorkflowInterpretorStub.LaunchWorkflow.MY_QNAME,
- org.apache.axiom.om.OMAbstractFactory.getOMFactory());
- } catch (org.apache.axis2.databinding.ADBException e) {
- throw org.apache.axis2.AxisFault.makeFault(e);
- }
-
- }
-
- private org.apache.axiom.om.OMElement toOM(WorkflowInterpretorStub.LaunchWorkflowResponse param,
- boolean optimizeContent) throws org.apache.axis2.AxisFault {
-
- try {
- return param.getOMElement(WorkflowInterpretorStub.LaunchWorkflowResponse.MY_QNAME,
- org.apache.axiom.om.OMAbstractFactory.getOMFactory());
- } catch (org.apache.axis2.databinding.ADBException e) {
- throw org.apache.axis2.AxisFault.makeFault(e);
- }
-
- }
-
- private org.apache.axiom.soap.SOAPEnvelope toEnvelope(org.apache.axiom.soap.SOAPFactory factory,
- java.lang.String param1, java.lang.String param2, NameValue[] param5, WorkflowInterpretorStub.LaunchWorkflow dummyWrappedType,
- boolean optimizeContent) throws org.apache.axis2.AxisFault {
-
- try {
- WorkflowInterpretorStub.LaunchWorkflow wrappedType = new WorkflowInterpretorStub.LaunchWorkflow();
- wrappedType.setWorkflowAsString(param1);
- wrappedType.setTopic(param2);
- wrappedType.setInputs(param5);
- org.apache.axiom.soap.SOAPEnvelope emptyEnvelope = factory.getDefaultEnvelope();
-
- emptyEnvelope.getBody().addChild(
- wrappedType.getOMElement(WorkflowInterpretorStub.LaunchWorkflow.MY_QNAME, factory));
-
- return emptyEnvelope;
- } catch (org.ap
<TRUNCATED>
[8/9] airavata git commit: removing previous airavata client API -
AIRAVATA-1371
Posted by ch...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/32fff944/modules/airavata-client/src/main/java/org/apache/airavata/client/api/AiravataManager.java
----------------------------------------------------------------------
diff --git a/modules/airavata-client/src/main/java/org/apache/airavata/client/api/AiravataManager.java b/modules/airavata-client/src/main/java/org/apache/airavata/client/api/AiravataManager.java
deleted file mode 100644
index 6805dd2..0000000
--- a/modules/airavata-client/src/main/java/org/apache/airavata/client/api/AiravataManager.java
+++ /dev/null
@@ -1,137 +0,0 @@
-/*
- *
- * 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.client.api;
-
-import org.apache.airavata.client.api.exception.AiravataAPIInvocationException;
-
-import java.net.URI;
-import java.util.Date;
-import java.util.List;
-
-/**
- * This interface contains set of methods to access the basic configurations of AiravataClient required to connect to
- * Airvata services running at the backend
- */
-public interface AiravataManager {
-
- /**
- * Return a list of Workflow Interpreter service urls registered in the system
- * @return 0 or more urls
- * @throws AiravataAPIInvocationException
- */
- public List<URI> getWorkflowInterpreterServiceURLs() throws AiravataAPIInvocationException;
-
- /**
- * Return a the first Workflow interpreter service url registered in the system
- * @return url or null if a url is not registered
- * @throws AiravataAPIInvocationException
- */
- public URI getWorkflowInterpreterServiceURL() throws AiravataAPIInvocationException;
-
- /**
- * Return a the first GFaC service url registered in the system orelse return the <code>defaultURL</code>
- * @param defaultURL
- * @return url
- * @throws AiravataAPIInvocationException
- */
- public URI getWorkflowInterpreterServiceURL(URI defaultURL) throws AiravataAPIInvocationException;
-
- /**
- * Return a list of Workflow Interpreter service urls registered in the system
- * @return 0 or more urls
- * @throws AiravataAPIInvocationException
- */
- public List<URI> getMessageBoxServiceURLs() throws AiravataAPIInvocationException;
-
- /**
- * Return a the first Workflow interpreter service url registered in the system
- * @return url or null if a url is not registered
- * @throws AiravataAPIInvocationException
- */
- public URI getMessageBoxServiceURL() throws AiravataAPIInvocationException;
-
- /**
- * Return a the first GFaC service url registered in the system orelse return the <code>defaultURL</code>
- * @param defaultURL
- * @return url
- * @throws AiravataAPIInvocationException
- */
- public URI getMessageBoxServiceURL(URI defaultURL) throws AiravataAPIInvocationException;
-
- /**
- * Return a list of Workflow Interpreter service urls registered in the system
- * @return 0 or more urls
- * @throws AiravataAPIInvocationException
- */
- public List<URI> getEventingServiceURLs() throws AiravataAPIInvocationException;
-
- /**
- * Return a the first Workflow interpreter service url registered in the system
- * @return url or null if a url is not registered
- * @throws AiravataAPIInvocationException
- */
- public URI getEventingServiceURL() throws AiravataAPIInvocationException;
-
- /**
- * Return a the first GFaC service url registered in the system orelse return the <code>defaultURL</code>
- * @param defaultURL
- * @return url
- * @throws AiravataAPIInvocationException
- */
- public URI getEventingServiceURL(URI defaultURL) throws AiravataAPIInvocationException;
-
- public Object getConfiguration(String key) throws AiravataAPIInvocationException;
-
- public List<Object> getConfigurationList(String key) throws AiravataAPIInvocationException;
-
- public void setConfiguration(String key, String value, Date expire) throws AiravataAPIInvocationException;
-
- public void addConfiguration(String key, String value, Date expire) throws AiravataAPIInvocationException;
-
- public void removeAllConfiguration(String key) throws AiravataAPIInvocationException;
-
- public void removeConfiguration(String key, String value) throws AiravataAPIInvocationException;
-
- public void addWorkflowInterpreterURI(URI uri) throws AiravataAPIInvocationException;
-
- public void setEventingURI(URI uri) throws AiravataAPIInvocationException;
-
- public void setMessageBoxURI(URI uri) throws AiravataAPIInvocationException;
-
- public void addWorkflowInterpreterURI(URI uri, Date expire) throws AiravataAPIInvocationException;
-
- public void setEventingURI(URI uri, Date expire) throws AiravataAPIInvocationException;
-
- public void setMessageBoxURI(URI uri, Date expire) throws AiravataAPIInvocationException;
-
- public void removeWorkflowInterpreterURI(URI uri) throws AiravataAPIInvocationException;
-
- public void removeAllWorkflowInterpreterURI() throws AiravataAPIInvocationException;
-
- public void unsetEventingURI() throws AiravataAPIInvocationException;
-
- public void unsetMessageBoxURI() throws AiravataAPIInvocationException;
-
-// public Gateway getGateway () throws AiravataAPIInvocationException;
-
-// public AiravataUser getUser() throws AiravataAPIInvocationException;
-}
http://git-wip-us.apache.org/repos/asf/airavata/blob/32fff944/modules/airavata-client/src/main/java/org/apache/airavata/client/api/AmazonWebServicesSettings.java
----------------------------------------------------------------------
diff --git a/modules/airavata-client/src/main/java/org/apache/airavata/client/api/AmazonWebServicesSettings.java b/modules/airavata-client/src/main/java/org/apache/airavata/client/api/AmazonWebServicesSettings.java
deleted file mode 100644
index eaa924e..0000000
--- a/modules/airavata-client/src/main/java/org/apache/airavata/client/api/AmazonWebServicesSettings.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- *
- * 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.client.api;
-
-public interface AmazonWebServicesSettings {
- public String getAccessKeyId();
- public String getAMIId();
- public String getInstanceId();
- public String getInstanceType();
- public String getSecretAccessKey();
- public String getUsername();
-
- public void setAccessKeyId(String accessKeyId);
- public void setAMIId(String amiId);
- public void setInstanceId(String instanceId);
- public void setInstanceType(String instanceType);
- public void setSecretAccessKey(String secretAccessKey);
- public void setUsername(String username);
-}
http://git-wip-us.apache.org/repos/asf/airavata/blob/32fff944/modules/airavata-client/src/main/java/org/apache/airavata/client/api/ApplicationManager.java
----------------------------------------------------------------------
diff --git a/modules/airavata-client/src/main/java/org/apache/airavata/client/api/ApplicationManager.java b/modules/airavata-client/src/main/java/org/apache/airavata/client/api/ApplicationManager.java
deleted file mode 100644
index fe00afd..0000000
--- a/modules/airavata-client/src/main/java/org/apache/airavata/client/api/ApplicationManager.java
+++ /dev/null
@@ -1,284 +0,0 @@
-/*
- *
- * 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.client.api;
-
-import java.util.List;
-import java.util.Map;
-
-import org.apache.airavata.client.api.exception.AiravataAPIInvocationException;
-import org.apache.airavata.client.api.exception.DescriptorAlreadyExistsException;
-//import org.apache.airavata.commons.gfac.type.ApplicationDescription;
-//import org.apache.airavata.commons.gfac.type.HostDescription;
-//import org.apache.airavata.commons.gfac.type.ServiceDescription;
-
-public interface ApplicationManager {
- //Service descriptors
-
-// /**
-// * Retrieve registered service description of the given service name
-// * @param serviceName
-// * @return
-// * @throws AiravataAPIInvocationException
-// */
-// public ServiceDescription getServiceDescription(String serviceName) throws AiravataAPIInvocationException;
-//
-// /**
-// * Retrieve all registered service descriptions
-// * @return
-// * @throws AiravataAPIInvocationException
-// */
-// public List<ServiceDescription> getAllServiceDescriptions() throws AiravataAPIInvocationException;
-//
-// /**
-// * Save service description on registry
-// * @param service Service description information to update.
-// * @return The service descriptor name.
-// * @deprecated Deprecated since 0.6 release. User {@see #addServiceDescription} and {@see #updateServiceDescription}
-// * methods instead.
-// * @throws AiravataAPIInvocationException If an error occurred while updating service descriptor.
-// */
-// @Deprecated
-// public String saveServiceDescription(ServiceDescription service)throws AiravataAPIInvocationException;
-//
-// /**
-// * Adds a new Service descriptor to the system. If service descriptor already exists in the system
-// * this will throw {@see DescriptorRecordAlreadyExistsException}. If you want to update an existing
-// * service descriptor use {@see #updateServiceDescription}.
-// * @param serviceDescription The service descriptor.
-// * @throws AiravataAPIInvocationException If an error occurred while adding service description.
-// * @throws DescriptorAlreadyExistsException If service descriptor already exists in the system.
-// */
-// public void addServiceDescription(ServiceDescription serviceDescription)throws AiravataAPIInvocationException,
-// DescriptorAlreadyExistsException;
-//
-// /**
-// * Updates the service descriptor.
-// * @param serviceDescription Service description information to update.
-// * @throws AiravataAPIInvocationException If an error occurred while updating service description.
-// */
-// public void updateServiceDescription(ServiceDescription serviceDescription)throws AiravataAPIInvocationException;
-//
-//
-//
-// /**
-// * Delete service description from the registry
-// * @param serviceName
-// * @throws AiravataAPIInvocationException
-// */
-// public void deleteServiceDescription(String serviceName) throws AiravataAPIInvocationException;
-//
-// /**
-// * Retrieve a list of registered service descriptions of the given regex service name
-// * @param nameRegEx
-// * @return
-// * @throws AiravataAPIInvocationException
-// */
-// public List<ServiceDescription> searchServiceDescription(String nameRegEx) throws AiravataAPIInvocationException;
-//
-// //Application descriptors
-//
-// /**
-// * Retrieve registered application description of the given service name & hostName
-// * @param serviceName
-// * @param hostName
-// * @return
-// * @throws AiravataAPIInvocationException
-// */
-// public ApplicationDescription getApplicationDescription(String serviceName, String hostName)throws AiravataAPIInvocationException;
-//
-// /**
-// * Save deployment description on registry for a given service for a host
-// * @param serviceId The service descriptor id.
-// * @param hostId The host descriptor id.
-// * @param app The application deployment descriptor.
-// * @return The application deployment descriptor name.
-// * @deprecated Deprecated since 0.6 release. Please use {@see #addApplicationDescription} and
-// * {@see #updateApplicationDescription}.
-// * @throws AiravataAPIInvocationException If an error occurred while adding application deployment descriptor.
-// */
-// @Deprecated
-// public String saveApplicationDescription(String serviceId, String hostId, ApplicationDescription app)throws AiravataAPIInvocationException;
-//
-//
-// /**
-// * Adds a new deployment description associating with given service description and given host description. If
-// * an association already exists this will throw {@see DescriptorRecordAlreadyExistsException} exception. If you
-// * want to update an existing deployment descriptor use {@see #updateApplicationDescription}.
-// * @param serviceDescription The service description to associate. Should be saved before passing to this method.
-// * @param hostDescription The host description to associate, should have been saved before calling this method.
-// * @param applicationDeploymentDescription The application descriptor to save.
-// * @throws AiravataAPIInvocationException If an error occurred while saving application descriptor.
-// * @throws DescriptorAlreadyExistsException If deployment descriptor already exists in the system.
-// */
-// public void addApplicationDescription(ServiceDescription serviceDescription, HostDescription hostDescription,
-// ApplicationDescription applicationDeploymentDescription)
-// throws AiravataAPIInvocationException, DescriptorAlreadyExistsException;
-//
-// /**
-// * Adds a new deployment description associating with given service description and given host description. If
-// * an association already exists this will throw {@see DescriptorRecordAlreadyExistsException} exception.
-// * @param serviceDescription The service description to associate. Should be saved before passing to this method.
-// * @param hostDescription The host description to associate, should have been saved before calling this method.
-// * @param applicationDeploymentDescription The application descriptor to save.
-// * @throws AiravataAPIInvocationException If an error occurred while saving application descriptor.
-// */
-// public void updateApplicationDescription(ServiceDescription serviceDescription, HostDescription hostDescription,
-// ApplicationDescription applicationDeploymentDescription)
-// throws AiravataAPIInvocationException;
-//
-// /**
-// * Retrieve list of registered deployment descriptions of the given regex service name & regex host name
-// * @param serviceName
-// * @param hostName
-// * @return
-// * @throws AiravataAPIInvocationException
-// */
-// public List<ApplicationDescription> searchApplicationDescription(String serviceName, String hostName)throws AiravataAPIInvocationException;
-//
-// /**
-// * Retrieve all registered deployment descriptions, The key represents the service name & host name in string array
-// * @return
-// * @throws AiravataAPIInvocationException
-// */
-// public Map<String[], ApplicationDescription> getAllApplicationDescriptions() throws AiravataAPIInvocationException;
-//
-// /**
-// * Retrieve list of registered deployment descriptions of the given regex service name, regex host name & regex application name
-// * @param serviceName
-// * @param hostName
-// * @param applicationName
-// * @return
-// * @throws AiravataAPIInvocationException
-// */
-// public List<ApplicationDescription> searchApplicationDescription(String serviceName, String hostName, String applicationName) throws AiravataAPIInvocationException;
-//
-// /**
-// * Retrieve registered map of deployment descriptions for their host description of the given service name
-// * @param serviceName
-// * @return
-// * @throws AiravataAPIInvocationException
-// */
-// public Map<HostDescription, List<ApplicationDescription>> searchApplicationDescription(String serviceName)throws AiravataAPIInvocationException;
-//
-// /**
-// * Delete deployment description from the registry which is exposed as the service name in the host name
-// * @param serviceName
-// * @param hostName
-// * @param applicationName
-// * @throws AiravataAPIInvocationException
-// */
-// public void deleteApplicationDescription(String serviceName, String hostName, String applicationName)throws AiravataAPIInvocationException;
-//
-// //Host descriptors
-//
-// /**
-// * Retrieve registered host description of the given host name
-// * @param hostName
-// * @return
-// * @throws AiravataAPIInvocationException
-// */
-// public HostDescription getHostDescription(String hostName) throws AiravataAPIInvocationException;
-//
-// /**
-// * Retrieve all registered host descriptions
-// * @return
-// * @throws AiravataAPIInvocationException
-// */
-// public List<HostDescription> getAllHostDescriptions() throws AiravataAPIInvocationException;
-//
-// /**
-// * Save host description on registry
-// * @param host The host descriptor object to update in the database.
-// * @deprecated Deprecated since 0.6 release. Please use {@see #addHostDescription} and {@see #updateHostDescription}
-// * @throws AiravataAPIInvocationException If an error occurred while saving the host description.
-// */
-// @Deprecated
-// public String saveHostDescription(HostDescription host)throws AiravataAPIInvocationException;
-//
-//
-// /**
-// * Adds a new host descriptor object. If adding host descriptor already exists in the system this will throw
-// * DescriptorRecordAlreadyExistsException. If user wants to update an existing host descriptor use
-// * {@see #updateHostDescription(HostDescription host)} method.
-// * @param host The host descriptor object to save in the database.
-// * @throws AiravataAPIInvocationException If an error occurred while saving the host description.
-// * @throws DescriptorAlreadyExistsException If host descriptor object already exists in the system.
-// */
-// public void addHostDescription (HostDescription host) throws DescriptorAlreadyExistsException,
-// AiravataAPIInvocationException;
-//
-//
-// /**
-// * Updates an existing host descriptor. If you are not sure whether descriptor already exists try using
-// * {@see #addHostDescription} and catch {@see DescriptorRecordAlreadyExistsException}. If caught use this method
-// * to update the record.
-// * @param host The host descriptor object to update in the database.
-// * @throws AiravataAPIInvocationException If an error occurred while saving the host description.
-// */
-// public void updateHostDescription(HostDescription host)throws AiravataAPIInvocationException;
-//
-// /**
-// * Retrieve a list of registered hsot descriptions of the given regex host name
-// * @param regExName
-// * @return
-// * @throws AiravataAPIInvocationException
-// */
-// public List<HostDescription> searchHostDescription(String regExName) throws AiravataAPIInvocationException;
-//
-// /**
-// * Delete host description from the registry
-// * @param hostId
-// * @throws AiravataAPIInvocationException
-// */
-// public void deleteHostDescription(String hostId) throws AiravataAPIInvocationException;
-//
-// /**
-// * Map services to possible hosts
-// * @param serviceName
-// * @param hostName
-// * @return
-// * @throws AiravataAPIInvocationException
-// */
-// public boolean deployServiceOnHost(String serviceName, String hostName)throws AiravataAPIInvocationException;
-//
-// public Map<String,ApplicationDescription> getApplicationDescriptors (String serviceName) throws AiravataAPIInvocationException;
-//
-// public boolean isHostDescriptorExists(String descriptorName) throws AiravataAPIInvocationException;
-//
-// public void removeHostDescriptor(String hostName) throws AiravataAPIInvocationException;
-//
-// public boolean isServiceDescriptorExists(String descriptorName) throws AiravataAPIInvocationException;
-//
-// public boolean isApplicationDescriptorExists(String serviceName, String hostName, String descriptorName)throws AiravataAPIInvocationException;
-//
-// public void removeServiceDescriptor(String serviceName) throws AiravataAPIInvocationException;
-//
-// public void removeApplicationDescriptor(String serviceName, String hostName, String applicationName) throws AiravataAPIInvocationException;
-//
-// public void updateHostDescriptor(HostDescription descriptor) throws AiravataAPIInvocationException;
-//
-// public void updateServiceDescriptor(ServiceDescription descriptor) throws AiravataAPIInvocationException;
-//
-// public void updateApplicationDescriptor(String serviceName, String hostName, ApplicationDescription descriptor) throws AiravataAPIInvocationException;
-//
-// public ApplicationDescription getApplicationDescriptor(String serviceName, String hostname, String applicationName) throws AiravataAPIInvocationException;
-}
http://git-wip-us.apache.org/repos/asf/airavata/blob/32fff944/modules/airavata-client/src/main/java/org/apache/airavata/client/api/BaseAPI.java
----------------------------------------------------------------------
diff --git a/modules/airavata-client/src/main/java/org/apache/airavata/client/api/BaseAPI.java b/modules/airavata-client/src/main/java/org/apache/airavata/client/api/BaseAPI.java
deleted file mode 100644
index 05b7bb2..0000000
--- a/modules/airavata-client/src/main/java/org/apache/airavata/client/api/BaseAPI.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- *
- * 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.client.api;
-
-import java.net.URI;
-
-import org.apache.airavata.client.api.exception.AiravataAPIInvocationException;
-import org.apache.airavata.common.utils.Version;
-
-public interface BaseAPI {
-
- /**
- * Retrieve the version associated with the Experiment Execution API
- * @return
- * @throws AiravataAPIInvocationException
- */
- public Version getVersion() throws AiravataAPIInvocationException;
-
- public String getUser();
-
- public String getGateway();
-
- public void initialize() throws AiravataAPIInvocationException;
-
- public URI getServiceURL() throws AiravataAPIInvocationException;
-// public PasswordCallback getPasswordCallback() throws AiravataAPIInvocationException;
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata/blob/32fff944/modules/airavata-client/src/main/java/org/apache/airavata/client/api/CredentialStoreManager.java
----------------------------------------------------------------------
diff --git a/modules/airavata-client/src/main/java/org/apache/airavata/client/api/CredentialStoreManager.java b/modules/airavata-client/src/main/java/org/apache/airavata/client/api/CredentialStoreManager.java
deleted file mode 100644
index f79b8d4..0000000
--- a/modules/airavata-client/src/main/java/org/apache/airavata/client/api/CredentialStoreManager.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- *
- * 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.client.api;
-
-import org.apache.airavata.client.api.exception.AiravataAPIInvocationException;
-
-public interface CredentialStoreManager {
-
- /**
- * Checks whether a credential exists in the credential store for given gateway and token
- * @param gatewayId
- * @param tokenId
- * @return a boolean (true is credential exists, false if not)
- */
- public boolean isCredentialExist(String gatewayId, String tokenId) throws AiravataAPIInvocationException;
-
- /**
- * Get the public key for a credential in the credential store for given gateway and token
- * @param gatewayId
- * @param tokenId
- * @return String The public key of the credential
- */
- public String getCredentialPublicKey(String gatewayId, String tokenId) throws AiravataAPIInvocationException;
-
- /**
- * Creates a new SSH credential for given gateway and token, encrypts it with the given password
- * and stores it in the credential store
- * @param gatewayId
- * @param tokenId
- * @return String The public key of the credential
- */
- public String createCredential(String gatewayId, String tokenId) throws AiravataAPIInvocationException;
-
- /**
- * Creates a new SSH credential for given gateway and token, encrypts it with the given password
- * and stores it in the credential store
- * @param gatewayId
- * @param tokenId
- * @param username
- * @return String The public key of the credential
- */
- public String createCredential(String gatewayId, String tokenId, String username) throws AiravataAPIInvocationException;
-}
http://git-wip-us.apache.org/repos/asf/airavata/blob/32fff944/modules/airavata-client/src/main/java/org/apache/airavata/client/api/CredentialStoreSecuritySettings.java
----------------------------------------------------------------------
diff --git a/modules/airavata-client/src/main/java/org/apache/airavata/client/api/CredentialStoreSecuritySettings.java b/modules/airavata-client/src/main/java/org/apache/airavata/client/api/CredentialStoreSecuritySettings.java
deleted file mode 100644
index e8a1d3d..0000000
--- a/modules/airavata-client/src/main/java/org/apache/airavata/client/api/CredentialStoreSecuritySettings.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- *
- * 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.client.api;
-
-/**
- * Encapsulates security information related to credential-store.
- * Mainly we need information about the token id and and user id of the portal user
- * who is invoking the workflow.
- */
-public interface CredentialStoreSecuritySettings {
-
- /**
- * Returns the token id to get the credentials.
- * @return The token id.
- */
- String getTokenId();
-
- /**
- * Sets the token to be used when accessing the credential store.
- * @param token The token.
- */
- void setTokenId(String token);
-
- /**
- * Sets the portal user name.
- * @param portalUserName The name of the portal user.
- */
- void setPortalUser(String portalUserName);
-
- /**
- * Gets the portal user name.
- * @return portal user name.
- */
- String getPortalUser();
-
- /**
- * Sets the gateway id.
- * @param gatewayId The gateway id.
- */
- void setGatewayId(String gatewayId);
-
- /**
- * Gets the gateway id.
- * @return name of the gateway.
- */
- String getGatewayId();
-
-
-
-}
http://git-wip-us.apache.org/repos/asf/airavata/blob/32fff944/modules/airavata-client/src/main/java/org/apache/airavata/client/api/ExecutionManager.java
----------------------------------------------------------------------
diff --git a/modules/airavata-client/src/main/java/org/apache/airavata/client/api/ExecutionManager.java b/modules/airavata-client/src/main/java/org/apache/airavata/client/api/ExecutionManager.java
deleted file mode 100644
index fe7832f..0000000
--- a/modules/airavata-client/src/main/java/org/apache/airavata/client/api/ExecutionManager.java
+++ /dev/null
@@ -1,207 +0,0 @@
-/*
- *
- * 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.client.api;
-
-import java.util.List;
-
-import org.apache.airavata.client.api.exception.AiravataAPIInvocationException;
-import org.apache.airavata.workflow.model.wf.Workflow;
-import org.apache.airavata.workflow.model.wf.WorkflowInput;
-import org.apache.airavata.ws.monitor.EventDataListener;
-import org.apache.airavata.ws.monitor.Monitor;
-
-public interface ExecutionManager {
- /**
- * Run an experiment containing single workflow
- * @param workflow - Workflow template Id or Workflow Graph XML
- * @param inputs
- * @return
- * @throws AiravataAPIInvocationException
- */
- public String runExperiment(String workflow,List<WorkflowInput> inputs) throws AiravataAPIInvocationException;
-
- /**
- * Run an experiment containing single workflow with custom settings for the experiment
- * @param workflow - Workflow template Id or Workflow Graph XML
- * @param inputs
- * @param options
- * @return
- * @throws AiravataAPIInvocationException
- */
- public String runExperiment(String workflow,List<WorkflowInput> inputs, ExperimentAdvanceOptions options) throws AiravataAPIInvocationException;
-
- /**
- * Run an experiment containing single workflow with custom settings for the experiment & listen
- * for notification events
- * @param workflow - Workflow template Id or Workflow Graph XML
- * @param inputs
- * @param options
- * @return
- * @throws AiravataAPIInvocationException
- */
- public String runExperiment(String workflow,List<WorkflowInput> inputs, ExperimentAdvanceOptions options, EventDataListener listener) throws AiravataAPIInvocationException;
-
- /**
- * Run an experiment containing single workflow
- * @param workflow
- * @param inputs
- * @return
- * @throws AiravataAPIInvocationException
- */
- public String runExperiment(Workflow workflow,List<WorkflowInput> inputs, ExperimentAdvanceOptions options) throws AiravataAPIInvocationException;
-
- /**
- * Get a monitor for a running experiment
- * @param experimentId
- * @return
- * @throws AiravataAPIInvocationException
- */
- public Monitor getExperimentMonitor(String experimentId)throws AiravataAPIInvocationException;
-
- /**
- * Get a monitor for a running experiment
- * @param experimentId
- * @param listener
- * @return
- * @throws AiravataAPIInvocationException
- */
- public Monitor getExperimentMonitor(String experimentId, EventDataListener listener) throws AiravataAPIInvocationException;
-
- /**
- * Create a new experiment advance options
- * @return
- * @throws AiravataAPIInvocationException
- */
- public ExperimentAdvanceOptions createExperimentAdvanceOptions() throws AiravataAPIInvocationException;
-
- /**
- * Create a new experiment advance options
- * @param experimentName - Name of the running experiment
- * @param experimentUser - Experiment submission user
- * @param experimentMetadata - Experiment metadata
- * @return
- * @throws AiravataAPIInvocationException
- */
- public ExperimentAdvanceOptions createExperimentAdvanceOptions(String experimentName, String experimentUser, String experimentMetadata) throws AiravataAPIInvocationException;
-
- /**
- * Returns when the given experiment has completed
- * @param experimentId
- * @throws AiravataAPIInvocationException
- */
- public void waitForExperimentTermination(String experimentId) throws AiravataAPIInvocationException;
-
- /*
- * Errors in experiment executions
- */
-
- /**
- * Return errors defined at the experiment level
- * @param experimentId
- * @return
- * @throws AiravataAPIInvocationException
- */
-// public List<ExperimentExecutionError> getExperimentExecutionErrors(String experimentId) throws AiravataAPIInvocationException;
-//
-// /**
-// * Return errors defined at the workflow level
-// * @param experimentId
-// * @param workflowInstanceId
-// * @return
-// * @throws AiravataAPIInvocationException
-// */
-// public List<WorkflowExecutionError> getWorkflowExecutionErrors(String experimentId, String workflowInstanceId) throws AiravataAPIInvocationException;
-//
-// /**
-// * Return errors defined at the node level
-// * @param experimentId
-// * @param workflowInstanceId
-// * @param nodeId
-// * @return
-// * @throws AiravataAPIInvocationException
-// */
-// public List<NodeExecutionError> getNodeExecutionErrors(String experimentId, String workflowInstanceId, String nodeId) throws AiravataAPIInvocationException;
-//
-// /**
-// * Return errors defined for a Application job
-// * @param experimentId
-// * @param workflowInstanceId
-// * @param nodeId
-// * @param jobId
-// * @return
-// * @throws AiravataAPIInvocationException
-// */
-// public List<ApplicationJobExecutionError> getApplicationJobErrors(String experimentId, String workflowInstanceId, String nodeId, String jobId) throws AiravataAPIInvocationException;
-//
-// /**
-// * Return errors defined for a Application job
-// * @param jobId
-// * @return
-// * @throws AiravataAPIInvocationException
-// */
-// public List<ApplicationJobExecutionError> getApplicationJobErrors(String jobId) throws AiravataAPIInvocationException;
-//
-// /**
-// * Return errors filtered by the parameters
-// * @param experimentId
-// * @param workflowInstanceId
-// * @param nodeId
-// * @param jobId
-// * @param filterBy - what type of source types the results should contain
-// * @return
-// * @throws AiravataAPIInvocationException
-// */
-// public List<ExecutionError> getExecutionErrors(String experimentId, String workflowInstanceId, String nodeId, String jobId, ExecutionErrors.Source...filterBy) throws AiravataAPIInvocationException;
-//
-// /**
-// * Adds an experiment execution error
-// * @param error
-// * @return
-// * @throws AiravataAPIInvocationException
-// */
-// public int addExperimentError(ExperimentExecutionError error) throws AiravataAPIInvocationException;
-//
-// /**
-// * Adds an workflow execution error
-// * @param error
-// * @return
-// * @throws AiravataAPIInvocationException
-// */
-// public int addWorkflowExecutionError(WorkflowExecutionError error) throws AiravataAPIInvocationException;
-//
-// /**
-// * Adds an node execution error
-// * @param error
-// * @return
-// * @throws AiravataAPIInvocationException
-// */
-// public int addNodeExecutionError(NodeExecutionError error) throws AiravataAPIInvocationException;
-//
-// /**
-// * Adds an Application job execution error
-// * @param error
-// * @return
-// * @throws AiravataAPIInvocationException
-// */
-// public int addApplicationJobExecutionError(ApplicationJobExecutionError error) throws AiravataAPIInvocationException;
-
-}
http://git-wip-us.apache.org/repos/asf/airavata/blob/32fff944/modules/airavata-client/src/main/java/org/apache/airavata/client/api/ExperimentAdvanceOptions.java
----------------------------------------------------------------------
diff --git a/modules/airavata-client/src/main/java/org/apache/airavata/client/api/ExperimentAdvanceOptions.java b/modules/airavata-client/src/main/java/org/apache/airavata/client/api/ExperimentAdvanceOptions.java
deleted file mode 100644
index 458ec8c..0000000
--- a/modules/airavata-client/src/main/java/org/apache/airavata/client/api/ExperimentAdvanceOptions.java
+++ /dev/null
@@ -1,160 +0,0 @@
-/*
- *
- * 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.client.api;
-
-import org.apache.airavata.client.api.exception.AiravataAPIInvocationException;
-import org.apache.airavata.client.impl.SecuritySettingsImpl;
-import org.apache.airavata.client.impl.WorkflowOutputDataSettingsImpl;
-import org.apache.airavata.client.impl.WorkflowSchedulingSettingsImpl;
-
-import java.util.UUID;
-
-public class ExperimentAdvanceOptions {
- private String executionUser;
- private String metadata;
- private String experimentName;
- private String customExperimentId;
- private WorkflowSchedulingSettings schedulingSettings;
- private WorkflowOutputDataSettings outputDataSettings;
- private SecuritySettings securitySettings;
-// private AiravataAPI api;
-//
-// public ExperimentAdvanceOptions(AiravataAPI api) {
-// this.api=api;
-// }
-
- /**
- * Get the user who will be running the experiment if different from the experiment
- * submitting user.
- * @return String representing the execution user
- */
- public String getExperimentExecutionUser(){
- return executionUser;
- }
-
- /**
- * Get the metadata for the experiment.
- * @return String representing the custom metadata.
- */
- public String getExperimentMetadata(){
- return metadata;
- }
-
- /**
- * Get the name of the experiment
- * @return String representing the experiment name.
- */
- public String getExperimentName(){
- return experimentName;
- }
-
- /**
- * Get the custom Id that will be used as the experiment Id.
- * @return String representing the custom experiment Id.
- */
- public String getCustomExperimentId(){
- return customExperimentId;
- }
-
- /**
- * Set a 3rd party user identity as the user who performed this experiment. If not specified
- * the experiment submission user will be used as the execution user.
- * @param experimentExecutionUser - String representing the user.
- */
- public void setExperimentExecutionUser(String experimentExecutionUser){
- this.executionUser=experimentExecutionUser;
- }
-
- /**
- * Set custom metadata for the experiment.<br />
- * <i><b>Note:</b> Users can store custom data related to experiment along with the experiment and
- * retrieve them later on.</i>
- * @param experimentMetadata - String representing the metadata.
- */
- public void setExperimentCustomMetadata(String experimentMetadata){
- this.metadata=experimentMetadata;
- }
-
- /**
- * Set the name of the experiment. Must be unique. If not defined the name will be
- * auto-generated using the worklfow template Id & & time of experiment submission .
- * @param experimentName - String representing experiment name.
- */
- public void setExperimentName(String experimentName){
- this.experimentName=experimentName;
- }
-
- /**
- * Set a custom id as an experiment Id. If not specified the system will autogenerate an
- * experiment id.
- * @param customExperimentId - String representing the experiment Id.
- */
- public void setCustomExperimentId(String customExperimentId){
- this.customExperimentId=customExperimentId;
- }
-
- /**
- * Create a unique experiment Id.<br />
- * <i><b>Note:</b> This will not be set as the experiment Id for the experiment. Users should use the
- * function </i><code><b>setCustomExperimentId(...)</b></code><i> to do so.
- * @return A string representing a unique id.
- */
- public String generatExperimentId(){
- return UUID.randomUUID().toString();
- }
-
- /**
- * Get custom workflow scheduling settings
- * @return
- * @throws AiravataAPIInvocationException
- */
- public WorkflowSchedulingSettings getCustomWorkflowSchedulingSettings() throws AiravataAPIInvocationException{
- if (schedulingSettings==null){
- schedulingSettings=new WorkflowSchedulingSettingsImpl();
- }
- return schedulingSettings;
- }
-
- /**
- * Get workflow intermediate output data settings for application executions
- * @return
- * @throws AiravataAPIInvocationException
- */
- public WorkflowOutputDataSettings getCustomWorkflowOutputDataSettings() throws AiravataAPIInvocationException{
- if (outputDataSettings==null){
- outputDataSettings=new WorkflowOutputDataSettingsImpl();
- }
- return outputDataSettings;
- }
-
- /**
- * Get the custom security settings for running the experiment
- * @return
- * @throws AiravataAPIInvocationException
- */
- public SecuritySettings getCustomSecuritySettings() throws AiravataAPIInvocationException{
- if (securitySettings==null){
- securitySettings= new SecuritySettingsImpl();
- }
- return securitySettings;
- }
-}
http://git-wip-us.apache.org/repos/asf/airavata/blob/32fff944/modules/airavata-client/src/main/java/org/apache/airavata/client/api/GridMyProxyRepositorySettings.java
----------------------------------------------------------------------
diff --git a/modules/airavata-client/src/main/java/org/apache/airavata/client/api/GridMyProxyRepositorySettings.java b/modules/airavata-client/src/main/java/org/apache/airavata/client/api/GridMyProxyRepositorySettings.java
deleted file mode 100644
index e0a7091..0000000
--- a/modules/airavata-client/src/main/java/org/apache/airavata/client/api/GridMyProxyRepositorySettings.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- *
- * 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.client.api;
-
-public interface GridMyProxyRepositorySettings {
- public String getUsername();
- public String getPassword();
- public String getMyProxyServer();
- public int getLifeTime();
-
- public void setUsername(String username);
- public void setPassword(String password);
- public void setMyProxyServer(String myproxyServer);
- public void setLifeTime(int lifeTime);
-
- public void resetUsername();
- public void resetPassword();
- public void resetMyProxyServer();
- public void resetLifeTime();
-}
http://git-wip-us.apache.org/repos/asf/airavata/blob/32fff944/modules/airavata-client/src/main/java/org/apache/airavata/client/api/HPCSettings.java
----------------------------------------------------------------------
diff --git a/modules/airavata-client/src/main/java/org/apache/airavata/client/api/HPCSettings.java b/modules/airavata-client/src/main/java/org/apache/airavata/client/api/HPCSettings.java
deleted file mode 100644
index 7fe2c32..0000000
--- a/modules/airavata-client/src/main/java/org/apache/airavata/client/api/HPCSettings.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
- *
- * 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.client.api;
-
-public interface HPCSettings {
-
- /**
- * Get the job manager to use for this job submission
- * @return
- */
- public String getJobManager();
-
- /**
- * Get the no of CPU cores to allocate for this job
- * @return
- */
- public Integer getCPUCount();
-
- /**
- * Get the no of nodes to allocate for this job
- * @return
- */
- public Integer getNodeCount();
-
- /**
- * Get the job queue name
- * @return
- */
- public String getQueueName();
-
- /**
- * Get the maximum time the job should be allocated for execution
- * @return
- */
- public Integer getMaxWallTime();
-
- /**
- * Set the job manager to use for this job submission
- * @param jobManager
- */
- public void setJobManager(String jobManager);
-
- /**
- * Set the no of CPU cores to allocate for this job
- * @param cpuCount
- */
- public void setCPUCount(Integer cpuCount);
-
- /**
- * Set the no of nodes to allocate for this job
- * @param nodeCount
- */
- public void setNodeCount(Integer nodeCount);
-
- /**
- * Set the job queue name
- * @param queueName
- */
- public void setQueueName(String queueName);
-
- /**
- * Set the maximum time the job should be allocated for execution
- * @param maxWallTime
- */
- public void setMaxWallTime(Integer maxWallTime);
-
- /**
- * Reset the job manager values
- */
- public void resetJobManager();
-
- /**
- * Reset the CPU count
- */
- public void resetCPUCount();
-
- /**
- * Reset the Node count
- */
- public void resetNodeCount();
-
- /**
- * Reset the queue name for the job
- */
- public void resetQueueName();
-
- /**
- * Reset the maximum time allocated for the job
- */
- public void resetMaxWallTime();
-
-}
http://git-wip-us.apache.org/repos/asf/airavata/blob/32fff944/modules/airavata-client/src/main/java/org/apache/airavata/client/api/HostSchedulingSettings.java
----------------------------------------------------------------------
diff --git a/modules/airavata-client/src/main/java/org/apache/airavata/client/api/HostSchedulingSettings.java b/modules/airavata-client/src/main/java/org/apache/airavata/client/api/HostSchedulingSettings.java
deleted file mode 100644
index 2d7f919..0000000
--- a/modules/airavata-client/src/main/java/org/apache/airavata/client/api/HostSchedulingSettings.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- *
- * 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.client.api;
-
-public interface HostSchedulingSettings {
-
- /**
- * Get the id of the host descriptor
- * @return
- */
- public String getHostId();
-
- /**
- * Using WS-Gram or not (Pre WS-GRAM)
- * @return
- */
- public Boolean isWSGRAMPreffered();
-
- /**
- * Get the gatekeeper endpoint reference
- * @return
- */
- public String getGatekeeperEPR();
-
- /**
- * Set the id of the host descriptor use
- * @param hostId
- */
- public void setHostId(String hostId);
-
- /**
- * Set whether to use WS-GRAM or Pre WS-GRAM
- * @param wsgramPreffered
- */
- public void setWSGramPreffered(Boolean wsgramPreffered);
-
- /**
- * Set the gatekeeper endpoint reference
- * @param gatekeeperEPR
- */
- public void setGatekeeperEPR(String gatekeeperEPR);
-
- /**
- * reset the values for the WS-GRAM preference
- */
- public void resetWSGramPreffered();
-
- /**
- * Reset the values for gatekeeper endpoint reference
- */
- public void resetGatekeeperEPR();
-}
http://git-wip-us.apache.org/repos/asf/airavata/blob/32fff944/modules/airavata-client/src/main/java/org/apache/airavata/client/api/NodeSettings.java
----------------------------------------------------------------------
diff --git a/modules/airavata-client/src/main/java/org/apache/airavata/client/api/NodeSettings.java b/modules/airavata-client/src/main/java/org/apache/airavata/client/api/NodeSettings.java
deleted file mode 100644
index 9b33cf8..0000000
--- a/modules/airavata-client/src/main/java/org/apache/airavata/client/api/NodeSettings.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- *
- * 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.client.api;
-
-import java.util.List;
-
-import org.apache.airavata.client.tools.NameValuePairType;
-
-public interface NodeSettings {
-
- /**
- * Get the id of the node in the workflow
- * @return
- */
- public String getNodeId();
-
- /**
- * Get the id of the service descriptor which the node binds to
- * @return
- */
- public String getServiceId();
-
- /**
- * host settings for the service descriptor
- * @return
- */
- public HostSchedulingSettings getHostSettings();
-
- /**
- * HPC settings for the grid application exposed by the service descriptor
- * @return
- */
- public HPCSettings getHPCSettings();
-
- /**
- * get the list of name-value pair settings
- * @return
- */
- public List<NameValuePairType> getNameValuePair();
-
- /**
- * Set the node Id of the workflow
- * @param nodeId
- */
- public void setNodeId(String nodeId);
-
- /**
- * Set the id of the service descriptor which the node should binds to
- * @param serviceId
- */
- public void setServiceId(String serviceId);
-
- /**
- * set host settings for the application
- * @param hostSchedulingSettings
- */
- public void setHostSettings(HostSchedulingSettings hostSchedulingSettings);
-
- /**
- * Set HPC settings for the grid application
- * @param hpcSettings
- */
- public void setHPCSettings(HPCSettings hpcSettings);
-
- /**
- *
- * @param nameValuePair
- */
- public void setNameValuePair(List<NameValuePairType> nameValuePair);
-
-}
http://git-wip-us.apache.org/repos/asf/airavata/blob/32fff944/modules/airavata-client/src/main/java/org/apache/airavata/client/api/OutputDataSettings.java
----------------------------------------------------------------------
diff --git a/modules/airavata-client/src/main/java/org/apache/airavata/client/api/OutputDataSettings.java b/modules/airavata-client/src/main/java/org/apache/airavata/client/api/OutputDataSettings.java
deleted file mode 100644
index e1a8189..0000000
--- a/modules/airavata-client/src/main/java/org/apache/airavata/client/api/OutputDataSettings.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- *
- * 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.client.api;
-
-public interface OutputDataSettings {
-
- /**
- * Retrieve the id of the node which these output data settings are relevant
- * @return
- */
- public String getNodeId();
-
- /**
- * Retrieve the pre-specified staging location for output data
- * @return
- */
- public String getOutputDataDirectory();
-
- /**
- * Retrieve the associated data registry location for cataloging data separately
- * @return
- */
- public String getDataRegistryUrl();
-
- /**
- * Should the intermediate workflow output data should be kept or discarded
- * @return
- */
- public Boolean isDataPersistent();
-
- /**
- * Setup the id of the node which these output data settings are relevant
- */
- public void setNodeId(String nodeId);
-
- /**
- * Setup a custom pre-specified staging location for output data
- * @param outputDataDirectory - Path for output data directory
- */
- public void setOutputDataDirectory(String outputDataDirectory);
-
- /**
- * Setup a URL for pre-specified data registry (instead of the default) which will
- * catalog data
- * @param dataRegistryUrl
- */
- public void setDataRegistryUrl(String dataRegistryUrl);
-
- /**
- * Retain or discard intermediate output data
- * @param isDataPersistance - if true (default value) the intermediate output data is
- * kept, else discarded.
- */
- public void setDataPersistent(Boolean isDataPersistance);
-
- /**
- * Default output data directory will be used.
- */
- public void resetOutputDataDirectory();
-
- /**
- * Default data registry location will be used.
- */
- public void resetDataRegistryUrl();
-
- /**
- * Default data persistent settings will be used.
- */
- public void resetDataPersistent();
-
-}
http://git-wip-us.apache.org/repos/asf/airavata/blob/32fff944/modules/airavata-client/src/main/java/org/apache/airavata/client/api/ProvenanceManager.java
----------------------------------------------------------------------
diff --git a/modules/airavata-client/src/main/java/org/apache/airavata/client/api/ProvenanceManager.java b/modules/airavata-client/src/main/java/org/apache/airavata/client/api/ProvenanceManager.java
deleted file mode 100644
index 5c248ae..0000000
--- a/modules/airavata-client/src/main/java/org/apache/airavata/client/api/ProvenanceManager.java
+++ /dev/null
@@ -1,461 +0,0 @@
-///*
-// *
-// * 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.client.api;
-//import java.util.Date;
-//import java.util.List;
-//import java.util.Map;
-//
-//import org.apache.airavata.client.api.exception.AiravataAPIInvocationException;
-//
-///**
-// * This interface provide and API to manage all the provenance related methods, get Workflow inputs outputs
-// */
-//public interface ProvenanceManager {
-//
-// /**
-// * Add input port data for a node in a running instance of a Workflow
-// * @param data
-// * @throws AiravataAPIInvocationException
-// */
-// public void setWorkflowInstanceNodeInput(WorkflowInstanceNode node, String data) throws AiravataAPIInvocationException;
-//
-// /**
-// * Add input port data for a node in a running instance of a Workflow
-// * @param experimentId
-// * @param workflowInstanceId
-// * @param nodeId
-// * @param data
-// * @throws AiravataAPIInvocationException
-// */
-// public void setWorkflowInstanceNodeInput(String experimentId, String workflowInstanceId, String nodeId, String data) throws AiravataAPIInvocationException;
-//
-// /**
-// * Add output port data for a node in a running instance of a Workflow
-// * @param data
-// * @throws AiravataAPIInvocationException
-// */
-// public void setWorkflowInstanceNodeOutput(WorkflowInstanceNode node, String data) throws AiravataAPIInvocationException;
-//
-// /**
-// * Add output port data for a node in a running instance of a Workflow
-// * @param experimentId
-// * @param workflowInstanceId
-// * @param nodeId
-// * @param data
-// * @throws AiravataAPIInvocationException
-// */
-// public void setWorkflowInstanceNodeOutput(String experimentId, String workflowInstanceId, String nodeId, String data) throws AiravataAPIInvocationException;
-//
-// /**
-// * Get data of input ports of a node in a running instance of a Workflow
-// * @param node
-// * @return
-// * @throws AiravataAPIInvocationException
-// */
-// public String getWorkflowInstanceNodeInput(WorkflowInstanceNode node) throws AiravataAPIInvocationException;
-//
-// /**
-// * Get data of input ports of a node in a running instance of a Workflow
-// * @param experimentId
-// * @param workflowInstanceId
-// * @param nodeId
-// * @return
-// * @throws AiravataAPIInvocationException
-// */
-// public String getWorkflowInstanceNodeInput(String experimentId, String workflowInstanceId, String nodeId) throws AiravataAPIInvocationException;
-//
-// /**
-// * Get data of input ports of a node in all the running instance of a particular Workflow template
-// * @param workflowTemplateId
-// * @param nodeId
-// * @return
-// * @throws AiravataAPIInvocationException
-// */
-// public Map<WorkflowInstanceNode,String> getWorkflowInstanceNodeInput(String workflowTemplateId, String nodeId) throws AiravataAPIInvocationException;
-//
-// /**
-// * Get data of output ports of a node in a running instance of a Workflow
-// * @param node
-// * @return
-// * @throws AiravataAPIInvocationException
-// */
-// public String getWorkflowInstanceNodeOutput(WorkflowInstanceNode node) throws AiravataAPIInvocationException;
-//
-// /**
-// * Get data of output ports of a node in a running instance of a Workflow
-// * @param experimentId
-// * @param workflowInstanceId
-// * @param nodeId
-// * @return
-// * @throws AiravataAPIInvocationException
-// */
-// public String getWorkflowInstanceNodeOutput(String experimentId, String workflowInstanceId, String nodeId) throws AiravataAPIInvocationException;
-//
-// /**
-// * Get data of output ports of a node in all the running instance of a particular Workflow template
-// * @param workflowName
-// * @param nodeId
-// * @return
-// * @throws AiravataAPIInvocationException
-// */
-// public Map<WorkflowInstanceNode,String> getWorkflowInstanceNodeOutput(String workflowName, String nodeId) throws AiravataAPIInvocationException;
-//
-// /**
-// * Update the status of the Workflow instance
-// * @param experimentId
-// * @param workflowInstanceId
-// * @param status
-// * @throws AiravataAPIInvocationException
-// */
-// public void setWorkflowInstanceStatus(String experimentId, String workflowInstanceId, State status) throws AiravataAPIInvocationException;
-//
-// /**
-// * Update the status of the Workflow instance
-// * @param status
-// * @throws AiravataAPIInvocationException
-// */
-// public void setWorkflowInstanceStatus(WorkflowExecutionStatus status) throws AiravataAPIInvocationException;
-//
-// /**
-// * Retrieve the status of the Workflow instance
-// * @param experimentId
-// * @param workflowInstanceId
-// * @return
-// * @throws AiravataAPIInvocationException
-// */
-// public WorkflowExecutionStatus getWorkflowInstanceStatus(String experimentId, String workflowInstanceId) throws AiravataAPIInvocationException;
-//
-// /**
-// * Retrieve the status of the Workflow instance
-// * @param workflowInstance
-// * @return
-// * @throws AiravataAPIInvocationException
-// */
-// public WorkflowExecutionStatus getWorkflowInstanceStatus(WorkflowExecution workflowInstance) throws AiravataAPIInvocationException;
-//
-// /**
-// * Update the User of the Workflow instance
-// * @param experimentId
-// * @param user
-// * @throws AiravataAPIInvocationException
-// */
-// public void setExperimentUser(String experimentId, String user) throws AiravataAPIInvocationException;
-//
-// /**
-// * Update the User of the Workflow instance
-// * @param user
-// * @throws AiravataAPIInvocationException
-// */
-// public void setExperimentUser(ExperimentUser user) throws AiravataAPIInvocationException;
-//
-// /**
-// * Retrieve the User of the Workflow instance
-// * @param experimentId
-// * @return
-// * @throws AiravataAPIInvocationException
-// */
-// public ExperimentUser getExperimentUser(String experimentId) throws AiravataAPIInvocationException;
-//
-// /**
-// * Update the metadata of the Workflow instance
-// * @param experimentId
-// * @param metadata
-// * @throws AiravataAPIInvocationException
-// */
-// public void setExperimentMetadata(String experimentId, String metadata) throws AiravataAPIInvocationException;
-//
-// /**
-// * Update the metadata of the Workflow instance
-// * @param experimentMetadata
-// * @throws AiravataAPIInvocationException
-// */
-// public void setExperimentMetadata(ExperimentMetadata experimentMetadata) throws AiravataAPIInvocationException;
-//
-// /**
-// * Retrieve the metadata of the Workflow instance
-// * @param experimentId
-// * @return
-// * @throws AiravataAPIInvocationException
-// */
-// public ExperimentMetadata getExperimentMetadata(String experimentId) throws AiravataAPIInvocationException;
-//
-// /**
-// * check whether the experiment exists
-// * @param experimentName
-// * @return
-// * @throws AiravataAPIInvocationException
-// */
-// public boolean isExperimentNameExist(String experimentName) throws AiravataAPIInvocationException;
-//
-// /**
-// * Update the instance name of the Workflow
-// * @param experimentId
-// * @param instanceName
-// * @throws AiravataAPIInvocationException
-// */
-// public void setExperimentName(String experimentId, String instanceName) throws AiravataAPIInvocationException;
-//
-// /**
-// * Update the instance name of the Workflow
-// * @param experimentName
-// * @throws AiravataAPIInvocationException
-// */
-// public void setExperimentName(ExperimentName experimentName) throws AiravataAPIInvocationException;
-//
-// /**
-// * Retrieve the metadata of the Workflow instance
-// * @param experimentId
-// * @return
-// * @throws AiravataAPIInvocationException
-// */
-// public ExperimentName getExperimentName(String experimentId) throws AiravataAPIInvocationException;
-//
-// /**
-// * Retrieve the id's of all the experiments run by the given owner
-// * @param owner
-// * @return
-// * @throws AiravataAPIInvocationException
-// */
-// public List<String> getExperimentIdList(String owner) throws AiravataAPIInvocationException;
-//
-// public ExperimentData getExperimentMetaInformation(String experimentId)throws AiravataAPIInvocationException;
-//
-// public List<ExperimentData> getAllExperimentMetaInformation(String user)throws AiravataAPIInvocationException;
-//
-// /**
-// * Retrieve the id's of all the experiments run by the current user
-// * @return
-// * @throws AiravataAPIInvocationException
-// */
-// public List<String> getExperimentIdList() throws AiravataAPIInvocationException;
-//
-// /**
-// * Retrieve all the experiments run by the current user
-// * @deprecated
-// * @return
-// * @throws AiravataAPIInvocationException
-// */
-// public List<ExperimentData> getWorkflowExperimentDataList() throws AiravataAPIInvocationException;
-//
-// public List<ExperimentData> getExperimentDataList() throws AiravataAPIInvocationException;
-//
-// /**
-// * Retrieve all the experiments run by the given owner
-// * @deprecated
-// * @param user
-// * @return
-// * @throws AiravataAPIInvocationException
-// */
-// public List<ExperimentData> getWorkflowExperimentDataList(String user) throws AiravataAPIInvocationException;
-//
-// public List<ExperimentData> getExperimentDataList(String user) throws AiravataAPIInvocationException;
-//
-// /**
-// * Retrieve all the experiment data run by the given owner with paging
-// * @deprecated
-// * @param user
-// * @param pageSize
-// * @param pageNo
-// * @return
-// * @throws AiravataAPIInvocationException
-// */
-// public List<ExperimentData> getWorkflowExperimentData(String user, int pageSize, int pageNo) throws AiravataAPIInvocationException;
-//
-// public List<ExperimentData> getExperimentData(String user, int pageSize, int pageNo) throws AiravataAPIInvocationException;
-//
-// /**
-// * Retrieve all the experiment data run by the given owner with paging
-// * @deprecated
-// * @param experimentId
-// * @return
-// * @throws AiravataAPIInvocationException
-// */
-// public ExperimentData getWorkflowExperimentData(String experimentId) throws AiravataAPIInvocationException;
-//
-// public ExperimentData getExperimentData(String experimentId) throws AiravataAPIInvocationException;
-//
-// /**
-// * Retrieve experiment data for a given workflow instance
-// * @param experimentId
-// * @param workflowInstanceId
-// * @return
-// * @throws AiravataAPIInvocationException
-// */
-// public WorkflowExecutionData getWorkflowInstanceData(String experimentId, String workflowInstanceId) throws AiravataAPIInvocationException;
-//
-// /**
-// * Retrieve experiment data for a given workflow instance
-// * @param workflowInstance
-// * @return
-// * @throws AiravataAPIInvocationException
-// */
-// public WorkflowExecutionData getWorkflowInstanceData(WorkflowExecution workflowInstance) throws AiravataAPIInvocationException;
-//
-// /**
-// * Retrieve output node names of a experiment
-// * @param experimentId
-// * @deprecated
-// * @return
-// * @throws AiravataAPIInvocationException
-// */
-// public String[] getWorkflowExecutionOutputNames(String experimentId) throws AiravataAPIInvocationException;
-//
-// public void setWorkflowInstanceNodeStatus(String experimentId, String workflowInstaceId, String nodeId, State status) throws AiravataAPIInvocationException;
-//
-// public void setWorkflowInstanceNodeStatus(NodeExecutionStatus status) throws AiravataAPIInvocationException;
-//
-// public NodeExecutionStatus getWorkflowInstanceNodeStatus(String experimentId, String workflowInstaceId, String nodeId) throws AiravataAPIInvocationException;
-//
-// public NodeExecutionStatus getWorkflowInstanceNodeStatus(WorkflowInstanceNode node) throws AiravataAPIInvocationException;
-//
-// public void addExperiment(String projectName, String experimentId, String experimentName) throws AiravataAPIInvocationException;
-//
-// public void addWorkflowInstance(String experimentId, WorkflowExecution workflowInstance) throws AiravataAPIInvocationException;
-//
-// //TODO setup node type for the node & gram data for the node
-//
-// public List<WorkflowExecution> getExperimentWorkflowInstances(String experimentId) throws AiravataAPIInvocationException;
-//
-// public void setWorkflowNodeType(WorkflowInstanceNode node, WorkflowNodeType type) throws AiravataAPIInvocationException;
-//
-// public void setWorkflowInstanceTemplateName(String workflowInstanceId,String templateName) throws AiravataAPIInvocationException;
-//
-// public void saveWorkflowExecutionOutput(String experimentId, String outputNodeName, String output) throws AiravataAPIInvocationException;
-//
-// /**
-// * @deprecated - Will be removed from 0.9 release onwards. Use {@see #addApplicationJob #updateApplicationJob(ApplucationJob) etc.} functions instead.
-// * This will store the gram specific data in to repository, this can be called before submitting the workflow in to Grid
-// * @param data
-// * @throws AiravataAPIInvocationException
-// */
-// public void updateWorkflowNodeGramData(WorkflowNodeGramData data) throws AiravataAPIInvocationException;
-//
-// /*--------------------------------------- Managing Data for Application Jobs ------------------------------------------*/
-//
-// /**
-// * Returns <code>true</code> if a Application job data is existing in Airavata
-// * @param jobId
-// * @return
-// * @throws org.apache.airavata.registry.api.exception.RegException
-// */
-// public boolean isApplicationJobExists(String jobId) throws AiravataAPIInvocationException;
-//
-// /**
-// * Adding data related to a new Application job submission
-// * @param job - the <code>jobId</code> cannot be <code>null</code>.
-// * @throws AiravataAPIInvocationException
-// */
-// public void addApplicationJob(ApplicationJob job) throws AiravataAPIInvocationException;
-//
-// /**
-// * Update data related to a existing Application job record in Airavata
-// * @param job - the <code>jobId</code> cannot be <code>null</code> and should already exist in Airavata
-// * @throws AiravataAPIInvocationException
-// */
-// public void updateApplicationJob(ApplicationJob job) throws AiravataAPIInvocationException;
-//
-// /**
-// * Update the status of the job
-// * @param jobId
-// * @param status
-// * @param statusUpdateTime
-// * @throws AiravataAPIInvocationException
-// */
-// public void updateApplicationJobStatus(String jobId, ApplicationJobStatus status, Date statusUpdateTime) throws AiravataAPIInvocationException;
-//
-// /**
-// * Update the status of the job for the current server time
-// * @param jobId
-// * @param status
-// * @throws org.apache.airavata.registry.api.exception.RegException
-// */
-// public void updateApplicationJobStatus(String jobId, ApplicationJobStatus status) throws AiravataAPIInvocationException;
-//
-// /**
-// * Update the job data. GFacProvider implementation should decide the job data. Typically it'll
-// * be a serialization of the submitted job query (eg: rsl for a GRAM job)
-// * @param jobId
-// * @param jobdata
-// * @throws AiravataAPIInvocationException
-// */
-// public void updateApplicationJobData(String jobId, String jobdata) throws AiravataAPIInvocationException;
-//
-// /**
-// * Update the time of job submission or job started executing
-// * @param jobId
-// * @param submitted
-// * @throws AiravataAPIInvocationException
-// */
-// public void updateApplicationJobSubmittedTime(String jobId, Date submitted) throws AiravataAPIInvocationException;
-//
-// /**
-// * Update the time of current job status is valid.
-// * @param jobId
-// * @param statusUpdateTime
-// * @throws AiravataAPIInvocationException
-// */
-// public void updateApplicationJobStatusUpdateTime(String jobId, Date statusUpdateTime) throws AiravataAPIInvocationException;
-//
-// /**
-// * Custom data field for users
-// * @param jobId
-// * @param metadata
-// * @throws AiravataAPIInvocationException
-// */
-// public void updateApplicationJobMetadata(String jobId, String metadata) throws AiravataAPIInvocationException;
-//
-// /**
-// * Retrieve the Application Job for the given job id
-// * @param jobId
-// * @return
-// * @throws AiravataAPIInvocationException
-// */
-// public ApplicationJob getApplicationJob(String jobId) throws AiravataAPIInvocationException;
-//
-// /**
-// * Retrieve a list of Application jobs executed for the given descriptors
-// * @param serviceDescriptionId - should be <code>null</code> if user does not care what service description the job corresponds to
-// * @param hostDescriptionId - should be <code>null</code> if user does not care what host description the job corresponds to
-// * @param applicationDescriptionId - should be <code>null</code> if user does not care what application description the job corresponds to
-// * @return
-// * @throws AiravataAPIInvocationException
-// */
-// public List<ApplicationJob> getApplicationJobsForDescriptors(String serviceDescriptionId, String hostDescriptionId, String applicationDescriptionId) throws AiravataAPIInvocationException;
-//
-// /**
-// * Retrieve a list of Application jobs executed for the given experiment credentials
-// * @param experimentId - should be <code>null</code> if user does not care what experiment the job corresponds to
-// * @param workflowExecutionId - - should be <code>null</code> if user does not care what workflow execution the job corresponds to
-// * @param nodeId - should be <code>null</code> if user does not care what node id the job corresponds to
-// * @return
-// * @throws AiravataAPIInvocationException
-// */
-// public List<ApplicationJob> getApplicationJobs(String experimentId, String workflowExecutionId, String nodeId) throws AiravataAPIInvocationException;
-//
-// /**
-// * Retrieve the list all the status updates for an application job.
-// * @param jobId - Application job id
-// * @return
-// * @throws AiravataAPIInvocationException
-// */
-// public List<ApplicationJobStatusData> getApplicationJobStatusHistory(String jobId) throws AiravataAPIInvocationException;
-//}
http://git-wip-us.apache.org/repos/asf/airavata/blob/32fff944/modules/airavata-client/src/main/java/org/apache/airavata/client/api/SSHAuthenticationSettings.java
----------------------------------------------------------------------
diff --git a/modules/airavata-client/src/main/java/org/apache/airavata/client/api/SSHAuthenticationSettings.java b/modules/airavata-client/src/main/java/org/apache/airavata/client/api/SSHAuthenticationSettings.java
deleted file mode 100644
index 2b8fa18..0000000
--- a/modules/airavata-client/src/main/java/org/apache/airavata/client/api/SSHAuthenticationSettings.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- *
- * 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.client.api;
-
-public interface SSHAuthenticationSettings {
- public String getAccessKeyId();
- public String getSecretAccessKey();
-
- public void setAccessKeyId(String accessKeyId);
- public void setSecretAccessKey(String secretAccessKey);
-}
http://git-wip-us.apache.org/repos/asf/airavata/blob/32fff944/modules/airavata-client/src/main/java/org/apache/airavata/client/api/SecuritySettings.java
----------------------------------------------------------------------
diff --git a/modules/airavata-client/src/main/java/org/apache/airavata/client/api/SecuritySettings.java b/modules/airavata-client/src/main/java/org/apache/airavata/client/api/SecuritySettings.java
deleted file mode 100644
index 06cf8c6..0000000
--- a/modules/airavata-client/src/main/java/org/apache/airavata/client/api/SecuritySettings.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- *
- * 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.client.api;
-
-import org.apache.airavata.client.api.exception.AiravataAPIInvocationException;
-
-public interface SecuritySettings {
- public AmazonWebServicesSettings getAmazonWSSettings() throws AiravataAPIInvocationException;
- public CredentialStoreSecuritySettings getCredentialStoreSecuritySettings() throws AiravataAPIInvocationException;
- public GridMyProxyRepositorySettings getGridMyProxyRepositorySettings() throws AiravataAPIInvocationException;
- public SSHAuthenticationSettings getSSHAuthenticationSettings() throws AiravataAPIInvocationException;
-}
http://git-wip-us.apache.org/repos/asf/airavata/blob/32fff944/modules/airavata-client/src/main/java/org/apache/airavata/client/api/UserManager.java
----------------------------------------------------------------------
diff --git a/modules/airavata-client/src/main/java/org/apache/airavata/client/api/UserManager.java b/modules/airavata-client/src/main/java/org/apache/airavata/client/api/UserManager.java
deleted file mode 100644
index 7487f7a..0000000
--- a/modules/airavata-client/src/main/java/org/apache/airavata/client/api/UserManager.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- *
- * 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.client.api;
-
-public interface UserManager {
- /**
- * Get the current user
- * @return
- */
- public String getAiravataUser();
-
-}