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/06/09 16:02:27 UTC

[1/2] airavata git commit: fixing distribution and some test classes

Repository: airavata
Updated Branches:
  refs/heads/master 144bb8f6d -> 63f6a53f6


http://git-wip-us.apache.org/repos/asf/airavata/blob/63f6a53f/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/resources/ApplicationInputResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/resources/ApplicationInputResource.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/resources/ApplicationInputResource.java
index 36c52a0..0244066 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/resources/ApplicationInputResource.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/resources/ApplicationInputResource.java
@@ -21,7 +21,7 @@ package org.apache.airavata.registry.core.app.catalog.resources;
 
 import org.apache.airavata.common.exception.ApplicationSettingsException;
 import org.apache.airavata.registry.core.app.catalog.model.AppInput_PK;
-import org.apache.airavata.registry.core.app.catalog.model.ApplicationInput;
+import org.apache.airavata.registry.core.app.catalog.model.ApplicationIntInput;
 import org.apache.airavata.registry.core.app.catalog.model.ApplicationInterface;
 import org.apache.airavata.registry.core.app.catalog.util.AppCatalogJPAUtils;
 import org.apache.airavata.registry.core.app.catalog.util.AppCatalogQueryGenerator;
@@ -108,7 +108,7 @@ public class ApplicationInputResource extends AppCatAbstractResource {
             generator.setParameter(AppInputConstants.INTERFACE_ID, ids.get(AppInputConstants.INTERFACE_ID));
             generator.setParameter(AppInputConstants.INPUT_KEY, ids.get(AppInputConstants.INPUT_KEY));
             Query q = generator.selectQuery(em);
-            ApplicationInput applicationInput = (ApplicationInput) q.getSingleResult();
+            ApplicationIntInput applicationInput = (ApplicationIntInput) q.getSingleResult();
             ApplicationInputResource applicationInputResource =
                     (ApplicationInputResource) AppCatalogJPAUtils.getResource(AppCatalogResourceType.APPLICATION_INPUT
                             , applicationInput);
@@ -143,7 +143,7 @@ public class ApplicationInputResource extends AppCatAbstractResource {
                 results = q.getResultList();
                 if (results.size() != 0) {
                     for (Object result : results) {
-                        ApplicationInput applicationInput = (ApplicationInput) result;
+                        ApplicationIntInput applicationInput = (ApplicationIntInput) result;
                         ApplicationInputResource applicationInputResource =
                                 (ApplicationInputResource) AppCatalogJPAUtils.getResource(
                                         AppCatalogResourceType.APPLICATION_INPUT, applicationInput);
@@ -156,7 +156,7 @@ public class ApplicationInputResource extends AppCatAbstractResource {
                 results = q.getResultList();
                 if (results.size() != 0) {
                     for (Object result : results) {
-                        ApplicationInput applicationInput = (ApplicationInput) result;
+                        ApplicationIntInput applicationInput = (ApplicationIntInput) result;
                         ApplicationInputResource applicationInputResource =
                                 (ApplicationInputResource) AppCatalogJPAUtils.getResource(
                                         AppCatalogResourceType.APPLICATION_INPUT, applicationInput);
@@ -169,7 +169,7 @@ public class ApplicationInputResource extends AppCatAbstractResource {
                 results = q.getResultList();
                 if (results.size() != 0) {
                     for (Object result : results) {
-                        ApplicationInput applicationInput = (ApplicationInput) result;
+                        ApplicationIntInput applicationInput = (ApplicationIntInput) result;
                         ApplicationInputResource applicationInputResource =
                                 (ApplicationInputResource) AppCatalogJPAUtils.getResource(
                                         AppCatalogResourceType.APPLICATION_INPUT, applicationInput);
@@ -223,7 +223,7 @@ public class ApplicationInputResource extends AppCatAbstractResource {
                 results = q.getResultList();
                 if (results.size() != 0) {
                     for (Object result : results) {
-                        ApplicationInput applicationInput = (ApplicationInput) result;
+                        ApplicationIntInput applicationInput = (ApplicationIntInput) result;
                         appInputResourceIDs.add(applicationInput.getInterfaceID());
                     }
                 }
@@ -233,7 +233,7 @@ public class ApplicationInputResource extends AppCatAbstractResource {
                 results = q.getResultList();
                 if (results.size() != 0) {
                     for (Object result : results) {
-                        ApplicationInput applicationInput = (ApplicationInput) result;
+                        ApplicationIntInput applicationInput = (ApplicationIntInput) result;
                         appInputResourceIDs.add(applicationInput.getInterfaceID());
                     }
                 }
@@ -243,7 +243,7 @@ public class ApplicationInputResource extends AppCatAbstractResource {
                 results = q.getResultList();
                 if (results.size() != 0) {
                     for (Object result : results) {
-                        ApplicationInput applicationInput = (ApplicationInput) result;
+                        ApplicationIntInput applicationInput = (ApplicationIntInput) result;
                         appInputResourceIDs.add(applicationInput.getInterfaceID());
                     }
                 }
@@ -273,13 +273,13 @@ public class ApplicationInputResource extends AppCatAbstractResource {
         EntityManager em = null;
         try {
             em = AppCatalogJPAUtils.getEntityManager();
-            ApplicationInput existingApplicationInput = em.find(ApplicationInput.class, new AppInput_PK(interfaceID, inputKey));
+            ApplicationIntInput existingApplicationInput = em.find(ApplicationIntInput.class, new AppInput_PK(interfaceID, inputKey));
             em.close();
-            ApplicationInput applicationInput;
+            ApplicationIntInput applicationInput;
             em = AppCatalogJPAUtils.getEntityManager();
             em.getTransaction().begin();
             if (existingApplicationInput == null) {
-                applicationInput = new ApplicationInput();
+                applicationInput = new ApplicationIntInput();
             } else {
             	applicationInput=existingApplicationInput;
             }
@@ -329,7 +329,7 @@ public class ApplicationInputResource extends AppCatAbstractResource {
         EntityManager em = null;
         try {
             em = AppCatalogJPAUtils.getEntityManager();
-            ApplicationInput applicationInput = em.find(ApplicationInput.class, new AppInput_PK(
+            ApplicationIntInput applicationInput = em.find(ApplicationIntInput.class, new AppInput_PK(
                     ids.get(AppInputConstants.INTERFACE_ID),
                     ids.get(AppInputConstants.INPUT_KEY)));
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/63f6a53f/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/resources/ApplicationOutputResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/resources/ApplicationOutputResource.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/resources/ApplicationOutputResource.java
index b78ed41..043bdb6 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/resources/ApplicationOutputResource.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/resources/ApplicationOutputResource.java
@@ -21,8 +21,8 @@ package org.apache.airavata.registry.core.app.catalog.resources;
 
 import org.apache.airavata.common.exception.ApplicationSettingsException;
 import org.apache.airavata.registry.core.app.catalog.model.AppOutput_PK;
+import org.apache.airavata.registry.core.app.catalog.model.ApplicationIntOutput;
 import org.apache.airavata.registry.core.app.catalog.model.ApplicationInterface;
-import org.apache.airavata.registry.core.app.catalog.model.ApplicationOutput;
 import org.apache.airavata.registry.core.app.catalog.util.AppCatalogJPAUtils;
 import org.apache.airavata.registry.core.app.catalog.util.AppCatalogQueryGenerator;
 import org.apache.airavata.registry.core.app.catalog.util.AppCatalogResourceType;
@@ -106,7 +106,7 @@ public class ApplicationOutputResource extends AppCatAbstractResource {
             generator.setParameter(AppOutputConstants.INTERFACE_ID, ids.get(AppOutputConstants.INTERFACE_ID));
             generator.setParameter(AppOutputConstants.OUTPUT_KEY, ids.get(AppOutputConstants.OUTPUT_KEY));
             Query q = generator.selectQuery(em);
-            ApplicationOutput applicationOutput = (ApplicationOutput) q.getSingleResult();
+            ApplicationIntOutput applicationOutput = (ApplicationIntOutput) q.getSingleResult();
             ApplicationOutputResource applicationOutputResource =
                     (ApplicationOutputResource) AppCatalogJPAUtils.getResource(AppCatalogResourceType.APPLICATION_OUTPUT
                             , applicationOutput);
@@ -141,7 +141,7 @@ public class ApplicationOutputResource extends AppCatAbstractResource {
                 results = q.getResultList();
                 if (results.size() != 0) {
                     for (Object result : results) {
-                        ApplicationOutput applicationOutput = (ApplicationOutput) result;
+                        ApplicationIntOutput applicationOutput = (ApplicationIntOutput) result;
                         ApplicationOutputResource applicationOutputResource =
                                 (ApplicationOutputResource) AppCatalogJPAUtils.getResource(
                                         AppCatalogResourceType.APPLICATION_OUTPUT, applicationOutput);
@@ -154,7 +154,7 @@ public class ApplicationOutputResource extends AppCatAbstractResource {
                 results = q.getResultList();
                 if (results.size() != 0) {
                     for (Object result : results) {
-                        ApplicationOutput applicationOutput = (ApplicationOutput) result;
+                        ApplicationIntOutput applicationOutput = (ApplicationIntOutput) result;
                         ApplicationOutputResource applicationOutputResource =
                                 (ApplicationOutputResource) AppCatalogJPAUtils.getResource(
                                         AppCatalogResourceType.APPLICATION_OUTPUT, applicationOutput);
@@ -167,7 +167,7 @@ public class ApplicationOutputResource extends AppCatAbstractResource {
                 results = q.getResultList();
                 if (results.size() != 0) {
                     for (Object result : results) {
-                        ApplicationOutput applicationOutput = (ApplicationOutput) result;
+                        ApplicationIntOutput applicationOutput = (ApplicationIntOutput) result;
                         ApplicationOutputResource applicationOutputResource =
                                 (ApplicationOutputResource) AppCatalogJPAUtils.getResource(
                                         AppCatalogResourceType.APPLICATION_OUTPUT, applicationOutput);
@@ -221,7 +221,7 @@ public class ApplicationOutputResource extends AppCatAbstractResource {
                 results = q.getResultList();
                 if (results.size() != 0) {
                     for (Object result : results) {
-                        ApplicationOutput applicationOutput = (ApplicationOutput) result;
+                        ApplicationIntOutput applicationOutput = (ApplicationIntOutput) result;
                         appOutputResourceIDs.add(applicationOutput.getInterfaceID());
                     }
                 }
@@ -232,7 +232,7 @@ public class ApplicationOutputResource extends AppCatAbstractResource {
                 results = q.getResultList();
                 if (results.size() != 0) {
                     for (Object result : results) {
-                        ApplicationOutput applicationOutput = (ApplicationOutput) result;
+                        ApplicationIntOutput applicationOutput = (ApplicationIntOutput) result;
                         appOutputResourceIDs.add(applicationOutput.getInterfaceID());
                     }
                 }
@@ -242,7 +242,7 @@ public class ApplicationOutputResource extends AppCatAbstractResource {
                 results = q.getResultList();
                 if (results.size() != 0) {
                     for (Object result : results) {
-                        ApplicationOutput applicationOutput = (ApplicationOutput) result;
+                        ApplicationIntOutput applicationOutput = (ApplicationIntOutput) result;
                         appOutputResourceIDs.add(applicationOutput.getInterfaceID());
                     }
                 }
@@ -272,15 +272,15 @@ public class ApplicationOutputResource extends AppCatAbstractResource {
         EntityManager em = null;
         try {
             em = AppCatalogJPAUtils.getEntityManager();
-            ApplicationOutput existingApplicationOutput = em.find(ApplicationOutput.class,
+            ApplicationIntOutput existingApplicationOutput = em.find(ApplicationIntOutput.class,
                     new AppOutput_PK(interfaceID, outputKey));
             em.close();
 
-            ApplicationOutput applicationOutput;
+            ApplicationIntOutput applicationOutput;
             em = AppCatalogJPAUtils.getEntityManager();
             em.getTransaction().begin();
             if (existingApplicationOutput == null) {
-                applicationOutput = new ApplicationOutput();
+                applicationOutput = new ApplicationIntOutput();
             } else {
                 applicationOutput = existingApplicationOutput;
             }
@@ -324,7 +324,7 @@ public class ApplicationOutputResource extends AppCatAbstractResource {
         EntityManager em = null;
         try {
             em = AppCatalogJPAUtils.getEntityManager();
-            ApplicationOutput applicationOutput = em.find(ApplicationOutput.class, new AppOutput_PK(
+            ApplicationIntOutput applicationOutput = em.find(ApplicationIntOutput.class, new AppOutput_PK(
                     ids.get(AppOutputConstants.INTERFACE_ID),
                     ids.get(AppOutputConstants.OUTPUT_KEY)));
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/63f6a53f/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/util/AppCatalogJPAUtils.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/util/AppCatalogJPAUtils.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/util/AppCatalogJPAUtils.java
index 7a40013..bd86bcb 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/util/AppCatalogJPAUtils.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/util/AppCatalogJPAUtils.java
@@ -28,10 +28,7 @@ import org.apache.airavata.registry.core.app.catalog.resources.*;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import javax.persistence.EntityManager;
-import javax.persistence.EntityManagerFactory;
-import javax.persistence.Persistence;
-import javax.persistence.PersistenceContext;
+import javax.persistence.*;
 import java.util.HashMap;
 import java.util.Map;
 
@@ -44,8 +41,10 @@ public class AppCatalogJPAUtils {
     private static final String APPCATALOG_JDBC_PWD = "appcatalog.jdbc.password";
     private static final String APPCATALOG_VALIDATION_QUERY = "appcatalog.validationQuery";
     private static final String JPA_CACHE_SIZE = "jpa.cache.size";
-    @PersistenceContext(unitName="appcatalog_data")
+    @PersistenceUnit(unitName="appcatalog_data")
     protected static EntityManagerFactory factory;
+    @PersistenceContext(unitName="appcatalog_data")
+    private static EntityManager appCatEntityManager;
 
     public static EntityManager getEntityManager() throws ApplicationSettingsException {
         if (factory == null) {
@@ -56,7 +55,6 @@ public class AppCatalogJPAUtils {
                     ",validationQuery=" + readServerProperties(APPCATALOG_VALIDATION_QUERY);
             System.out.println(connectionProperties);
             Map<String, String> properties = new HashMap<String, String>();
-            properties.put("persistenceXmlLocation", "META-INF/persistence.xml");
             properties.put("openjpa.ConnectionDriverName", "org.apache.commons.dbcp.BasicDataSource");
             properties.put("openjpa.ConnectionProperties", connectionProperties);
             properties.put("openjpa.DynamicEnhancementAgent", "true");
@@ -65,12 +63,13 @@ public class AppCatalogJPAUtils {
             properties.put("openjpa.QueryCache","true(CacheSize=" + Integer.valueOf(readServerProperties(JPA_CACHE_SIZE))  + ", SoftReferenceSize=0)");
             properties.put("openjpa.RemoteCommitProvider","sjvm");
             properties.put("openjpa.Log","DefaultLevel=INFO, Runtime=INFO, Tool=INFO, SQL=INFO");
-            properties.put("openjpa.jdbc.SynchronizeMappings", "buildSchema(ForeignKeys=true)");
+//            properties.put("openjpa.jdbc.SynchronizeMappings", "buildSchema(ForeignKeys=true)");
             properties.put("openjpa.jdbc.QuerySQLCache", "false");
             properties.put("openjpa.ConnectionFactoryProperties", "PrettyPrint=true, PrettyPrintLineLength=72, PrintParameters=true, MaxActive=10, MaxIdle=5, MinIdle=2, MaxWait=31536000,  autoReconnect=true");
             factory = Persistence.createEntityManagerFactory(PERSISTENCE_UNIT_NAME, properties);
         }
-        return factory.createEntityManager();
+        appCatEntityManager = factory.createEntityManager();
+        return appCatEntityManager;
     }
 
     private static String readServerProperties (String propertyName) throws ApplicationSettingsException {
@@ -259,8 +258,8 @@ public class AppCatalogJPAUtils {
                     throw new IllegalArgumentException("Object should be a AppModuleMapping.");
                 }
             case APPLICATION_OUTPUT:
-                if (o instanceof ApplicationOutput){
-                    return createApplicationOutput((ApplicationOutput) o);
+                if (o instanceof ApplicationIntOutput){
+                    return createApplicationOutput((ApplicationIntOutput) o);
                 }else {
                     logger.error("Object should be a ApplicationOutput.", new IllegalArgumentException());
                     throw new IllegalArgumentException("Object should be a ApplicationOutput.");
@@ -280,8 +279,8 @@ public class AppCatalogJPAUtils {
                     throw new IllegalArgumentException("Object should be a Compute Resource Preference.");
                 }
             case APPLICATION_INPUT:
-                if (o instanceof ApplicationInput){
-                    return createApplicationInput((ApplicationInput) o);
+                if (o instanceof ApplicationIntInput){
+                    return createApplicationInput((ApplicationIntInput) o);
                 }else {
                     logger.error("Object should be a ApplicationInput.", new IllegalArgumentException());
                     throw new IllegalArgumentException("Object should be a ApplicationInput.");
@@ -776,7 +775,7 @@ public class AppCatalogJPAUtils {
         return resource;
     }
 
-    private static AppCatalogResource createApplicationInput(ApplicationInput o) {
+    private static AppCatalogResource createApplicationInput(ApplicationIntInput o) {
         ApplicationInputResource resource = new ApplicationInputResource();
         if (o != null){
             resource.setInterfaceID(o.getInterfaceID());
@@ -818,7 +817,7 @@ public class AppCatalogJPAUtils {
         return resource;
     }
 
-    private static AppCatalogResource createApplicationOutput(ApplicationOutput o) {
+    private static AppCatalogResource createApplicationOutput(ApplicationIntOutput o) {
         ApplicationOutputResource resource = new ApplicationOutputResource();
         if (o != null){
             resource.setInterfaceID(o.getInterfaceID());

http://git-wip-us.apache.org/repos/asf/airavata/blob/63f6a53f/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/ExpCatResourceUtils.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/ExpCatResourceUtils.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/ExpCatResourceUtils.java
index 7aa3b62..6b2aa5c 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/ExpCatResourceUtils.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/ExpCatResourceUtils.java
@@ -36,18 +36,21 @@ import java.util.Map;
 public class ExpCatResourceUtils {
     private final static Logger logger = LoggerFactory.getLogger(ExpCatResourceUtils.class);
     private static final String PERSISTENCE_UNIT_NAME = "experiment_data";
+    @PersistenceUnit(unitName="experiment_data")
+    protected static EntityManagerFactory expCatFactory;
     @PersistenceContext(unitName="experiment_data")
-    protected static EntityManagerFactory factory;
+    private static EntityManager expCatEntityManager;
 
     public static void reset(){
-    	factory=null;
+        expCatFactory=null;
     }
     
     public static EntityManager getEntityManager(){
-        if (factory == null) {
-            String connectionProperties = "DriverClassName=" + Utils.getJDBCDriver() + "," + "Url=" + Utils.getJDBCURL() + "?autoReconnect=true,," +
-                    "Username=" + Utils.getJDBCUser() + "," + "Password=" + Utils.getJDBCPassword() + ",validationQuery=" +
-            Utils.getValidationQuery();
+        if (expCatFactory == null) {
+            String connectionProperties = "DriverClassName=" + Utils.getJDBCDriver() + "," + "Url=" +
+                    Utils.getJDBCURL() + "?autoReconnect=true," +
+                    "Username=" + Utils.getJDBCUser() + "," + "Password=" + Utils.getJDBCPassword() +
+                    ",validationQuery=" + Utils.getValidationQuery();
             System.out.println(connectionProperties);
             Map<String, String> properties = new HashMap<String, String>();
             properties.put("openjpa.ConnectionDriverName", "org.apache.commons.dbcp.BasicDataSource");
@@ -58,17 +61,13 @@ public class ExpCatResourceUtils {
             properties.put("openjpa.QueryCache","" + Utils.isCachingEnabled() + "(CacheSize=" + Utils.getJPACacheSize() + ", SoftReferenceSize=0)");
             properties.put("openjpa.RemoteCommitProvider","sjvm");
             properties.put("openjpa.Log","DefaultLevel=INFO, Runtime=INFO, Tool=INFO, SQL=INFO");
-            properties.put("openjpa.jdbc.DBDictionary","SupportsMultipleNontransactionalResultSets=false");
-//            properties.put("openjpa.ReadLockLevel", "none");
-//            properties.put("openjpa.WriteLockLevel", "none");
-//            properties.put("openjpa.LockTimeout", "30000");
-//            properties.put("openjpa.LockManager", "none");
-            properties.put("openjpa.jdbc.SynchronizeMappings", "buildSchema(ForeignKeys=true)");
+//            properties.put("openjpa.jdbc.SynchronizeMappings", "buildSchema(ForeignKeys=true)");
             properties.put("openjpa.ConnectionFactoryProperties", "PrettyPrint=true, PrettyPrintLineLength=72, PrintParameters=true, MaxActive=10, MaxIdle=5, MinIdle=2, MaxWait=31536000,  autoReconnect=true");
 			properties.put("openjpa.jdbc.QuerySQLCache", "false");
-            factory = Persistence.createEntityManagerFactory(PERSISTENCE_UNIT_NAME, properties);
+            expCatFactory = Persistence.createEntityManagerFactory(PERSISTENCE_UNIT_NAME, properties);
         }
-		return factory.createEntityManager();
+        expCatEntityManager = expCatFactory.createEntityManager();
+        return expCatEntityManager;
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/airavata/blob/63f6a53f/modules/registry/registry-core/src/main/resources/META-INF/persistence.xml
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/resources/META-INF/persistence.xml b/modules/registry/registry-core/src/main/resources/META-INF/persistence.xml
index 438aab4..89ecd0e 100644
--- a/modules/registry/registry-core/src/main/resources/META-INF/persistence.xml
+++ b/modules/registry/registry-core/src/main/resources/META-INF/persistence.xml
@@ -46,8 +46,8 @@
         <class>org.apache.airavata.registry.core.app.catalog.model.AppEnvironment</class>
         <class>org.apache.airavata.registry.core.app.catalog.model.ApplicationInterface</class>
         <class>org.apache.airavata.registry.core.app.catalog.model.AppModuleMapping</class>
-        <class>org.apache.airavata.registry.core.app.catalog.model.ApplicationInput</class>
-        <class>org.apache.airavata.registry.core.app.catalog.model.ApplicationOutput</class>
+        <class>org.apache.airavata.registry.core.app.catalog.model.ApplicationIntInput</class>
+        <class>org.apache.airavata.registry.core.app.catalog.model.ApplicationIntOutput</class>
         <class>org.apache.airavata.registry.core.app.catalog.model.GatewayProfile</class>
         <class>org.apache.airavata.registry.core.app.catalog.model.ComputeResourcePreference</class>
         <class>org.apache.airavata.registry.core.app.catalog.model.BatchQueue</class>


[2/2] airavata git commit: fixing distribution and some test classes

Posted by ch...@apache.org.
fixing distribution and some test classes


Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/63f6a53f
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/63f6a53f
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/63f6a53f

Branch: refs/heads/master
Commit: 63f6a53f6943e9c0bb101debebba8b97126a4744
Parents: 144bb8f
Author: Chathuri Wimalasena <ch...@apache.org>
Authored: Tue Jun 9 10:02:19 2015 -0400
Committer: Chathuri Wimalasena <ch...@apache.org>
Committed: Tue Jun 9 10:02:19 2015 -0400

----------------------------------------------------------------------
 .../handler/AiravataServerHandlerTest.java      |   7 +-
 .../api/server/handler/utils/AppCatInit.java    | 320 +++++++++++++
 .../api/server/handler/utils/ExpCatInit.java    | 333 ++++++++++++++
 .../src/test/resources/appcatalog-derby.sql     | 460 +++++++++++++++++++
 .../src/test/resources/expcatalog-derby.sql     | 391 ++++++++++++++++
 distribution/src/main/assembly/bin-assembly.xml |   2 +-
 .../main/resources/airavata-server.properties   |   2 +-
 modules/registry/registry-core/pom.xml          |   4 +-
 .../app/catalog/model/ApplicationInput.java     | 166 -------
 .../app/catalog/model/ApplicationIntInput.java  | 166 +++++++
 .../app/catalog/model/ApplicationIntOutput.java | 146 ++++++
 .../app/catalog/model/ApplicationOutput.java    | 146 ------
 .../resources/ApplicationInputResource.java     |  24 +-
 .../resources/ApplicationOutputResource.java    |  24 +-
 .../app/catalog/util/AppCatalogJPAUtils.java    |  27 +-
 .../experiment/catalog/ExpCatResourceUtils.java |  27 +-
 .../src/main/resources/META-INF/persistence.xml |   4 +-
 17 files changed, 1878 insertions(+), 371 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/63f6a53f/airavata-api/airavata-api-server/src/test/java/org/apache/airavata/api/server/handler/AiravataServerHandlerTest.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-api-server/src/test/java/org/apache/airavata/api/server/handler/AiravataServerHandlerTest.java b/airavata-api/airavata-api-server/src/test/java/org/apache/airavata/api/server/handler/AiravataServerHandlerTest.java
index c3154a6..b67a3f8 100644
--- a/airavata-api/airavata-api-server/src/test/java/org/apache/airavata/api/server/handler/AiravataServerHandlerTest.java
+++ b/airavata-api/airavata-api-server/src/test/java/org/apache/airavata/api/server/handler/AiravataServerHandlerTest.java
@@ -21,6 +21,8 @@
 package org.apache.airavata.api.server.handler;
 
 import junit.framework.Assert;
+import org.apache.airavata.api.server.handler.utils.AppCatInit;
+import org.apache.airavata.api.server.handler.utils.ExpCatInit;
 import org.apache.airavata.api.server.util.RegistryInitUtil;
 import org.apache.airavata.common.utils.AiravataUtils;
 import org.apache.airavata.model.appcatalog.appinterface.InputDataObjectType;
@@ -48,7 +50,10 @@ public class AiravataServerHandlerTest {
 
     @BeforeClass
     public static void setupBeforeClass() throws Exception{
-        RegistryInitUtil.initializeDB();
+        AppCatInit appCatInit = new AppCatInit("appcatalog-derby.sql");
+        appCatInit.initializeDB();
+        ExpCatInit expCatInit = new ExpCatInit("appcatalog-derby.sql");
+        expCatInit.initializeDB();
         airavataServerHandler = new AiravataServerHandler();
 
         Gateway gateway = new Gateway();

http://git-wip-us.apache.org/repos/asf/airavata/blob/63f6a53f/airavata-api/airavata-api-server/src/test/java/org/apache/airavata/api/server/handler/utils/AppCatInit.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-api-server/src/test/java/org/apache/airavata/api/server/handler/utils/AppCatInit.java b/airavata-api/airavata-api-server/src/test/java/org/apache/airavata/api/server/handler/utils/AppCatInit.java
new file mode 100644
index 0000000..86cb1ba
--- /dev/null
+++ b/airavata-api/airavata-api-server/src/test/java/org/apache/airavata/api/server/handler/utils/AppCatInit.java
@@ -0,0 +1,320 @@
+/*
+ *
+ * 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.api.server.handler.utils;
+
+import org.apache.airavata.common.exception.ApplicationSettingsException;
+import org.apache.airavata.common.utils.ServerSettings;
+import org.apache.derby.drda.NetworkServerControl;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.net.InetAddress;
+import java.net.URI;
+import java.sql.*;
+import java.util.StringTokenizer;
+
+public class AppCatInit {
+    private static final Logger logger = LoggerFactory.getLogger(AppCatInit.class);
+    public static final String DERBY_SERVER_MODE_SYS_PROPERTY = "derby.drda.startNetworkServer";
+    public  String scriptName = "appcatalog-derby.sql";
+    private NetworkServerControl server;
+    private static final String delimiter = ";";
+    public static final String COMPUTE_RESOURCE_TABLE = "COMPUTE_RESOURCE";
+    private String jdbcUrl = null;
+    private String jdbcDriver = null;
+    private String jdbcUser = null;
+    private String jdbcPassword = null;
+
+    public AppCatInit(String scriptName) {
+        this.scriptName = scriptName;
+    }
+
+    public static boolean checkStringBufferEndsWith(StringBuffer buffer, String suffix) {
+        if (suffix.length() > buffer.length()) {
+            return false;
+        }
+        // this loop is done on purpose to avoid memory allocation performance
+        // problems on various JDKs
+        // StringBuffer.lastIndexOf() was introduced in jdk 1.4 and
+        // implementation is ok though does allocation/copying
+        // StringBuffer.toString().endsWith() does massive memory
+        // allocation/copying on JDK 1.5
+        // See http://issues.apache.org/bugzilla/show_bug.cgi?id=37169
+        int endIndex = suffix.length() - 1;
+        int bufferIndex = buffer.length() - 1;
+        while (endIndex >= 0) {
+            if (buffer.charAt(bufferIndex) != suffix.charAt(endIndex)) {
+                return false;
+            }
+            bufferIndex--;
+            endIndex--;
+        }
+        return true;
+    }
+
+    private static boolean isServerStarted(NetworkServerControl server, int ntries)
+    {
+        for (int i = 1; i <= ntries; i ++)
+        {
+            try {
+                Thread.sleep(500);
+                server.ping();
+                return true;
+            }
+            catch (Exception e) {
+                if (i == ntries)
+                    return false;
+            }
+        }
+        return false;
+    }
+
+    public void initializeDB() {
+
+        try{
+            jdbcDriver = ServerSettings.getSetting("appcatalog.jdbc.driver");
+            jdbcUrl = ServerSettings.getSetting("appcatalog.jdbc.url");
+            jdbcUser = ServerSettings.getSetting("appcatalog.jdbc.user");
+            jdbcPassword = ServerSettings.getSetting("appcatalog.jdbc.password");
+            jdbcUrl = jdbcUrl + "?" + "user=" + jdbcUser + "&" + "password=" + jdbcPassword;
+        } catch (ApplicationSettingsException e) {
+            logger.error("Unable to read properties", e);
+        }
+
+        startDerbyInServerMode();
+        if(!isServerStarted(server, 20)){
+           throw new RuntimeException("Derby server cound not started within five seconds...");
+        }
+//      startDerbyInEmbeddedMode();
+
+        Connection conn = null;
+        try {
+            Class.forName(jdbcDriver).newInstance();
+            conn = DriverManager.getConnection(jdbcUrl, jdbcUser, jdbcPassword);
+            if (!isDatabaseStructureCreated(COMPUTE_RESOURCE_TABLE, conn)) {
+                executeSQLScript(conn);
+                logger.info("New Database created for App Catalog !!!");
+            } else {
+                logger.debug("Database already created for App Catalog!");
+            }
+        } catch (Exception e) {
+            logger.error(e.getMessage(), e);
+            throw new RuntimeException("Database failure", e);
+        } finally {
+            try {
+                if (conn != null){
+                    if (!conn.getAutoCommit()) {
+                        conn.commit();
+                    }
+                    conn.close();
+                }
+            } catch (SQLException e) {
+                logger.error(e.getMessage(), e);
+            }
+        }
+    }
+
+    public static boolean isDatabaseStructureCreated(String tableName, Connection conn) {
+        try {
+            System.out.println("Running a query to test the database tables existence.");
+            // check whether the tables are already created with a query
+            Statement statement = null;
+            try {
+                statement = conn.createStatement();
+                ResultSet rs = statement.executeQuery("select * from " + tableName);
+                if (rs != null) {
+                    rs.close();
+                }
+            } finally {
+                try {
+                    if (statement != null) {
+                        statement.close();
+                    }
+                } catch (SQLException e) {
+                    return false;
+                }
+            }
+        } catch (SQLException e) {
+            return false;
+        }
+
+        return true;
+    }
+
+    private void executeSQLScript(Connection conn) throws Exception {
+        StringBuffer sql = new StringBuffer();
+        BufferedReader reader = null;
+        try{
+
+        InputStream inputStream = this.getClass().getClassLoader().getResourceAsStream(scriptName);
+        reader = new BufferedReader(new InputStreamReader(inputStream));
+        String line;
+        while ((line = reader.readLine()) != null) {
+            line = line.trim();
+            if (line.startsWith("//")) {
+                continue;
+            }
+            if (line.startsWith("--")) {
+                continue;
+            }
+            StringTokenizer st = new StringTokenizer(line);
+            if (st.hasMoreTokens()) {
+                String token = st.nextToken();
+                if ("REM".equalsIgnoreCase(token)) {
+                    continue;
+                }
+            }
+            sql.append(" ").append(line);
+
+            // SQL defines "--" as a comment to EOL
+            // and in Oracle it may contain a hint
+            // so we cannot just remove it, instead we must end it
+            if (line.indexOf("--") >= 0) {
+                sql.append("\n");
+            }
+            if ((checkStringBufferEndsWith(sql, delimiter))) {
+                executeSQL(sql.substring(0, sql.length() - delimiter.length()), conn);
+                sql.replace(0, sql.length(), "");
+            }
+        }
+        // Catch any statements not followed by ;
+        if (sql.length() > 0) {
+            executeSQL(sql.toString(), conn);
+        }
+        }catch (IOException e){
+            logger.error("Error occurred while executing SQL script for creating Airavata database", e);
+            throw new Exception("Error occurred while executing SQL script for creating Airavata database", e);
+        }finally {
+            if (reader != null) {
+                reader.close();
+            }
+
+        }
+
+    }
+
+    private static void executeSQL(String sql, Connection conn) throws Exception {
+        // Check and ignore empty statements
+        if ("".equals(sql.trim())) {
+            return;
+        }
+
+        Statement statement = null;
+        try {
+            logger.debug("SQL : " + sql);
+
+            boolean ret;
+            int updateCount = 0, updateCountTotal = 0;
+            statement = conn.createStatement();
+            ret = statement.execute(sql);
+            updateCount = statement.getUpdateCount();
+            do {
+                if (!ret) {
+                    if (updateCount != -1) {
+                        updateCountTotal += updateCount;
+                    }
+                }
+                ret = statement.getMoreResults();
+                if (ret) {
+                    updateCount = statement.getUpdateCount();
+                }
+            } while (ret);
+
+            logger.debug(sql + " : " + updateCountTotal + " rows affected");
+
+            SQLWarning warning = conn.getWarnings();
+            while (warning != null) {
+                logger.warn(warning + " sql warning");
+                warning = warning.getNextWarning();
+            }
+            conn.clearWarnings();
+        } catch (SQLException e) {
+            if (e.getSQLState().equals("X0Y32")) {
+                // eliminating the table already exception for the derby
+                // database
+                logger.info("Table Already Exists", e);
+            } else {
+                throw new Exception("Error occurred while executing : " + sql, e);
+            }
+        } finally {
+            if (statement != null) {
+                try {
+                    statement.close();
+                } catch (SQLException e) {
+                    logger.error("Error occurred while closing result set.", e);
+                }
+            }
+        }
+    }
+
+    private void startDerbyInServerMode() {
+        try {
+            System.setProperty(DERBY_SERVER_MODE_SYS_PROPERTY, "true");
+            server = new NetworkServerControl(InetAddress.getByName("0.0.0.0"),
+                    20000,
+                    jdbcUser, jdbcPassword);
+            java.io.PrintWriter consoleWriter = new java.io.PrintWriter(System.out, true);
+            server.start(consoleWriter);
+        } catch (IOException e) {
+            logger.error("Unable to start Apache derby in the server mode! Check whether " +
+                    "specified port is available");
+        } catch (Exception e) {
+            logger.error("Unable to start Apache derby in the server mode! Check whether " +
+                    "specified port is available");
+        }
+
+    }
+
+    public static int getPort(String jdbcURL){
+        try{
+            String cleanURI = jdbcURL.substring(5);
+            URI uri = URI.create(cleanURI);
+            return uri.getPort();
+        } catch (Exception e) {
+            logger.error(e.getMessage(), e);
+            return -1;
+        }
+    }
+
+    private void startDerbyInEmbeddedMode(){
+        try {
+            Class.forName("org.apache.derby.jdbc.EmbeddedDriver");
+            DriverManager.getConnection("jdbc:derby:memory:unit-testing-jpa;create=true").close();
+        } catch (ClassNotFoundException e) {
+            logger.error(e.getMessage(), e);
+        } catch (SQLException e) {
+            logger.error(e.getMessage(), e);
+        }
+    }
+
+    public void stopDerbyServer() {
+        try {
+            server.shutdown();
+        } catch (Exception e) {
+            logger.error(e.getMessage(), e);
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/63f6a53f/airavata-api/airavata-api-server/src/test/java/org/apache/airavata/api/server/handler/utils/ExpCatInit.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-api-server/src/test/java/org/apache/airavata/api/server/handler/utils/ExpCatInit.java b/airavata-api/airavata-api-server/src/test/java/org/apache/airavata/api/server/handler/utils/ExpCatInit.java
new file mode 100644
index 0000000..20643b5
--- /dev/null
+++ b/airavata-api/airavata-api-server/src/test/java/org/apache/airavata/api/server/handler/utils/ExpCatInit.java
@@ -0,0 +1,333 @@
+/*
+ *
+ * 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.api.server.handler.utils;
+
+import org.apache.airavata.common.exception.ApplicationSettingsException;
+import org.apache.airavata.common.utils.ServerSettings;
+import org.apache.airavata.registry.core.app.catalog.util.AppCatalogJPAUtils;
+import org.apache.airavata.registry.core.experiment.catalog.ExpCatResourceUtils;
+import org.apache.airavata.registry.core.experiment.catalog.ResourceType;
+import org.apache.airavata.registry.core.experiment.catalog.impl.RegistryFactory;
+import org.apache.airavata.registry.core.experiment.catalog.resources.*;
+import org.apache.airavata.registry.cpi.*;
+import org.apache.derby.drda.NetworkServerControl;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.persistence.EntityManager;
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.net.InetAddress;
+import java.sql.*;
+import java.util.StringTokenizer;
+
+public class ExpCatInit {
+    private static final Logger logger = LoggerFactory.getLogger(ExpCatInit.class);
+    public static final String DERBY_SERVER_MODE_SYS_PROPERTY = "derby.drda.startNetworkServer";
+    public  String expCatScript = "expcatalog-derby.sql";
+    private NetworkServerControl server;
+    private static final String delimiter = ";";
+    public static final String PERSISTANT_DATA = "Configuration";
+
+    public ExpCatInit(String scriptName) {
+        this.expCatScript = scriptName;
+    }
+
+    public static boolean checkStringBufferEndsWith(StringBuffer buffer, String suffix) {
+        if (suffix.length() > buffer.length()) {
+            return false;
+        }
+        // this loop is done on purpose to avoid memory allocation performance
+        // problems on various JDKs
+        // StringBuffer.lastIndexOf() was introduced in jdk 1.4 and
+        // implementation is ok though does allocation/copying
+        // StringBuffer.toString().endsWith() does massive memory
+        // allocation/copying on JDK 1.5
+        // See http://issues.apache.org/bugzilla/show_bug.cgi?id=37169
+        int endIndex = suffix.length() - 1;
+        int bufferIndex = buffer.length() - 1;
+        while (endIndex >= 0) {
+            if (buffer.charAt(bufferIndex) != suffix.charAt(endIndex)) {
+                return false;
+            }
+            bufferIndex--;
+            endIndex--;
+        }
+        return true;
+    }
+
+    private static boolean isServerStarted(NetworkServerControl server, int ntries)
+    {
+        for (int i = 1; i <= ntries; i ++)
+        {
+            try {
+                Thread.sleep(500);
+                server.ping();
+                return true;
+            }
+            catch (Exception e) {
+                if (i == ntries)
+                    return false;
+            }
+        }
+        return false;
+    }
+
+    public void initializeDB() throws SQLException{
+        String jdbcUrl = null;
+        String jdbcUser = null;
+        String jdbcPassword = null;
+        try{
+            jdbcUrl = ServerSettings.getSetting("registry.jdbc.url");
+            jdbcUser = ServerSettings.getSetting("registry.jdbc.user");
+            jdbcPassword = ServerSettings.getSetting("registry.jdbc.password");
+            jdbcUrl = jdbcUrl + "?" + "user=" + jdbcUser + "&" + "password=" + jdbcPassword;
+        } catch (ApplicationSettingsException e) {
+            logger.error("Unable to read properties", e);
+        }
+        startDerbyInServerMode();
+        if(!isServerStarted(server, 20)){
+           throw new RuntimeException("Derby server cound not started within five seconds...");
+        }
+
+        Connection conn = null;
+        try {
+            Class.forName(Utils.getJDBCDriver()).newInstance();
+            conn = DriverManager.getConnection(jdbcUrl, jdbcUser, jdbcPassword);
+            if (!isDatabaseStructureCreated(PERSISTANT_DATA, conn)) {
+                executeSQLScript(conn);
+                logger.info("New Database created for Exp Catalog");
+            } else {
+                logger.debug("Database already created for Exp Catalog!");
+            }
+        } catch (Exception e) {
+            logger.error(e.getMessage(), e);
+            throw new RuntimeException("Database failure", e);
+        } finally {
+            try {
+                if (conn != null){
+                    if (!conn.getAutoCommit()) {
+                        conn.commit();
+                    }
+                    conn.close();
+                }
+            } catch (SQLException e) {
+                logger.error(e.getMessage(), e);
+            }
+        }
+
+        try{
+            GatewayResource gatewayResource = new GatewayResource();
+            gatewayResource.setGatewayId(ServerSettings.getSetting("default.registry.gateway"));
+            gatewayResource.setGatewayName(ServerSettings.getSetting("default.registry.gateway"));
+            gatewayResource.setDomain("test-domain");
+            gatewayResource.setEmailAddress("test-email");
+            gatewayResource.save();
+            
+            UserResource userResource = new UserResource();
+            userResource.setUserName(ServerSettings.getSetting("default.registry.user"));
+            userResource.setPassword(ServerSettings.getSetting("default.registry.password"));
+            userResource.save();
+
+            WorkerResource workerResource = (WorkerResource) gatewayResource.create(ResourceType.GATEWAY_WORKER);
+            workerResource.setUser(userResource.getUserName());
+            workerResource.save();
+            
+            ProjectResource projectResource = (ProjectResource)workerResource.create(ResourceType.PROJECT);
+            projectResource.setGatewayId(gatewayResource.getGatewayId());
+            projectResource.setId("default");
+            projectResource.setName("default");
+            projectResource.setWorker(workerResource);
+            projectResource.save();
+        
+          
+        } catch (ApplicationSettingsException e) {
+            logger.error("Unable to read properties", e);
+            throw new SQLException(e.getMessage(), e);
+        } catch (RegistryException e) {
+            logger.error("Unable to save data to registry", e);
+            throw new SQLException(e.getMessage(), e);
+        }
+    }
+
+    public static boolean isDatabaseStructureCreated(String tableName, Connection conn) {
+        try {
+            System.out.println("Running a query to test the database tables existence.");
+            // check whether the tables are already created with a query
+            Statement statement = null;
+            try {
+                statement = conn.createStatement();
+                ResultSet rs = statement.executeQuery("select * from " + tableName);
+                if (rs != null) {
+                    rs.close();
+                }
+            } finally {
+                try {
+                    if (statement != null) {
+                        statement.close();
+                    }
+                } catch (SQLException e) {
+                    return false;
+                }
+            }
+        } catch (SQLException e) {
+            return false;
+        }
+
+        return true;
+    }
+
+    private void executeSQLScript(Connection conn) throws Exception {
+        StringBuffer expCatsql = new StringBuffer();
+        BufferedReader expCatReader = null;
+        try{
+
+        InputStream expCatStream = this.getClass().getClassLoader().getResourceAsStream(expCatScript);
+        expCatReader = new BufferedReader(new InputStreamReader(expCatStream));
+        String line;
+        while ((line = expCatReader.readLine()) != null) {
+            line = line.trim();
+            if (line.startsWith("//")) {
+                continue;
+            }
+            if (line.startsWith("--")) {
+                continue;
+            }
+            StringTokenizer st = new StringTokenizer(line);
+            if (st.hasMoreTokens()) {
+                String token = st.nextToken();
+                if ("REM".equalsIgnoreCase(token)) {
+                    continue;
+                }
+            }
+            expCatsql.append(" ").append(line);
+
+            // SQL defines "--" as a comment to EOL
+            // and in Oracle it may contain a hint
+            // so we cannot just remove it, instead we must end it
+            if (line.indexOf("--") >= 0) {
+                expCatsql.append("\n");
+            }
+            if ((checkStringBufferEndsWith(expCatsql, delimiter))) {
+                executeSQL(expCatsql.substring(0, expCatsql.length() - delimiter.length()), conn);
+                expCatsql.replace(0, expCatsql.length(), "");
+            }
+        }
+        // Catch any statements not followed by ;
+        if (expCatsql.length() > 0) {
+            executeSQL(expCatsql.toString(), conn);
+        }
+        }catch (IOException e){
+            logger.error("Error occurred while executing SQL script for creating Airavata database", e);
+            throw new Exception("Error occurred while executing SQL script for creating Airavata database", e);
+        }finally {
+            if (expCatReader != null) {
+                expCatReader.close();
+            }
+
+        }
+
+    }
+
+    private static void executeSQL(String sql, Connection conn) throws Exception {
+        // Check and ignore empty statements
+        if ("".equals(sql.trim())) {
+            return;
+        }
+
+        Statement statement = null;
+        try {
+            logger.debug("SQL : " + sql);
+
+            boolean ret;
+            int updateCount = 0, updateCountTotal = 0;
+            statement = conn.createStatement();
+            ret = statement.execute(sql);
+            updateCount = statement.getUpdateCount();
+            do {
+                if (!ret) {
+                    if (updateCount != -1) {
+                        updateCountTotal += updateCount;
+                    }
+                }
+                ret = statement.getMoreResults();
+                if (ret) {
+                    updateCount = statement.getUpdateCount();
+                }
+            } while (ret);
+
+            logger.debug(sql + " : " + updateCountTotal + " rows affected");
+
+            SQLWarning warning = conn.getWarnings();
+            while (warning != null) {
+                logger.warn(warning + " sql warning");
+                warning = warning.getNextWarning();
+            }
+            conn.clearWarnings();
+        } catch (SQLException e) {
+            if (e.getSQLState().equals("X0Y32")) {
+                // eliminating the table already exception for the derby
+                // database
+                logger.info("Table Already Exists", e);
+            } else {
+                throw new Exception("Error occurred while executing : " + sql, e);
+            }
+        } finally {
+            if (statement != null) {
+                try {
+                    statement.close();
+                } catch (SQLException e) {
+                    logger.error("Error occurred while closing result set.", e);
+                }
+            }
+        }
+    }
+
+    private void startDerbyInServerMode() {
+        try {
+            System.setProperty(DERBY_SERVER_MODE_SYS_PROPERTY, "true");
+            server = new NetworkServerControl(InetAddress.getByName(Utils.getHost()),
+                    20000,
+                    Utils.getJDBCUser(), Utils.getJDBCPassword());
+            java.io.PrintWriter consoleWriter = new java.io.PrintWriter(System.out, true);
+            server.start(consoleWriter);
+        } catch (IOException e) {
+            logger.error("Unable to start Apache derby in the server mode! Check whether " +
+                    "specified port is available");
+        } catch (Exception e) {
+            logger.error("Unable to start Apache derby in the server mode! Check whether " +
+                    "specified port is available");
+        }
+
+    }
+
+    public void stopDerbyServer() throws SQLException{
+        try {
+            server.shutdown();
+        } catch (Exception e) {
+            logger.error(e.getMessage(), e);
+            throw new SQLException("Error while stopping derby server", e);
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/63f6a53f/airavata-api/airavata-api-server/src/test/resources/appcatalog-derby.sql
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-api-server/src/test/resources/appcatalog-derby.sql b/airavata-api/airavata-api-server/src/test/resources/appcatalog-derby.sql
new file mode 100644
index 0000000..fc24d83
--- /dev/null
+++ b/airavata-api/airavata-api-server/src/test/resources/appcatalog-derby.sql
@@ -0,0 +1,460 @@
+/*
+ *
+ * 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.
+ *
+ */
+
+CREATE TABLE COMPUTE_RESOURCE
+(
+        RESOURCE_ID VARCHAR (255) NOT NULL,
+        HOST_NAME VARCHAR (255) NOT NULL,
+        RESOURCE_DESCRIPTION VARCHAR (255),
+        CREATION_TIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
+        UPDATE_TIME TIMESTAMP DEFAULT '0000-00-00 00:00:00',
+        MAX_MEMORY_NODE INTEGER,
+        PRIMARY KEY (RESOURCE_ID)
+);
+
+CREATE TABLE HOST_ALIAS
+(
+         RESOURCE_ID VARCHAR(255),
+         ALIAS VARCHAR(255),
+         PRIMARY KEY(RESOURCE_ID,ALIAS),
+         FOREIGN KEY (RESOURCE_ID) REFERENCES COMPUTE_RESOURCE(RESOURCE_ID) ON DELETE CASCADE
+);
+
+CREATE TABLE HOST_IPADDRESS
+(
+         RESOURCE_ID VARCHAR(255),
+         IP_ADDRESS VARCHAR(255),
+         PRIMARY KEY(RESOURCE_ID,IP_ADDRESS),
+         FOREIGN KEY (RESOURCE_ID) REFERENCES COMPUTE_RESOURCE(RESOURCE_ID) ON DELETE CASCADE
+);
+
+CREATE TABLE GSISSH_SUBMISSION
+(
+         SUBMISSION_ID VARCHAR(255),
+         RESOURCE_JOB_MANAGER VARCHAR(255),
+         SSH_PORT INTEGER,
+         INSTALLED_PATH VARCHAR(255),
+         MONITOR_MODE VARCHAR(255),
+         PRIMARY KEY(SUBMISSION_ID)
+);
+
+CREATE TABLE GSISSH_EXPORT
+(
+         SUBMISSION_ID VARCHAR(255),
+         EXPORT VARCHAR(255),
+         PRIMARY KEY(SUBMISSION_ID, EXPORT),
+         FOREIGN KEY (SUBMISSION_ID) REFERENCES GSISSH_SUBMISSION(SUBMISSION_ID) ON DELETE CASCADE
+);
+
+
+
+CREATE TABLE GLOBUS_SUBMISSION
+(
+         SUBMISSION_ID VARCHAR(255),
+         RESOURCE_JOB_MANAGER VARCHAR(255),
+         SECURITY_PROTOCAL VARCHAR(255),
+         PRIMARY KEY(SUBMISSION_ID)
+);
+
+CREATE TABLE UNICORE_SUBMISSION
+(
+         SUBMISSION_ID VARCHAR(255),
+         SECURITY_PROTOCAL VARCHAR(255),
+         UNICORE_ENDPOINT_URL VARCHAR(255),
+         PRIMARY KEY(SUBMISSION_ID)
+);
+
+CREATE TABLE UNICORE_DATAMOVEMENT
+(
+         DATAMOVEMENT_ID VARCHAR(255),
+         SECURITY_PROTOCAL VARCHAR(255),
+         UNICORE_ENDPOINT_URL VARCHAR(255),
+         PRIMARY KEY(DATAMOVEMENT_ID)
+);
+
+
+CREATE TABLE GLOBUS_GK_ENDPOINT
+(
+         SUBMISSION_ID VARCHAR(255),
+         ENDPOINT VARCHAR(255),
+         PRIMARY KEY(SUBMISSION_ID, ENDPOINT),
+         FOREIGN KEY (SUBMISSION_ID) REFERENCES GLOBUS_SUBMISSION(SUBMISSION_ID) ON DELETE CASCADE
+);
+
+CREATE TABLE RESOURCE_JOB_MANAGER
+(
+        RESOURCE_JOB_MANAGER_ID VARCHAR (255) NOT NULL,
+        PUSH_MONITORING_ENDPOINT VARCHAR (255),
+        JOB_MANAGER_BIN_PATH VARCHAR (255),
+        RESOURCE_JOB_MANAGER_TYPE VARCHAR (255) NOT NULL,
+        CREATION_TIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
+        UPDATE_TIME TIMESTAMP DEFAULT '0000-00-00 00:00:00',
+        PRIMARY KEY (RESOURCE_JOB_MANAGER_ID)
+);
+
+
+
+CREATE TABLE SSH_JOB_SUBMISSION
+(
+        RESOURCE_JOB_MANAGER_ID VARCHAR (255) NOT NULL,
+        JOB_SUBMISSION_INTERFACE_ID VARCHAR (255) NOT NULL,
+        ALTERNATIVE_SSH_HOSTNAME VARCHAR (255),
+        SECURITY_PROTOCOL VARCHAR (255) NOT NULL,
+        SSH_PORT INTEGER,
+        MONITOR_MODE VARCHAR (255),
+        CREATION_TIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
+        UPDATE_TIME TIMESTAMP DEFAULT '0000-00-00 00:00:00',
+        PRIMARY KEY (JOB_SUBMISSION_INTERFACE_ID),
+        FOREIGN KEY (RESOURCE_JOB_MANAGER_ID) REFERENCES RESOURCE_JOB_MANAGER(RESOURCE_JOB_MANAGER_ID)
+);
+
+CREATE TABLE SCP_DATA_MOVEMENT
+(
+        QUEUE_DESCRIPTION VARCHAR (255),
+        DATA_MOVEMENT_INTERFACE_ID VARCHAR (255) NOT NULL,
+        SECURITY_PROTOCOL VARCHAR (255) NOT NULL,
+        ALTERNATIVE_SCP_HOSTNAME VARCHAR (255),
+        SSH_PORT INTEGER,
+        CREATION_TIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
+        UPDATE_TIME TIMESTAMP DEFAULT '0000-00-00 00:00:00',
+        PRIMARY KEY (DATA_MOVEMENT_INTERFACE_ID)
+);
+
+CREATE TABLE GRIDFTP_DATA_MOVEMENT
+(
+        DATA_MOVEMENT_INTERFACE_ID VARCHAR (255) NOT NULL,
+        SECURITY_PROTOCOL VARCHAR (255) NOT NULL,
+        CREATION_TIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
+        UPDATE_TIME TIMESTAMP DEFAULT '0000-00-00 00:00:00',
+        PRIMARY KEY (DATA_MOVEMENT_INTERFACE_ID)
+);
+
+CREATE TABLE GRIDFTP_ENDPOINT
+(
+        ENDPOINT VARCHAR (255) NOT NULL,
+        DATA_MOVEMENT_INTERFACE_ID VARCHAR (255) NOT NULL,
+        PRIMARY KEY (DATA_MOVEMENT_INTERFACE_ID,ENDPOINT),
+        CREATION_TIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
+        UPDATE_TIME TIMESTAMP DEFAULT '0000-00-00 00:00:00',
+        FOREIGN KEY (DATA_MOVEMENT_INTERFACE_ID) REFERENCES GRIDFTP_DATA_MOVEMENT(DATA_MOVEMENT_INTERFACE_ID) ON DELETE CASCADE
+);
+
+--CREATE TABLE JOB_SUBMISSION_PROTOCOL
+--(
+--         RESOURCE_ID VARCHAR(255),
+--         SUBMISSION_ID VARCHAR(255),
+--         JOB_TYPE VARCHAR(255),
+--         CREATION_TIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
+--         UPDATE_TIME TIMESTAMP DEFAULT '0000-00-00 00:00:00',
+--         PRIMARY KEY(RESOURCE_ID,SUBMISSION_ID,JOB_TYPE),
+--         FOREIGN KEY (RESOURCE_ID) REFERENCES COMPUTE_RESOURCE(RESOURCE_ID) ON DELETE CASCADE
+--);
+--
+--CREATE TABLE DATA_MOVEMENT_PROTOCOL
+--(
+--         RESOURCE_ID VARCHAR(255),
+--         DATA_MOVE_ID VARCHAR(255),
+--         DATA_MOVE_TYPE VARCHAR(255),
+--         CREATION_TIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
+--         UPDATE_TIME TIMESTAMP DEFAULT '0000-00-00 00:00:00',
+--         PRIMARY KEY(RESOURCE_ID,DATA_MOVE_ID,DATA_MOVE_TYPE),
+--         FOREIGN KEY (RESOURCE_ID) REFERENCES COMPUTE_RESOURCE(RESOURCE_ID) ON DELETE CASCADE
+--);
+
+CREATE TABLE APPLICATION_MODULE
+(
+         MODULE_ID VARCHAR(255),
+         MODULE_NAME VARCHAR(255),
+         MODULE_VERSION VARCHAR(255),
+         MODULE_DESC VARCHAR(255),
+         GATEWAY_ID VARCHAR (255),
+         CREATION_TIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
+         UPDATE_TIME TIMESTAMP DEFAULT '0000-00-00 00:00:00',
+         PRIMARY KEY(MODULE_ID)
+);
+
+CREATE TABLE APPLICATION_DEPLOYMENT
+(
+         DEPLOYMENT_ID VARCHAR(255),
+         APP_MODULE_ID VARCHAR(255),
+         COMPUTE_HOSTID VARCHAR(255),
+         EXECUTABLE_PATH VARCHAR(255),
+	       PARALLELISM VARCHAR(255),
+         APPLICATION_DESC VARCHAR(255),
+         CREATION_TIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
+         UPDATE_TIME TIMESTAMP DEFAULT '0000-00-00 00:00:00',
+         GATEWAY_ID VARCHAR(255),
+         PRIMARY KEY(DEPLOYMENT_ID),
+         FOREIGN KEY (COMPUTE_HOSTID) REFERENCES COMPUTE_RESOURCE(RESOURCE_ID) ON DELETE CASCADE,
+         FOREIGN KEY (APP_MODULE_ID) REFERENCES APPLICATION_MODULE(MODULE_ID) ON DELETE CASCADE
+);
+
+CREATE TABLE MODULE_LOAD_CMD
+(
+        CMD VARCHAR (255) NOT NULL,
+        APP_DEPLOYMENT_ID VARCHAR (255) NOT NULL,
+        PRIMARY KEY (APP_DEPLOYMENT_ID,CMD),
+        FOREIGN KEY (APP_DEPLOYMENT_ID) REFERENCES APPLICATION_DEPLOYMENT(DEPLOYMENT_ID) ON DELETE CASCADE
+);
+
+CREATE TABLE PREJOB_COMMAND
+(
+         APPDEPLOYMENT_ID VARCHAR(255),
+         COMMAND VARCHAR(255),
+         PRIMARY KEY(APPDEPLOYMENT_ID, COMMAND),
+         FOREIGN KEY (APPDEPLOYMENT_ID) REFERENCES APPLICATION_DEPLOYMENT(DEPLOYMENT_ID) ON DELETE CASCADE
+);
+
+CREATE TABLE POSTJOB_COMMAND
+(
+         APPDEPLOYMENT_ID VARCHAR(255),
+         COMMAND VARCHAR(255),
+         PRIMARY KEY(APPDEPLOYMENT_ID, COMMAND),
+         FOREIGN KEY (APPDEPLOYMENT_ID) REFERENCES APPLICATION_DEPLOYMENT(DEPLOYMENT_ID) ON DELETE CASCADE
+);
+
+CREATE TABLE LIBRARY_PREPAND_PATH
+(
+         DEPLOYMENT_ID VARCHAR(255),
+         NAME VARCHAR(255),
+         VALUE VARCHAR(255),
+         PRIMARY KEY(DEPLOYMENT_ID, NAME),
+         FOREIGN KEY (DEPLOYMENT_ID) REFERENCES APPLICATION_DEPLOYMENT(DEPLOYMENT_ID) ON DELETE CASCADE
+);
+
+CREATE TABLE LIBRARY_APEND_PATH
+(
+         DEPLOYMENT_ID VARCHAR(255),
+         NAME VARCHAR(255),
+         VALUE VARCHAR(255),
+         PRIMARY KEY(DEPLOYMENT_ID, NAME),
+         FOREIGN KEY (DEPLOYMENT_ID) REFERENCES APPLICATION_DEPLOYMENT(DEPLOYMENT_ID) ON DELETE CASCADE
+);
+
+CREATE TABLE APP_ENVIRONMENT
+(
+         DEPLOYMENT_ID VARCHAR(255),
+         NAME VARCHAR(255),
+         VALUE VARCHAR(255),
+         PRIMARY KEY(DEPLOYMENT_ID, NAME),
+         FOREIGN KEY (DEPLOYMENT_ID) REFERENCES APPLICATION_DEPLOYMENT(DEPLOYMENT_ID) ON DELETE CASCADE
+);
+
+CREATE TABLE APPLICATION_INTERFACE
+(
+         INTERFACE_ID VARCHAR(255),
+         APPLICATION_NAME VARCHAR(255),
+         APPLICATION_DESCRIPTION VARCHAR(255),
+         GATEWAY_ID VARCHAR(255),
+         CREATION_TIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
+         UPDATE_TIME TIMESTAMP DEFAULT '0000-00-00 00:00:00',
+         PRIMARY KEY(INTERFACE_ID)
+);
+
+CREATE TABLE APP_MODULE_MAPPING
+(
+         INTERFACE_ID VARCHAR(255),
+         MODULE_ID VARCHAR(255),
+         PRIMARY KEY(INTERFACE_ID, MODULE_ID),
+         FOREIGN KEY (INTERFACE_ID) REFERENCES APPLICATION_INTERFACE(INTERFACE_ID) ON DELETE CASCADE,
+         FOREIGN KEY (MODULE_ID) REFERENCES APPLICATION_MODULE(MODULE_ID) ON DELETE CASCADE
+);
+
+CREATE TABLE APPLICATION_INPUT
+(
+         INTERFACE_ID VARCHAR(255),
+         INPUT_KEY VARCHAR(255),
+         INPUT_VALUE VARCHAR(255),
+         DATA_TYPE VARCHAR(255),
+         METADATA VARCHAR(255),
+         APP_ARGUMENT VARCHAR(255),
+         STANDARD_INPUT SMALLINT,
+         INPUT_ORDER INTEGER,
+         IS_REQUIRED SMALLINT,
+         REQUIRED_TO_COMMANDLINE SMALLINT,
+         DATA_STAGED SMALLINT,
+         USER_FRIENDLY_DESC VARCHAR(255),
+         PRIMARY KEY(INTERFACE_ID,INPUT_KEY),
+         FOREIGN KEY (INTERFACE_ID) REFERENCES APPLICATION_INTERFACE(INTERFACE_ID) ON DELETE CASCADE
+);
+
+CREATE TABLE APPLICATION_OUTPUT
+(
+         INTERFACE_ID VARCHAR(255),
+         OUTPUT_KEY VARCHAR(255),
+         OUTPUT_VALUE VARCHAR(255),
+         DATA_TYPE VARCHAR(255),
+         IS_REQUIRED SMALLINT,
+         REQUIRED_TO_COMMANDLINE SMALLINT,
+         DATA_MOVEMENT SMALLINT,
+         DATA_NAME_LOCATION VARCHAR(255),
+         SEARCH_QUERY VARCHAR(255),
+         APP_ARGUMENT VARCHAR(255),
+         PRIMARY KEY(INTERFACE_ID,OUTPUT_KEY),
+         FOREIGN KEY (INTERFACE_ID) REFERENCES APPLICATION_INTERFACE(INTERFACE_ID) ON DELETE CASCADE
+);
+
+CREATE TABLE GATEWAY_PROFILE
+(
+         GATEWAY_ID VARCHAR(255),
+         CREATION_TIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
+         UPDATE_TIME TIMESTAMP DEFAULT '0000-00-00 00:00:00',
+         PRIMARY KEY(GATEWAY_ID)
+);
+
+CREATE TABLE COMPUTE_RESOURCE_PREFERENCE
+(
+        GATEWAY_ID VARCHAR(255),
+        RESOURCE_ID VARCHAR(255),
+        OVERRIDE_BY_AIRAVATA SMALLINT,
+        PREFERED_JOB_SUB_PROTOCOL VARCHAR(255),
+        PREFERED_DATA_MOVE_PROTOCOL VARCHAR(255),
+        PREFERED_BATCH_QUEUE VARCHAR(255),
+        SCRATCH_LOCATION VARCHAR(255),
+        ALLOCATION_PROJECT_NUMBER VARCHAR(255),
+        LOGIN_USERNAME VARCHAR(255),
+        PRIMARY KEY(GATEWAY_ID,RESOURCE_ID),
+        FOREIGN KEY (RESOURCE_ID) REFERENCES COMPUTE_RESOURCE(RESOURCE_ID) ON DELETE CASCADE,
+        FOREIGN KEY (GATEWAY_ID) REFERENCES GATEWAY_PROFILE(GATEWAY_ID) ON DELETE CASCADE
+);
+
+CREATE TABLE BATCH_QUEUE
+(
+        COMPUTE_RESOURCE_ID VARCHAR(255) NOT NULL,
+        MAX_RUNTIME INTEGER,
+        MAX_JOB_IN_QUEUE INTEGER,
+        QUEUE_DESCRIPTION VARCHAR(255),
+        QUEUE_NAME VARCHAR(255) NOT NULL,
+        MAX_PROCESSORS INTEGER,
+        MAX_NODES INTEGER,
+        MAX_MEMORY INTEGER,
+        PRIMARY KEY (COMPUTE_RESOURCE_ID,QUEUE_NAME),
+        FOREIGN KEY (COMPUTE_RESOURCE_ID) REFERENCES COMPUTE_RESOURCE(RESOURCE_ID) ON DELETE CASCADE
+);
+
+CREATE TABLE COMPUTE_RESOURCE_FILE_SYSTEM
+(
+        COMPUTE_RESOURCE_ID VARCHAR (255) NOT NULL,
+        PATH VARCHAR (255),
+        FILE_SYSTEM VARCHAR (255) NOT NULL,
+        PRIMARY KEY (COMPUTE_RESOURCE_ID,FILE_SYSTEM),
+        FOREIGN KEY (COMPUTE_RESOURCE_ID) REFERENCES COMPUTE_RESOURCE(RESOURCE_ID) ON DELETE CASCADE
+  );
+
+CREATE TABLE JOB_SUBMISSION_INTERFACE
+(
+        JOB_SUBMISSION_INTERFACE_ID VARCHAR (255) NOT NULL,
+        COMPUTE_RESOURCE_ID VARCHAR (255) NOT NULL,
+        JOB_SUBMISSION_PROTOCOL VARCHAR (255) NOT NULL,
+        PRIORITY_ORDER INTEGER,
+        CREATION_TIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
+        UPDATE_TIME TIMESTAMP DEFAULT '0000-00-00 00:00:00',
+        PRIMARY KEY (COMPUTE_RESOURCE_ID,JOB_SUBMISSION_INTERFACE_ID),
+        FOREIGN KEY (COMPUTE_RESOURCE_ID) REFERENCES COMPUTE_RESOURCE(RESOURCE_ID) ON DELETE CASCADE
+);
+ 
+CREATE TABLE DATA_MOVEMENT_INTERFACE
+(
+        COMPUTE_RESOURCE_ID VARCHAR (255) NOT NULL,
+        DATA_MOVEMENT_PROTOCOL VARCHAR (255) NOT NULL,
+        DATA_MOVEMENT_INTERFACE_ID VARCHAR (255) NOT NULL,
+        PRIORITY_ORDER INTEGER,
+        CREATION_TIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
+        UPDATE_TIME TIMESTAMP DEFAULT '0000-00-00 00:00:00',
+        PRIMARY KEY (COMPUTE_RESOURCE_ID,DATA_MOVEMENT_INTERFACE_ID),
+        FOREIGN KEY (COMPUTE_RESOURCE_ID) REFERENCES COMPUTE_RESOURCE(RESOURCE_ID) ON DELETE CASCADE
+);
+
+CREATE TABLE JOB_MANAGER_COMMAND
+(
+        RESOURCE_JOB_MANAGER_ID VARCHAR (255) NOT NULL,
+        COMMAND_TYPE VARCHAR (255) NOT NULL,
+        COMMAND VARCHAR (255),
+        PRIMARY KEY (RESOURCE_JOB_MANAGER_ID,COMMAND_TYPE),
+        FOREIGN KEY (RESOURCE_JOB_MANAGER_ID) REFERENCES RESOURCE_JOB_MANAGER(RESOURCE_JOB_MANAGER_ID) ON DELETE CASCADE
+);
+
+CREATE TABLE LOCAL_SUBMISSION
+(
+        RESOURCE_JOB_MANAGER_ID VARCHAR (255) NOT NULL,
+        JOB_SUBMISSION_INTERFACE_ID VARCHAR (255) NOT NULL,
+        CREATION_TIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
+        UPDATE_TIME TIMESTAMP DEFAULT '0000-00-00 00:00:00',
+        PRIMARY KEY (JOB_SUBMISSION_INTERFACE_ID),
+        FOREIGN KEY (RESOURCE_JOB_MANAGER_ID) REFERENCES RESOURCE_JOB_MANAGER(RESOURCE_JOB_MANAGER_ID)
+      );
+
+CREATE TABLE LOCAL_DATA_MOVEMENT
+(
+	     DATA_MOVEMENT_INTERFACE_ID VARCHAR (255) NOT NULL,
+	     PRIMARY KEY (DATA_MOVEMENT_INTERFACE_ID)
+);
+
+CREATE TABLE WORKFLOW
+(
+        WF_TEMPLATE_ID VARCHAR (255) NOT NULL,
+        WF_NAME VARCHAR (255) NOT NULL,
+        GRAPH CLOB,
+        OWNER VARCHAR(255),
+        GATEWAY_ID VARCHAR(255),
+        CREATION_TIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
+        UPDATE_TIME TIMESTAMP DEFAULT '0000-00-00 00:00:00',
+        IMAGE BLOB,
+        PRIMARY KEY (WF_TEMPLATE_ID)
+);
+
+CREATE TABLE WORKFLOW_INPUT
+(
+         WF_TEMPLATE_ID VARCHAR(255),
+         INPUT_KEY VARCHAR(255),
+         INPUT_VALUE CLOB,
+         DATA_TYPE VARCHAR(255),
+         METADATA VARCHAR(255),
+         APP_ARGUMENT VARCHAR(255),
+         STANDARD_INPUT SMALLINT,
+         USER_FRIENDLY_DESC VARCHAR(255),
+         PRIMARY KEY(WF_TEMPLATE_ID,INPUT_KEY),
+         FOREIGN KEY (WF_TEMPLATE_ID) REFERENCES WORKFLOW(WF_TEMPLATE_ID) ON DELETE CASCADE
+);
+
+CREATE TABLE WORKFLOW_OUTPUT
+(
+         WF_TEMPLATE_ID VARCHAR(255),
+         OUTPUT_KEY VARCHAR(255),
+         OUTPUT_VALUE CLOB,
+         DATA_TYPE VARCHAR(255),
+         PRIMARY KEY(WF_TEMPLATE_ID,OUTPUT_KEY),
+         FOREIGN KEY (WF_TEMPLATE_ID) REFERENCES WORKFLOW(WF_TEMPLATE_ID) ON DELETE CASCADE
+);
+
+
+
+CREATE TABLE CONFIGURATION
+(
+        CONFIG_KEY VARCHAR(255),
+        CONFIG_VAL VARCHAR(255),
+        PRIMARY KEY(CONFIG_KEY, CONFIG_VAL)
+);
+
+INSERT INTO CONFIGURATION (CONFIG_KEY, CONFIG_VAL) VALUES('app_catalog_version', '0.15');
+
+
+

http://git-wip-us.apache.org/repos/asf/airavata/blob/63f6a53f/airavata-api/airavata-api-server/src/test/resources/expcatalog-derby.sql
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-api-server/src/test/resources/expcatalog-derby.sql b/airavata-api/airavata-api-server/src/test/resources/expcatalog-derby.sql
new file mode 100644
index 0000000..7ab3755
--- /dev/null
+++ b/airavata-api/airavata-api-server/src/test/resources/expcatalog-derby.sql
@@ -0,0 +1,391 @@
+/*
+ *
+ * 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.
+ *
+ */
+CREATE TABLE GATEWAY
+(
+        GATEWAY_ID VARCHAR (255),
+        GATEWAY_NAME VARCHAR(255),
+	      DOMAIN VARCHAR(255),
+	      EMAIL_ADDRESS VARCHAR(255),
+        PRIMARY KEY (GATEWAY_ID)
+);
+
+CREATE TABLE CONFIGURATION
+(
+        CONFIG_KEY VARCHAR(255),
+        CONFIG_VAL VARCHAR(255),
+        EXPIRE_DATE TIMESTAMP DEFAULT '0000-00-00 00:00:00',
+        CATEGORY_ID VARCHAR (255),
+        PRIMARY KEY(CONFIG_KEY, CONFIG_VAL, CATEGORY_ID)
+);
+
+INSERT INTO CONFIGURATION (CONFIG_KEY, CONFIG_VAL, EXPIRE_DATE, CATEGORY_ID) VALUES('registry.version', '0.15', CURRENT_TIMESTAMP ,'SYSTEM');
+
+CREATE TABLE USERS
+(
+        USER_NAME VARCHAR(255),
+        PASSWORD VARCHAR(255),
+        PRIMARY KEY(USER_NAME)
+);
+
+CREATE TABLE GATEWAY_WORKER
+(
+        GATEWAY_ID VARCHAR(255),
+        USER_NAME VARCHAR(255),
+        PRIMARY KEY (GATEWAY_ID, USER_NAME),
+        FOREIGN KEY (GATEWAY_ID) REFERENCES GATEWAY(GATEWAY_ID) ON DELETE CASCADE,
+        FOREIGN KEY (USER_NAME) REFERENCES USERS(USER_NAME) ON DELETE CASCADE
+);
+
+CREATE TABLE PROJECT
+(
+         GATEWAY_ID VARCHAR(255),
+         USER_NAME VARCHAR(255) NOT NULL,
+         PROJECT_ID VARCHAR(255),
+         PROJECT_NAME VARCHAR(255) NOT NULL,
+         DESCRIPTION VARCHAR(255),
+         CREATION_TIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
+         PRIMARY KEY (PROJECT_ID),
+         FOREIGN KEY (GATEWAY_ID) REFERENCES GATEWAY(GATEWAY_ID) ON DELETE CASCADE,
+         FOREIGN KEY (USER_NAME) REFERENCES USERS(USER_NAME) ON DELETE CASCADE
+);
+
+CREATE TABLE PROJECT_USER
+(
+    PROJECT_ID VARCHAR(255),
+    USER_NAME VARCHAR(255),
+    PRIMARY KEY (PROJECT_ID,USER_NAME),
+    FOREIGN KEY (PROJECT_ID) REFERENCES PROJECT(PROJECT_ID) ON DELETE CASCADE,
+    FOREIGN KEY (USER_NAME) REFERENCES USERS(USER_NAME) ON DELETE CASCADE
+);
+
+CREATE TABLE EXPERIMENT
+(
+        EXPERIMENT_ID VARCHAR(255),
+        GATEWAY_ID VARCHAR(255),
+        EXECUTION_USER VARCHAR(255) NOT NULL,
+        PROJECT_ID VARCHAR(255) NOT NULL,
+        CREATION_TIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
+        EXPERIMENT_NAME VARCHAR(255) NOT NULL,
+        EXPERIMENT_DESCRIPTION VARCHAR(255),
+        APPLICATION_ID VARCHAR(255),
+        APPLICATION_VERSION VARCHAR(255),
+        WORKFLOW_TEMPLATE_ID VARCHAR(255),
+        WORKFLOW_TEMPLATE_VERSION VARCHAR(255),
+        WORKFLOW_EXECUTION_ID VARCHAR(255),
+        ALLOW_NOTIFICATION SMALLINT,
+        GATEWAY_EXECUTION_ID VARCHAR(255),
+        PRIMARY KEY(EXPERIMENT_ID),
+        FOREIGN KEY (GATEWAY_ID) REFERENCES GATEWAY(GATEWAY_ID) ON DELETE CASCADE,
+        FOREIGN KEY (EXECUTION_USER) REFERENCES USERS(USER_NAME) ON DELETE CASCADE,
+        FOREIGN KEY (PROJECT_ID) REFERENCES PROJECT(PROJECT_ID) ON DELETE CASCADE
+);
+
+CREATE TABLE EXPERIMENT_INPUT
+(
+        EXPERIMENT_ID VARCHAR(255),
+        INPUT_KEY VARCHAR(255) NOT NULL,
+        DATA_TYPE VARCHAR(255),
+        METADATA VARCHAR(255),
+        APP_ARGUMENT VARCHAR(255),
+        STANDARD_INPUT SMALLINT,
+        USER_FRIENDLY_DESC VARCHAR(255),
+        VALUE CLOB,
+        INPUT_ORDER INTEGER,
+        IS_REQUIRED SMALLINT,
+        REQUIRED_TO_COMMANDLINE SMALLINT,
+        DATA_STAGED SMALLINT,
+        PRIMARY KEY(EXPERIMENT_ID,INPUT_KEY),
+        FOREIGN KEY (EXPERIMENT_ID) REFERENCES EXPERIMENT(EXPERIMENT_ID) ON DELETE CASCADE
+);
+
+CREATE TABLE EXPERIMENT_OUTPUT
+(
+        EXPERIMENT_ID VARCHAR(255),
+        OUTPUT_KEY VARCHAR(255) NOT NULL,
+        DATA_TYPE VARCHAR(255),
+        VALUE CLOB,
+        IS_REQUIRED SMALLINT,
+        REQUIRED_TO_COMMANDLINE SMALLINT,
+        DATA_MOVEMENT SMALLINT,
+        DATA_NAME_LOCATION VARCHAR(255),
+        SEARCH_QUERY VARCHAR(255),
+        APP_ARGUMENT VARCHAR(255),
+        PRIMARY KEY(EXPERIMENT_ID,OUTPUT_KEY),
+        FOREIGN KEY (EXPERIMENT_ID) REFERENCES EXPERIMENT(EXPERIMENT_ID) ON DELETE CASCADE
+);
+
+
+CREATE TABLE WORKFLOW_NODE_DETAIL
+(
+        EXPERIMENT_ID VARCHAR(255) NOT NULL,
+        NODE_INSTANCE_ID VARCHAR(255),
+        CREATION_TIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
+        NODE_NAME VARCHAR(255) NOT NULL,
+        EXECUTION_UNIT VARCHAR(255) NOT NULL,
+        EXECUTION_UNIT_DATA VARCHAR(255),
+        PRIMARY KEY(NODE_INSTANCE_ID),
+        FOREIGN KEY (EXPERIMENT_ID) REFERENCES EXPERIMENT(EXPERIMENT_ID) ON DELETE CASCADE
+);
+
+CREATE TABLE TASK_DETAIL
+(
+        TASK_ID VARCHAR(255),
+        NODE_INSTANCE_ID VARCHAR(255),
+        CREATION_TIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
+        APPLICATION_ID VARCHAR(255),
+        APPLICATION_VERSION VARCHAR(255),
+        APPLICATION_DEPLOYMENT_ID VARCHAR(255),
+        ALLOW_NOTIFICATION SMALLINT,
+        PRIMARY KEY(TASK_ID),
+        FOREIGN KEY (NODE_INSTANCE_ID) REFERENCES WORKFLOW_NODE_DETAIL(NODE_INSTANCE_ID) ON DELETE CASCADE
+);
+
+CREATE TABLE NOTIFICATION_EMAIL
+(
+  EMAIL_ID INTEGER NOT NULL GENERATED BY DEFAULT AS IDENTITY,
+  EXPERIMENT_ID VARCHAR(255),
+  TASK_ID VARCHAR(255),
+  EMAIL_ADDRESS VARCHAR(255),
+  PRIMARY KEY(EMAIL_ID),
+  FOREIGN KEY (EXPERIMENT_ID) REFERENCES EXPERIMENT(EXPERIMENT_ID) ON DELETE CASCADE,
+  FOREIGN KEY (TASK_ID) REFERENCES TASK_DETAIL(TASK_ID) ON DELETE CASCADE
+);
+
+CREATE TABLE ERROR_DETAIL
+(
+         ERROR_ID INTEGER NOT NULL GENERATED BY DEFAULT AS IDENTITY,
+         EXPERIMENT_ID VARCHAR(255),
+         TASK_ID VARCHAR(255),
+         NODE_INSTANCE_ID VARCHAR(255),
+         JOB_ID VARCHAR(255),
+         CREATION_TIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
+         ACTUAL_ERROR_MESSAGE CLOB,
+         USER_FRIEDNLY_ERROR_MSG VARCHAR(255),
+         TRANSIENT_OR_PERSISTENT SMALLINT,
+         ERROR_CATEGORY VARCHAR(255),
+         CORRECTIVE_ACTION VARCHAR(255),
+         ACTIONABLE_GROUP VARCHAR(255),
+         PRIMARY KEY(ERROR_ID),
+         FOREIGN KEY (EXPERIMENT_ID) REFERENCES EXPERIMENT(EXPERIMENT_ID) ON DELETE CASCADE,
+         FOREIGN KEY (TASK_ID) REFERENCES TASK_DETAIL(TASK_ID) ON DELETE CASCADE,
+         FOREIGN KEY (NODE_INSTANCE_ID) REFERENCES WORKFLOW_NODE_DETAIL(NODE_INSTANCE_ID) ON DELETE CASCADE
+);
+
+CREATE TABLE APPLICATION_INPUT
+(
+        TASK_ID VARCHAR(255),
+        INPUT_KEY VARCHAR(255) NOT NULL,
+        DATA_TYPE VARCHAR(255),
+        METADATA VARCHAR(255),
+        APP_ARGUMENT VARCHAR(255),
+        STANDARD_INPUT SMALLINT,
+        USER_FRIENDLY_DESC VARCHAR(255),
+        VALUE CLOB,
+        INPUT_ORDER INTEGER,
+        IS_REQUIRED SMALLINT,
+        REQUIRED_TO_COMMANDLINE SMALLINT,
+        DATA_STAGED SMALLINT,
+        PRIMARY KEY(TASK_ID,INPUT_KEY),
+        FOREIGN KEY (TASK_ID) REFERENCES TASK_DETAIL(TASK_ID) ON DELETE CASCADE
+);
+
+CREATE TABLE APPLICATION_OUTPUT
+(
+        TASK_ID VARCHAR(255),
+        OUTPUT_KEY VARCHAR(255) NOT NULL,
+        DATA_TYPE VARCHAR(255),
+        VALUE CLOB,
+        IS_REQUIRED SMALLINT,
+        REQUIRED_TO_COMMANDLINE SMALLINT,
+        DATA_MOVEMENT SMALLINT,
+        DATA_NAME_LOCATION VARCHAR(255),
+        SEARCH_QUERY VARCHAR(255),
+        APP_ARGUMENT VARCHAR(255),
+        PRIMARY KEY(TASK_ID,OUTPUT_KEY),
+        FOREIGN KEY (TASK_ID) REFERENCES TASK_DETAIL(TASK_ID) ON DELETE CASCADE
+);
+
+CREATE TABLE NODE_INPUT
+(
+       NODE_INSTANCE_ID VARCHAR(255),
+       INPUT_KEY VARCHAR(255) NOT NULL,
+       DATA_TYPE VARCHAR(255),
+       METADATA VARCHAR(255),
+       APP_ARGUMENT VARCHAR(255),
+       STANDARD_INPUT SMALLINT,
+       USER_FRIENDLY_DESC VARCHAR(255),
+       VALUE VARCHAR(255),
+       INPUT_ORDER INTEGER,
+       IS_REQUIRED SMALLINT,
+       REQUIRED_TO_COMMANDLINE SMALLINT,
+       DATA_STAGED SMALLINT,
+       PRIMARY KEY(NODE_INSTANCE_ID,INPUT_KEY),
+       FOREIGN KEY (NODE_INSTANCE_ID) REFERENCES WORKFLOW_NODE_DETAIL(NODE_INSTANCE_ID) ON DELETE CASCADE
+);
+
+CREATE TABLE NODE_OUTPUT
+(
+       NODE_INSTANCE_ID VARCHAR(255),
+       OUTPUT_KEY VARCHAR(255) NOT NULL,
+       DATA_TYPE VARCHAR(255),
+       VALUE VARCHAR(255),
+       IS_REQUIRED SMALLINT,
+       REQUIRED_TO_COMMANDLINE SMALLINT,
+       DATA_MOVEMENT SMALLINT,
+       DATA_NAME_LOCATION VARCHAR(255),
+       SEARCH_QUERY VARCHAR(255),
+       APP_ARGUMENT VARCHAR(255),
+       PRIMARY KEY(NODE_INSTANCE_ID,OUTPUT_KEY),
+       FOREIGN KEY (NODE_INSTANCE_ID) REFERENCES WORKFLOW_NODE_DETAIL(NODE_INSTANCE_ID) ON DELETE CASCADE
+);
+
+CREATE TABLE JOB_DETAIL
+(
+        JOB_ID VARCHAR(255),
+        TASK_ID VARCHAR(255),
+        JOB_DESCRIPTION CLOB NOT NULL,
+        CREATION_TIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
+        COMPUTE_RESOURCE_CONSUMED VARCHAR(255),
+        JOBNAME VARCHAR (255),
+        WORKING_DIR VARCHAR(255),
+        PRIMARY KEY (TASK_ID, JOB_ID),
+        FOREIGN KEY (TASK_ID) REFERENCES TASK_DETAIL(TASK_ID) ON DELETE CASCADE
+);
+
+CREATE TABLE DATA_TRANSFER_DETAIL
+(
+        TRANSFER_ID VARCHAR(255),
+        TASK_ID VARCHAR(255),
+        CREATION_TIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
+        TRANSFER_DESC VARCHAR(255) NOT NULL,
+        PRIMARY KEY(TRANSFER_ID),
+        FOREIGN KEY (TASK_ID) REFERENCES TASK_DETAIL(TASK_ID) ON DELETE CASCADE
+);
+
+CREATE TABLE STATUS
+(
+        STATUS_ID INTEGER NOT NULL GENERATED BY DEFAULT AS IDENTITY,
+        EXPERIMENT_ID VARCHAR(255),
+        NODE_INSTANCE_ID VARCHAR(255),
+        TRANSFER_ID VARCHAR(255),
+        TASK_ID VARCHAR(255),
+        JOB_ID VARCHAR(255),
+        STATE VARCHAR(255),
+        STATUS_UPDATE_TIME TIMESTAMP DEFAULT '0000-00-00 00:00:00',
+        STATUS_TYPE VARCHAR(255),
+        PRIMARY KEY(STATUS_ID),
+        FOREIGN KEY (EXPERIMENT_ID) REFERENCES EXPERIMENT(EXPERIMENT_ID) ON DELETE CASCADE,
+        FOREIGN KEY (TASK_ID) REFERENCES TASK_DETAIL(TASK_ID) ON DELETE CASCADE,
+        FOREIGN KEY (NODE_INSTANCE_ID) REFERENCES WORKFLOW_NODE_DETAIL(NODE_INSTANCE_ID) ON DELETE CASCADE,
+        FOREIGN KEY (TRANSFER_ID) REFERENCES DATA_TRANSFER_DETAIL(TRANSFER_ID) ON DELETE CASCADE
+);
+
+CREATE TABLE CONFIG_DATA
+(
+        EXPERIMENT_ID VARCHAR(255),
+        AIRAVATA_AUTO_SCHEDULE SMALLINT NOT NULL,
+        OVERRIDE_MANUAL_SCHEDULE_PARAMS SMALLINT NOT NULL,
+        SHARE_EXPERIMENT SMALLINT,
+        USER_DN VARCHAR(255),
+        GENERATE_CERT SMALLINT,
+        PRIMARY KEY(EXPERIMENT_ID)
+);
+
+CREATE TABLE COMPUTATIONAL_RESOURCE_SCHEDULING
+(
+        RESOURCE_SCHEDULING_ID INTEGER NOT NULL GENERATED BY DEFAULT AS IDENTITY,
+        EXPERIMENT_ID VARCHAR(255),
+        TASK_ID VARCHAR(255),
+        RESOURCE_HOST_ID VARCHAR(255),
+        CPU_COUNT INTEGER,
+        NODE_COUNT INTEGER,
+        NO_OF_THREADS INTEGER,
+        QUEUE_NAME VARCHAR(255),
+        WALLTIME_LIMIT INTEGER,
+        JOB_START_TIME TIMESTAMP DEFAULT '0000-00-00 00:00:00',
+        TOTAL_PHYSICAL_MEMORY INTEGER,
+        COMPUTATIONAL_PROJECT_ACCOUNT VARCHAR(255),
+        CHESSIS_NAME VARCHAR(255),
+        PRIMARY KEY(RESOURCE_SCHEDULING_ID),
+        FOREIGN KEY (EXPERIMENT_ID) REFERENCES EXPERIMENT(EXPERIMENT_ID) ON DELETE CASCADE,
+        FOREIGN KEY (TASK_ID) REFERENCES TASK_DETAIL(TASK_ID) ON DELETE CASCADE
+);
+
+CREATE TABLE ADVANCE_INPUT_DATA_HANDLING
+(
+       INPUT_DATA_HANDLING_ID INTEGER NOT NULL GENERATED BY DEFAULT AS IDENTITY,
+       EXPERIMENT_ID VARCHAR(255),
+       TASK_ID VARCHAR(255),
+       WORKING_DIR_PARENT VARCHAR(255),
+       UNIQUE_WORKING_DIR VARCHAR(255),
+       STAGE_INPUT_FILES_TO_WORKING_DIR SMALLINT,
+       CLEAN_AFTER_JOB SMALLINT,
+       PRIMARY KEY(INPUT_DATA_HANDLING_ID),
+       FOREIGN KEY (EXPERIMENT_ID) REFERENCES EXPERIMENT(EXPERIMENT_ID) ON DELETE CASCADE,
+       FOREIGN KEY (TASK_ID) REFERENCES TASK_DETAIL(TASK_ID) ON DELETE CASCADE
+);
+
+CREATE TABLE ADVANCE_OUTPUT_DATA_HANDLING
+(
+       OUTPUT_DATA_HANDLING_ID INTEGER NOT NULL GENERATED BY DEFAULT AS IDENTITY,
+       EXPERIMENT_ID VARCHAR(255),
+       TASK_ID VARCHAR(255),
+       OUTPUT_DATA_DIR VARCHAR(255),
+       DATA_REG_URL VARCHAR (255),
+       PERSIST_OUTPUT_DATA SMALLINT,
+       PRIMARY KEY(OUTPUT_DATA_HANDLING_ID),
+       FOREIGN KEY (EXPERIMENT_ID) REFERENCES EXPERIMENT(EXPERIMENT_ID) ON DELETE CASCADE,
+       FOREIGN KEY (TASK_ID) REFERENCES TASK_DETAIL(TASK_ID) ON DELETE CASCADE
+);
+
+CREATE TABLE QOS_PARAM
+(
+        QOS_ID INTEGER NOT NULL GENERATED BY DEFAULT AS IDENTITY,
+        EXPERIMENT_ID VARCHAR(255),
+        TASK_ID VARCHAR(255),
+        START_EXECUTION_AT VARCHAR(255),
+        EXECUTE_BEFORE VARCHAR(255),
+        NO_OF_RETRIES INTEGER,
+        PRIMARY KEY(QOS_ID),
+        FOREIGN KEY (EXPERIMENT_ID) REFERENCES EXPERIMENT(EXPERIMENT_ID) ON DELETE CASCADE,
+        FOREIGN KEY (TASK_ID) REFERENCES TASK_DETAIL(TASK_ID) ON DELETE CASCADE
+);
+
+CREATE TABLE COMMUNITY_USER
+(
+        GATEWAY_ID VARCHAR(256) NOT NULL,
+        COMMUNITY_USER_NAME VARCHAR(256) NOT NULL,
+        TOKEN_ID VARCHAR(256) NOT NULL,
+        COMMUNITY_USER_EMAIL VARCHAR(256) NOT NULL,
+        PRIMARY KEY (GATEWAY_ID, COMMUNITY_USER_NAME, TOKEN_ID)
+);
+
+CREATE TABLE CREDENTIALS
+(
+        GATEWAY_ID VARCHAR(256) NOT NULL,
+        TOKEN_ID VARCHAR(256) NOT NULL,
+        CREDENTIAL BLOB NOT NULL,
+        PORTAL_USER_ID VARCHAR(256) NOT NULL,
+        TIME_PERSISTED TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
+        PRIMARY KEY (GATEWAY_ID, TOKEN_ID)
+);
+
+

http://git-wip-us.apache.org/repos/asf/airavata/blob/63f6a53f/distribution/src/main/assembly/bin-assembly.xml
----------------------------------------------------------------------
diff --git a/distribution/src/main/assembly/bin-assembly.xml b/distribution/src/main/assembly/bin-assembly.xml
index 86a7315..cb5c229 100644
--- a/distribution/src/main/assembly/bin-assembly.xml
+++ b/distribution/src/main/assembly/bin-assembly.xml
@@ -58,7 +58,7 @@
 
 		<!-- ********************** copy database scripts ********************** -->
 		<fileSet>
-			<directory>../modules/registry/airavata-registry-core/src/main/resources
+			<directory>../modules/registry/registry-core/src/main/resources/
 			</directory>
 			<outputDirectory>bin/database_scripts
 			</outputDirectory>

http://git-wip-us.apache.org/repos/asf/airavata/blob/63f6a53f/modules/configuration/server/src/main/resources/airavata-server.properties
----------------------------------------------------------------------
diff --git a/modules/configuration/server/src/main/resources/airavata-server.properties b/modules/configuration/server/src/main/resources/airavata-server.properties
index c114152..b5c29a5 100644
--- a/modules/configuration/server/src/main/resources/airavata-server.properties
+++ b/modules/configuration/server/src/main/resources/airavata-server.properties
@@ -238,7 +238,7 @@ rabbitmq.broker.url=amqp://localhost:5672
 # and give permissions, refer: http://blog.dtzq.com/2012/06/rabbitmq-users-and-virtual-hosts.html
 #rabbitmq.broker.url=amqp://airavata:airavata@localhost:5672/messaging
 
-activity.listeners=org.apache.airavata.gfac.core.monitor.AiravataJobStatusUpdator,org.apache.airavata.gfac.core.monitor.AiravataTaskStatusUpdator,org.apache.airavata.gfac.core.monitor.AiravataWorkflowNodeStatusUpdator,org.apache.airavata.api.server.listener.AiravataExperimentStatusUpdator,org.apache.airavata.gfac.core.monitor.GfacInternalStatusUpdator
+activity.listeners=org.apache.airavata.gfac.impl.AiravataJobStatusUpdator,org.apache.airavata.gfac.impl.AiravataTaskStatusUpdator,org.apache.airavata.gfac.impl.AiravataWorkflowNodeStatusUpdator,org.apache.airavata.api.server.listener.AiravataExperimentStatusUpdator,org.apache.airavata.gfac.impl.GfacInternalStatusUpdator
 status.publisher=org.apache.airavata.messaging.core.impl.RabbitMQStatusPublisher
 task.launch.publisher=org.apache.airavata.messaging.core.impl.RabbitMQTaskLaunchPublisher
 rabbitmq.status.exchange.name=airavata_rabbitmq_exchange

http://git-wip-us.apache.org/repos/asf/airavata/blob/63f6a53f/modules/registry/registry-core/pom.xml
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/pom.xml b/modules/registry/registry-core/pom.xml
index 80e54b1..fb80c1f 100644
--- a/modules/registry/registry-core/pom.xml
+++ b/modules/registry/registry-core/pom.xml
@@ -28,11 +28,11 @@
             <groupId>org.slf4j</groupId>
             <artifactId>slf4j-api</artifactId>
         </dependency>
-        <!--dependency>
+        <dependency>
             <groupId>org.apache.airavata</groupId>
             <artifactId>airavata-common-utils</artifactId>
             <version>${project.version}</version>
-        </dependency-->
+        </dependency>
         <!-- Test -->
         <dependency>
             <groupId>junit</groupId>

http://git-wip-us.apache.org/repos/asf/airavata/blob/63f6a53f/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/model/ApplicationInput.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/model/ApplicationInput.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/model/ApplicationInput.java
deleted file mode 100644
index d83e9e5..0000000
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/model/ApplicationInput.java
+++ /dev/null
@@ -1,166 +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.registry.core.app.catalog.model;
-
-
-import javax.persistence.*;
-import java.io.Serializable;
-
-@Entity
-@Table(name = "APPLICATION_INPUT")
-@IdClass(AppInput_PK.class)
-public class ApplicationInput implements Serializable {
-    @Id
-    @Column(name = "INTERFACE_ID")
-    private String interfaceID;
-    @Id
-    @Column(name = "INPUT_KEY")
-    private String inputKey;
-    @Column(name = "INPUT_VALUE")
-    private String inputVal;
-    @Column(name = "DATA_TYPE")
-    private String dataType;
-    @Column(name = "METADATA")
-    private String metadata;
-    @Column(name = "APP_ARGUMENT")
-    private String appArgument;
-    @Column(name = "USER_FRIENDLY_DESC")
-    private String userFriendlyDesc;
-    @Column(name = "STANDARD_INPUT")
-    private boolean standardInput;
-    @Column(name="INPUT_ORDER")
-    private int inputOrder;
-    @Column(name="IS_REQUIRED")
-    private boolean isRequired;
-    @Column(name="REQUIRED_TO_COMMANDLINE")
-    private boolean requiredToCMD;
-    @Column(name = "DATA_STAGED")
-    private boolean dataStaged;
-
-    @ManyToOne(cascade= CascadeType.MERGE)
-    @JoinColumn(name = "INTERFACE_ID")
-    private ApplicationInterface applicationInterface;
-
-    public String getInterfaceID() {
-        return interfaceID;
-    }
-
-    public void setInterfaceID(String interfaceID) {
-        this.interfaceID = interfaceID;
-    }
-
-    public String getInputKey() {
-        return inputKey;
-    }
-
-    public void setInputKey(String inputKey) {
-        this.inputKey = inputKey;
-    }
-
-    public String getInputVal() {
-        return inputVal;
-    }
-
-    public void setInputVal(String inputVal) {
-        this.inputVal = inputVal;
-    }
-
-    public String getDataType() {
-        return dataType;
-    }
-
-    public void setDataType(String dataType) {
-        this.dataType = dataType;
-    }
-
-    public String getMetadata() {
-        return metadata;
-    }
-
-    public void setMetadata(String metadata) {
-        this.metadata = metadata;
-    }
-
-    public String getAppArgument() {
-        return appArgument;
-    }
-
-    public void setAppArgument(String appArgument) {
-        this.appArgument = appArgument;
-    }
-
-    public String getUserFriendlyDesc() {
-        return userFriendlyDesc;
-    }
-
-    public void setUserFriendlyDesc(String userFriendlyDesc) {
-        this.userFriendlyDesc = userFriendlyDesc;
-    }
-
-    public ApplicationInterface getApplicationInterface() {
-        return applicationInterface;
-    }
-
-    public void setApplicationInterface(ApplicationInterface applicationInterface) {
-        this.applicationInterface = applicationInterface;
-    }
-
-    public boolean isStandardInput() {
-        return standardInput;
-    }
-
-    public void setStandardInput(boolean standardInput) {
-        this.standardInput = standardInput;
-    }
-
-    public int getInputOrder() {
-        return inputOrder;
-    }
-
-    public void setInputOrder(int inputOrder) {
-        this.inputOrder = inputOrder;
-    }
-
-    public boolean isRequired() {
-        return isRequired;
-    }
-
-    public void setRequired(boolean isRequired) {
-        this.isRequired = isRequired;
-    }
-
-    public boolean isRequiredToCMD() {
-        return requiredToCMD;
-    }
-
-    public void setRequiredToCMD(boolean requiredToCMD) {
-        this.requiredToCMD = requiredToCMD;
-    }
-
-    public boolean isDataStaged() {
-        return dataStaged;
-    }
-
-    public void setDataStaged(boolean dataStaged) {
-        this.dataStaged = dataStaged;
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/63f6a53f/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/model/ApplicationIntInput.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/model/ApplicationIntInput.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/model/ApplicationIntInput.java
new file mode 100644
index 0000000..2487387
--- /dev/null
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/model/ApplicationIntInput.java
@@ -0,0 +1,166 @@
+/*
+ *
+ * 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.registry.core.app.catalog.model;
+
+
+import javax.persistence.*;
+import java.io.Serializable;
+
+@Entity
+@Table(name = "APPLICATION_INPUT")
+@IdClass(AppInput_PK.class)
+public class ApplicationIntInput implements Serializable {
+    @Id
+    @Column(name = "INTERFACE_ID")
+    private String interfaceID;
+    @Id
+    @Column(name = "INPUT_KEY")
+    private String inputKey;
+    @Column(name = "INPUT_VALUE")
+    private String inputVal;
+    @Column(name = "DATA_TYPE")
+    private String dataType;
+    @Column(name = "METADATA")
+    private String metadata;
+    @Column(name = "APP_ARGUMENT")
+    private String appArgument;
+    @Column(name = "USER_FRIENDLY_DESC")
+    private String userFriendlyDesc;
+    @Column(name = "STANDARD_INPUT")
+    private boolean standardInput;
+    @Column(name="INPUT_ORDER")
+    private int inputOrder;
+    @Column(name="IS_REQUIRED")
+    private boolean isRequired;
+    @Column(name="REQUIRED_TO_COMMANDLINE")
+    private boolean requiredToCMD;
+    @Column(name = "DATA_STAGED")
+    private boolean dataStaged;
+
+    @ManyToOne(cascade= CascadeType.MERGE)
+    @JoinColumn(name = "INTERFACE_ID")
+    private ApplicationInterface applicationInterface;
+
+    public String getInterfaceID() {
+        return interfaceID;
+    }
+
+    public void setInterfaceID(String interfaceID) {
+        this.interfaceID = interfaceID;
+    }
+
+    public String getInputKey() {
+        return inputKey;
+    }
+
+    public void setInputKey(String inputKey) {
+        this.inputKey = inputKey;
+    }
+
+    public String getInputVal() {
+        return inputVal;
+    }
+
+    public void setInputVal(String inputVal) {
+        this.inputVal = inputVal;
+    }
+
+    public String getDataType() {
+        return dataType;
+    }
+
+    public void setDataType(String dataType) {
+        this.dataType = dataType;
+    }
+
+    public String getMetadata() {
+        return metadata;
+    }
+
+    public void setMetadata(String metadata) {
+        this.metadata = metadata;
+    }
+
+    public String getAppArgument() {
+        return appArgument;
+    }
+
+    public void setAppArgument(String appArgument) {
+        this.appArgument = appArgument;
+    }
+
+    public String getUserFriendlyDesc() {
+        return userFriendlyDesc;
+    }
+
+    public void setUserFriendlyDesc(String userFriendlyDesc) {
+        this.userFriendlyDesc = userFriendlyDesc;
+    }
+
+    public ApplicationInterface getApplicationInterface() {
+        return applicationInterface;
+    }
+
+    public void setApplicationInterface(ApplicationInterface applicationInterface) {
+        this.applicationInterface = applicationInterface;
+    }
+
+    public boolean isStandardInput() {
+        return standardInput;
+    }
+
+    public void setStandardInput(boolean standardInput) {
+        this.standardInput = standardInput;
+    }
+
+    public int getInputOrder() {
+        return inputOrder;
+    }
+
+    public void setInputOrder(int inputOrder) {
+        this.inputOrder = inputOrder;
+    }
+
+    public boolean isRequired() {
+        return isRequired;
+    }
+
+    public void setRequired(boolean isRequired) {
+        this.isRequired = isRequired;
+    }
+
+    public boolean isRequiredToCMD() {
+        return requiredToCMD;
+    }
+
+    public void setRequiredToCMD(boolean requiredToCMD) {
+        this.requiredToCMD = requiredToCMD;
+    }
+
+    public boolean isDataStaged() {
+        return dataStaged;
+    }
+
+    public void setDataStaged(boolean dataStaged) {
+        this.dataStaged = dataStaged;
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/63f6a53f/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/model/ApplicationIntOutput.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/model/ApplicationIntOutput.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/model/ApplicationIntOutput.java
new file mode 100644
index 0000000..e37b3a7
--- /dev/null
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/model/ApplicationIntOutput.java
@@ -0,0 +1,146 @@
+/*
+ *
+ * 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.registry.core.app.catalog.model;
+
+
+import javax.persistence.*;
+import java.io.Serializable;
+
+@Entity
+@Table(name = "APPLICATION_OUTPUT")
+@IdClass(AppOutput_PK.class)
+public class ApplicationIntOutput implements Serializable {
+    @Id
+    @Column(name = "INTERFACE_ID")
+    private String interfaceID;
+    @Id
+    @Column(name = "OUTPUT_KEY")
+    private String outputKey;
+    @Column(name = "OUTPUT_VALUE")
+    private String outputVal;
+    @Column(name = "DATA_TYPE")
+    private String dataType;
+    @Column(name = "IS_REQUIRED")
+    private boolean isRequired;
+    @Column(name="REQUIRED_TO_COMMANDLINE")
+    private boolean requiredToCMD;
+    @Column(name = "DATA_MOVEMENT")
+    private boolean dataMovement;
+    @Column(name = "DATA_NAME_LOCATION")
+    private String dataNameLocation;
+    @Column(name = "SEARCH_QUERY")
+    private String searchQuery;
+    @Column(name = "APP_ARGUMENT")
+    private String applicationArgument;
+
+    @ManyToOne(cascade= CascadeType.MERGE)
+    @JoinColumn(name = "INTERFACE_ID")
+    private ApplicationInterface applicationInterface;
+
+    public String getInterfaceID() {
+        return interfaceID;
+    }
+
+    public void setInterfaceID(String interfaceID) {
+        this.interfaceID = interfaceID;
+    }
+
+    public String getDataType() {
+        return dataType;
+    }
+
+    public void setDataType(String dataType) {
+        this.dataType = dataType;
+    }
+
+    public ApplicationInterface getApplicationInterface() {
+        return applicationInterface;
+    }
+
+    public void setApplicationInterface(ApplicationInterface applicationInterface) {
+        this.applicationInterface = applicationInterface;
+    }
+
+    public String getOutputKey() {
+        return outputKey;
+    }
+
+    public void setOutputKey(String outputKey) {
+        this.outputKey = outputKey;
+    }
+
+    public String getOutputVal() {
+        return outputVal;
+    }
+
+    public void setOutputVal(String outputVal) {
+        this.outputVal = outputVal;
+    }
+
+    public boolean isRequired() {
+        return isRequired;
+    }
+
+    public void setRequired(boolean isRequired) {
+        this.isRequired = isRequired;
+    }
+
+    public boolean isRequiredToCMD() {
+        return requiredToCMD;
+    }
+
+    public void setRequiredToCMD(boolean requiredToCMD) {
+        this.requiredToCMD = requiredToCMD;
+    }
+
+    public boolean isDataMovement() {
+        return dataMovement;
+    }
+
+    public void setDataMovement(boolean dataMovement) {
+        this.dataMovement = dataMovement;
+    }
+
+    public String getDataNameLocation() {
+        return dataNameLocation;
+    }
+
+    public void setDataNameLocation(String dataNameLocation) {
+        this.dataNameLocation = dataNameLocation;
+    }
+
+    public String getSearchQuery() {
+        return searchQuery;
+    }
+
+    public void setSearchQuery(String searchQuery) {
+        this.searchQuery = searchQuery;
+    }
+
+    public String getApplicationArgument() {
+        return applicationArgument;
+    }
+
+    public void setApplicationArgument(String applicationArgument) {
+        this.applicationArgument = applicationArgument;
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/63f6a53f/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/model/ApplicationOutput.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/model/ApplicationOutput.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/model/ApplicationOutput.java
deleted file mode 100644
index 2590913..0000000
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/model/ApplicationOutput.java
+++ /dev/null
@@ -1,146 +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.registry.core.app.catalog.model;
-
-
-import javax.persistence.*;
-import java.io.Serializable;
-
-@Entity
-@Table(name = "APPLICATION_OUTPUT")
-@IdClass(AppOutput_PK.class)
-public class ApplicationOutput implements Serializable {
-    @Id
-    @Column(name = "INTERFACE_ID")
-    private String interfaceID;
-    @Id
-    @Column(name = "OUTPUT_KEY")
-    private String outputKey;
-    @Column(name = "OUTPUT_VALUE")
-    private String outputVal;
-    @Column(name = "DATA_TYPE")
-    private String dataType;
-    @Column(name = "IS_REQUIRED")
-    private boolean isRequired;
-    @Column(name="REQUIRED_TO_COMMANDLINE")
-    private boolean requiredToCMD;
-    @Column(name = "DATA_MOVEMENT")
-    private boolean dataMovement;
-    @Column(name = "DATA_NAME_LOCATION")
-    private String dataNameLocation;
-    @Column(name = "SEARCH_QUERY")
-    private String searchQuery;
-    @Column(name = "APP_ARGUMENT")
-    private String applicationArgument;
-
-    @ManyToOne(cascade= CascadeType.MERGE)
-    @JoinColumn(name = "INTERFACE_ID")
-    private ApplicationInterface applicationInterface;
-
-    public String getInterfaceID() {
-        return interfaceID;
-    }
-
-    public void setInterfaceID(String interfaceID) {
-        this.interfaceID = interfaceID;
-    }
-
-    public String getDataType() {
-        return dataType;
-    }
-
-    public void setDataType(String dataType) {
-        this.dataType = dataType;
-    }
-
-    public ApplicationInterface getApplicationInterface() {
-        return applicationInterface;
-    }
-
-    public void setApplicationInterface(ApplicationInterface applicationInterface) {
-        this.applicationInterface = applicationInterface;
-    }
-
-    public String getOutputKey() {
-        return outputKey;
-    }
-
-    public void setOutputKey(String outputKey) {
-        this.outputKey = outputKey;
-    }
-
-    public String getOutputVal() {
-        return outputVal;
-    }
-
-    public void setOutputVal(String outputVal) {
-        this.outputVal = outputVal;
-    }
-
-    public boolean isRequired() {
-        return isRequired;
-    }
-
-    public void setRequired(boolean isRequired) {
-        this.isRequired = isRequired;
-    }
-
-    public boolean isRequiredToCMD() {
-        return requiredToCMD;
-    }
-
-    public void setRequiredToCMD(boolean requiredToCMD) {
-        this.requiredToCMD = requiredToCMD;
-    }
-
-    public boolean isDataMovement() {
-        return dataMovement;
-    }
-
-    public void setDataMovement(boolean dataMovement) {
-        this.dataMovement = dataMovement;
-    }
-
-    public String getDataNameLocation() {
-        return dataNameLocation;
-    }
-
-    public void setDataNameLocation(String dataNameLocation) {
-        this.dataNameLocation = dataNameLocation;
-    }
-
-    public String getSearchQuery() {
-        return searchQuery;
-    }
-
-    public void setSearchQuery(String searchQuery) {
-        this.searchQuery = searchQuery;
-    }
-
-    public String getApplicationArgument() {
-        return applicationArgument;
-    }
-
-    public void setApplicationArgument(String applicationArgument) {
-        this.applicationArgument = applicationArgument;
-    }
-}